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 invalid source maps from terser-webpack-plugin #45423

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Jan 31, 2023

This fixes a regression in our source map generating which got lost in the big diff from the src folder restructure in #44405

These invalid source maps broke plugins that attempted to leverage them like @sentry/nextjs which only attempts in a production environment https://github.com/getsentry/sentry-javascript/blob/15ec85bead77100413381be821f42841ae114f93/packages/nextjs/src/config/webpack.ts#L586

For a regression test in a follow-up we will need to investigate a production test fixture with @sentry/nextjs although this requires a DSN be configured.

This also ensures we setup unhandledRejection and uncaughtException listeners during build so that we have proper stack information when these occur and the process isn't left hanging.

This also moves the extensionAlias config from #44177 to an experimental config as it seems to cause conflicts with ESM packages that define exports in their package.json which can be considered a breaking change.

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have a helpful link attached, see contributing.md

Fixes: #45419
x-ref: slack thread

@lforst
Copy link
Contributor

lforst commented Jan 31, 2023

Hi, I just stumbled across this PR - happy to see this fixed!

For a regression test in a follow-up we will need to investigate a production test fixture with @sentry/nextjs although this requires a DSN be configured.

This would be amazing. Feel free to just ping me if you need help with anything Sentry related!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrading from next 13.1.1 to 13.1.6 causes Vercel deployment to fail--no other changes
2 participants