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 = {
462462 */
463463 errorHandler ?: ( err : Error ) => void ;
464464
465+ /**
466+ * Suppress the warning about the `onRouterTransitionStart` hook.
467+ */
468+ suppressOnRouterTransitionStartWarning ?: boolean ;
469+
465470 /**
466471 * Contains a set of experimental flags that might change in future releases. These flags enable
467472 * 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(
236236 const instrumentationClientFileContents = getInstrumentationClientFileContents ( ) ;
237237 if (
238238 instrumentationClientFileContents !== undefined &&
239- ! instrumentationClientFileContents . includes ( 'onRouterTransitionStart' )
239+ ! instrumentationClientFileContents . includes ( 'onRouterTransitionStart' ) &&
240+ ! userSentryOptions . suppressOnRouterTransitionStartWarning
240241 ) {
241242 // eslint-disable-next-line no-console
242243 console . warn (
You can’t perform that action at this time.
0 commit comments