@@ -5,12 +5,15 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
5
5
/**
6
6
* @type {import('next').NextConfig }
7
7
*/
8
- const config = {
8
+ let config = {
9
9
productionBrowserSourceMaps : true ,
10
10
env : {
11
11
// make the backend URL available to the frontend
12
12
NEXT_PUBLIC_BACKEND_URL : process . env . BACKEND_URL ,
13
- NEXT_PUBLIC_ACCOUNTS_URL : "https://accounts.flanksource.com"
13
+ NEXT_PUBLIC_ACCOUNTS_URL : "https://accounts.flanksource.com" ,
14
+ NEXT_PUBLIC_SENTRY_HOST : "https://1db3b3bbf111cafee19c4e7827a4b601@o4508810638589952.ingest.de.sentry.io" ,
15
+ NEXT_PUBLIC_SENTRY_PROJECT_ID : "4508810640162896" ,
16
+ NEXT_PUBLIC_SENTRY_DSN : process . env . SENTRY_DSN || "https://1db3b3bbf111cafee19c4e7827a4b601@o4508810638589952.ingest.de.sentry.io/4508810640162896" ,
14
17
} ,
15
18
redirects : async ( ) => {
16
19
if ( process . env . NEXT_PUBLIC_APP_DEPLOYMENT === "CANARY_CHECKER" ) {
@@ -83,8 +86,8 @@ const config = {
83
86
// https://github.com/vercel/next.js/tree/canary/examples/with-docker#in-existing-projects
84
87
...( process . env . NEXT_STANDALONE_DEPLOYMENT === "true"
85
88
? {
86
- output : "standalone"
87
- }
89
+ output : "standalone"
90
+ }
88
91
: { } ) ,
89
92
experimental : {
90
93
// increase the default timeout for the proxy from 30s to 10m to allow for
@@ -96,4 +99,50 @@ const config = {
96
99
transpilePackages : [ "monaco-editor" ]
97
100
} ;
98
101
99
- module . exports = withBundleAnalyzer ( config ) ;
102
+ config = withBundleAnalyzer ( config ) ;
103
+
104
+
105
+
106
+ // Injected content via Sentry wizard below
107
+
108
+ const { withSentryConfig } = require ( "@sentry/nextjs" ) ;
109
+
110
+ module . exports = withSentryConfig (
111
+ config ,
112
+ {
113
+ // For all available options, see:
114
+ // https://github.com/getsentry/sentry-webpack-plugin#options
115
+
116
+ org : "flanksource" ,
117
+ project : "flanksource-ui" ,
118
+
119
+ // Only print logs for uploading source maps in CI
120
+ silent : ! process . env . CI ,
121
+
122
+ // For all available options, see:
123
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
124
+
125
+ // Upload a larger set of source maps for prettier stack traces (increases build time)
126
+ widenClientFileUpload : true ,
127
+
128
+ // Automatically annotate React components to show their full name in breadcrumbs and session replay
129
+ reactComponentAnnotation : {
130
+ enabled : true ,
131
+ } ,
132
+
133
+ // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
134
+ // This can increase your server load as well as your hosting bill.
135
+ // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
136
+ // side errors will fail.
137
+ tunnelRoute : "/monitoring" ,
138
+
139
+ // Hides source maps from generated client bundles
140
+ hideSourceMaps : false ,
141
+
142
+ // Automatically tree-shake Sentry logger statements to reduce bundle size
143
+ disableLogger : true ,
144
+
145
+ automaticVercelMonitors : false ,
146
+ }
147
+ ) ;
148
+
0 commit comments