From bcf51403862af787eac8458c3e6d89a48c35c9a2 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 7 Nov 2023 08:15:45 +0000 Subject: [PATCH] fix(nextjs): Only inject basepath in dev mode --- packages/nextjs/src/config/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {