Skip to content

Commit 6dc4c65

Browse files
authored
fix(nextjs): Remove webpack:// prefix more broadly from source map sources field (#10642)
1 parent 5ec402d commit 6dc4c65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ export function getWebpackPluginOptions(
764764
project: process.env.SENTRY_PROJECT,
765765
authToken: process.env.SENTRY_AUTH_TOKEN,
766766
configFile: hasSentryProperties ? 'sentry.properties' : undefined,
767-
stripPrefix: ['webpack://_N_E/'],
767+
stripPrefix: ['webpack://_N_E/', 'webpack://'],
768768
urlPrefix,
769769
entries: [], // The webpack plugin's release injection breaks the `app` directory - we inject the release manually with the value injection loader instead.
770770
release: getSentryRelease(buildId),

packages/nextjs/test/config/webpack/sentryWebpackPlugin.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Sentry webpack plugin config', () => {
3535
org: 'squirrelChasers', // from user webpack plugin config
3636
project: 'simulator', // from user webpack plugin config
3737
authToken: 'dogsarebadatkeepingsecrets', // picked up from env
38-
stripPrefix: ['webpack://_N_E/'], // default
38+
stripPrefix: ['webpack://_N_E/', 'webpack://'], // default
3939
urlPrefix: '~/_next', // default
4040
entries: [],
4141
release: 'doGsaREgReaT', // picked up from env

0 commit comments

Comments
 (0)