Skip to content

Commit d23b3a0

Browse files
author
Luca Forstner
committed
less warning
1 parent ca3702e commit d23b3a0

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

packages/nextjs/src/config/withSentryConfig.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,7 @@ function getFinalConfigObject(
193193
}
194194
}
195195
} else {
196-
if (
197-
!(
198-
incomingUserNextConfigObject.experimental &&
199-
'clientInstrumentationHook' in incomingUserNextConfigObject.experimental
200-
)
201-
) {
202-
// eslint-disable-next-line no-console
203-
console.log(
204-
'[@sentry/nextjs] The Sentry SDK was not able to determine your Next.js version. If you are using Next.js versions earlier than 15.3.0, Next.js will probably show you a warning about the `experimental.clientInstrumentationHook` being set. To silence the warning, explicitly set the `experimental.clientInstrumentationHook` option in your `next.config.(js|mjs|ts)` to `undefined`.',
205-
);
206-
}
196+
// If we cannot detect a Next.js version for whatever reason, the sensible default is still to set the `experimental.instrumentationHook`.
207197
incomingUserNextConfigObject.experimental = {
208198
clientInstrumentationHook: true,
209199
...incomingUserNextConfigObject.experimental,

0 commit comments

Comments
 (0)