File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export type NextConfigObject = {
4848 instrumentationHook ?: boolean ;
4949 clientTraceMetadata ?: string [ ] ;
5050 } ;
51+ productionBrowserSourceMaps ?: boolean ;
5152} ;
5253
5354export type SentryBuildOptions = {
Original file line number Diff line number Diff line change @@ -329,7 +329,8 @@ export function constructWebpackConfigFunction(
329329 // the browser won't look for them and throw errors into the console when it can't find them. Because this is a
330330 // front-end-only problem, and because `sentry-cli` handles sourcemaps more reliably with the comment than
331331 // without, the option to use `hidden-source-map` only applies to the client-side build.
332- newConfig . devtool = ! isServer ? 'hidden-source-map' : 'source-map' ;
332+ newConfig . devtool =
333+ isServer || userNextConfig . productionBrowserSourceMaps ? 'source-map' : 'hidden-source-map' ;
333334 }
334335
335336 newConfig . plugins = newConfig . plugins || [ ] ;
You can’t perform that action at this time.
0 commit comments