@@ -71,6 +71,7 @@ const moduleExports = async () => {
7171 ] , // Note that folders starting with a dot are already ignored after verification
7272 } ,
7373 swcPlugins : [ [ 'next-superjson-plugin' , { excluded : [ ] } ] ] ,
74+ instrumentationHook : true , // [Next 14] required so `instrumentation.ts` `register()` runs server-side (it becomes the default in Next 15)
7475 } ,
7576 async rewrites ( ) {
7677 return [
@@ -142,11 +143,6 @@ const moduleExports = async () => {
142143
143144 return config ;
144145 } ,
145- sentry : {
146- hideSourceMaps : mode === 'prod' , // Do not serve sourcemaps in `prod`
147- // disableServerWebpackPlugin: true, // TODO
148- // disableClientWebpackPlugin: true, // TODO
149- } ,
150146 poweredByHeader : false ,
151147 generateBuildId : async ( ) => {
152148 return await getTechnicalVersion ( ) ;
@@ -155,30 +151,35 @@ const moduleExports = async () => {
155151
156152 const uploadToSentry = process . env . SENTRY_RELEASE_UPLOAD === 'true' && process . env . NODE_ENV === 'production' ;
157153
158- const sentryWebpackPluginOptions = {
159- dryRun : ! uploadToSentry ,
154+ const sentryBuildOptions = {
155+ unstable_sentryWebpackPluginOptions : {
156+ disable : ! uploadToSentry ,
157+ } ,
160158 debug : false ,
161159 silent : false ,
162- release : appHumanVersion ,
163- setCommits : {
164- // TODO: get error: caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)
165- // Possible ref: https://github.com/getsentry/sentry-cli/issues/1388#issuecomment-1306137835
166- // Note: not able to bind our repository to our on-premise Sentry as specified in the article... leaving it manual for now (no commit details...)
167- auto : false ,
168- commit : getCommitSha ( ) ,
169- // auto: true,
160+ release : {
161+ name : appHumanVersion ,
162+ setCommits : {
163+ // TODO: get error: caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)
164+ // Possible ref: https://github.com/getsentry/sentry-cli/issues/1388#issuecomment-1306137835
165+ // Note: not able to bind our repository to our on-premise Sentry as specified in the article... leaving it manual for now (no commit details...)
166+ auto : false ,
167+ commit : getCommitSha ( ) ,
168+ } ,
169+ deploy : {
170+ env : mode ,
171+ } ,
170172 } ,
171- deploy : {
172- env : mode ,
173+ widenClientFileUpload : false ,
174+ // tunnelRoute: '/monitoring', // Helpful to avoid adblockers, but requires Sentry SaaS
175+ sourcemaps : {
176+ disable : process . env . NODE_ENV === 'development' ,
177+ deleteSourcemapsAfterUpload : mode === 'prod' , // do not serve sourcemaps in `prod` (replaces the former `hideSourceMaps`)
173178 } ,
179+ disableLogger : false ,
174180 } ;
175181
176- return withSentryConfig ( standardModuleExports , sentryWebpackPluginOptions , {
177- transpileClientSDK : true ,
178- // tunnelRoute: '/monitoring', // Helpful to avoid adblockers, but requires Sentry SaaS
179- hideSourceMaps : false ,
180- disableLogger : false ,
181- } ) ;
182+ return withSentryConfig ( standardModuleExports , sentryBuildOptions ) ;
182183} ;
183184
184185module . exports = moduleExports ;
0 commit comments