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 = {
48
48
instrumentationHook ?: boolean ;
49
49
clientTraceMetadata ?: string [ ] ;
50
50
} ;
51
+ productionBrowserSourceMaps ?: boolean ;
51
52
} ;
52
53
53
54
export type SentryBuildOptions = {
Original file line number Diff line number Diff line change @@ -329,7 +329,8 @@ export function constructWebpackConfigFunction(
329
329
// the browser won't look for them and throw errors into the console when it can't find them. Because this is a
330
330
// front-end-only problem, and because `sentry-cli` handles sourcemaps more reliably with the comment than
331
331
// 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' ;
333
334
}
334
335
335
336
newConfig . plugins = newConfig . plugins || [ ] ;
You can’t perform that action at this time.
0 commit comments