-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
38 lines (36 loc) · 1006 Bytes
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { withSentryConfig } from "@sentry/nextjs";
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
config.module.rules.push({
test: /\.woff2$/,
type: "asset/resource",
});
return config;
},
experimental: {
instrumentationHook: true,
},
};
/**
* The following environment variables are required in order for Sentry to work
* and for the source maps to be uploaded correctly:
* - SENTRY_DSN
* - SENTRY_URL
* - SENTRY_ORG
* - SENTRY_PROJECT
* - SENTRY_AUTH_TOKEN
*/
export default withSentryConfig(nextConfig, {
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
widenClientFileUpload: true,
reactComponentAnnotation: {
enabled: true,
},
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
tunnelRoute: "/monitoring",
hideSourceMaps: true,
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
});