File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,11 @@ export type SentryBuildOptions = {
462
462
*/
463
463
errorHandler ?: ( err : Error ) => void ;
464
464
465
+ /**
466
+ * Suppress the warning about the `onRouterTransitionStart` hook.
467
+ */
468
+ suppressOnRouterTransitionStartWarning ?: boolean ;
469
+
465
470
/**
466
471
* Contains a set of experimental flags that might change in future releases. These flags enable
467
472
* features that are still in development and may be modified, renamed, or removed without notice.
Original file line number Diff line number Diff line change @@ -236,7 +236,8 @@ function getFinalConfigObject(
236
236
const instrumentationClientFileContents = getInstrumentationClientFileContents ( ) ;
237
237
if (
238
238
instrumentationClientFileContents !== undefined &&
239
- ! instrumentationClientFileContents . includes ( 'onRouterTransitionStart' )
239
+ ! instrumentationClientFileContents . includes ( 'onRouterTransitionStart' ) &&
240
+ ! userSentryOptions . suppressOnRouterTransitionStartWarning
240
241
) {
241
242
// eslint-disable-next-line no-console
242
243
console . warn (
You can’t perform that action at this time.
0 commit comments