diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 5565125d12d7..1ff0fbf9a6db 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -952,7 +952,7 @@ function addValueInjectionLoader( SENTRY_RELEASE: buildContext.dev ? undefined : { id: sentryWebpackPluginOptions.release ?? getSentryRelease(buildContext.buildId) }, - __sentryBasePath: userNextConfig.basePath, + __sentryBasePath: buildContext.dev ? userNextConfig.basePath : undefined, }; const serverValues = {