Skip to content

fix(nextjs): Remove webpack:// prefix more broadly from source map sources field #10642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ export function getWebpackPluginOptions(
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
configFile: hasSentryProperties ? 'sentry.properties' : undefined,
stripPrefix: ['webpack://_N_E/'],
stripPrefix: ['webpack://_N_E/', 'webpack://'],
urlPrefix,
entries: [], // The webpack plugin's release injection breaks the `app` directory - we inject the release manually with the value injection loader instead.
release: getSentryRelease(buildId),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Sentry webpack plugin config', () => {
org: 'squirrelChasers', // from user webpack plugin config
project: 'simulator', // from user webpack plugin config
authToken: 'dogsarebadatkeepingsecrets', // picked up from env
stripPrefix: ['webpack://_N_E/'], // default
stripPrefix: ['webpack://_N_E/', 'webpack://'], // default
urlPrefix: '~/_next', // default
entries: [],
release: 'doGsaREgReaT', // picked up from env
Expand Down