File tree 1 file changed +10
-0
lines changed
packages/nextjs/src/config
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,16 @@ async function addSentryToEntryProperty(
275
275
for ( const entryPointName in newEntryProperty ) {
276
276
if ( shouldAddSentryToEntryPoint ( entryPointName , isServer , userSentryOptions . excludeServerRoutes ) ) {
277
277
addFilesToExistingEntryPoint ( newEntryProperty , entryPointName , filesToInject ) ;
278
+ } else {
279
+ if (
280
+ isServer &&
281
+ // If the user has asked to exclude pages, confirm for them that it's worked
282
+ userSentryOptions . excludeServerRoutes &&
283
+ // We always skip these, so it's not worth telling the user that we've done so
284
+ ! [ 'pages/_app' , 'pages/_document' ] . includes ( entryPointName )
285
+ ) {
286
+ __DEBUG_BUILD__ && logger . log ( `Skipping Sentry injection for ${ entryPointName . replace ( / ^ p a g e s / , '' ) } ` ) ;
287
+ }
278
288
}
279
289
}
280
290
You can’t perform that action at this time.
0 commit comments