Skip to content

[WIP]feat(nextjs): Use compiler hook for uploading sourcemaps #17352

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chargome
Copy link
Member

@chargome chargome commented Aug 8, 2025

Makes use of the runAfterProductionCompile hook to handle sourcemap upload logic.

When activated by setting useRunAfterProductionCompileHook: true in withSentryConfig we apply the following logic:

  • Webpack: we disable sourcemap uploads and release creation in the webpack plugin and instead handle these in `runAfterProductionCompile. We do keep the debugId injection in the plugin though.
  • Turbopack: as there is no bundler plugin for Turbopack we handle the entire bundler plugin cycle in the hook (release, inject, upload, delete)

closes https://linear.app/getsentry/issue/JS-267/slow-build-times-and-webpack-serialization-performance-warnings-when

Still needs getsentry/sentry-javascript-bundler-plugins#785 and getsentry/sentry-javascript-bundler-plugins#784 to be released

@chargome chargome self-assigned this Aug 8, 2025
Copy link

linear bot commented Aug 8, 2025

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.

1 participant