Skip to content
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

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

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

lforst
Copy link
Member

@lforst lforst commented Feb 13, 2024

It seems like newer versions of Next.js do not use the _N_E namespace anymore but leave it up to the user. We need to adjust our config for that.

We should in the near future add E2E tests that check for source mapping in Next.js.

Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 78.42 KB (+0.8% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 69.64 KB (+0.87% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 73.58 KB (+0.84% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 63.26 KB (+0.97% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 33.6 KB (+1.12% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 33.48 KB (+1.05% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.37 KB (+0.68% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.37 KB (+0.68% 🔺)
@sentry/browser - Webpack (gzipped) 22.63 KB (+0.89% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 76.69 KB (+0.78% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 68.18 KB (+0.83% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 34.01 KB (+1.21% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.99 KB (+1.18% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 214.8 KB (+0.9% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 102.6 KB (+1.07% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 74.89 KB (+1.17% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 37.14 KB (+0.74% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 70.01 KB (+0.86% 🔺)
@sentry/react - Webpack (gzipped) 22.67 KB (+0.92% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 87.68 KB (+0.68% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 51.87 KB (+3.01% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.22 KB (+0.61% 🔺)

@@ -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://'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really help?
Because in our example, this would just turn webpack://sentry-docs/app/changelog/%5Fadmin/page.tsx into sentry-docs/app/changelog/%5Fadmin/page.tsx

not quite sure if thats better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue it is better 1) because symbolicator is marking in-app frames as non-in-app because of this prefix 2) it is more aesthetic and less confusing (?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants