Skip to content

fix(bundler-plugins): Stamp debug IDs onto emitted source maps when disable-upload is set - #23754

Draft
msonnb wants to merge 1 commit into
developfrom
ms/bundler-plugins-disable-upload-fix
Draft

fix(bundler-plugins): Stamp debug IDs onto emitted source maps when disable-upload is set#23754
msonnb wants to merge 1 commit into
developfrom
ms/bundler-plugins-disable-upload-fix

Conversation

@msonnb

@msonnb msonnb commented Aug 31, 2026

Copy link
Copy Markdown
Member

What

sourcemaps.disable: 'disable-upload' now stamps the bundle's debug ID into the emitted .js.map. The JS bundle is left untouched, so subresource integrity hashes computed during the build stay valid. Stamping happens in the bundler's asset pipeline (processAssets / generateBundle) where one exists; esbuild has none, so its maps are rewritten on disk in onEnd.

Why

Debug-ID stamping lived only inside the upload routine, which wrote it to temp copies of the artifacts — so disable-upload skipped exactly the half a later manual sentry sourcemap upload/sentry-cli sourcemaps upload depends on, and every artifact ended up with debugId: null. The option's documented purpose ("manually upload sourcemaps at a later point in time") was therefore not achievable, and the sentry sourcemap inject/sentry-cli sourcemaps inject workaround generates a different ID and rewrites the bundle.

Fixes getsentry/sentry-javascript-bundler-plugins#949
Fixes getsentry/sentry-javascript-bundler-plugins#603

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.56 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.76 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.78 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.69 kB - -
@sentry/browser (incl. Tracing, Replay) 88.24 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.63 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.94 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.86 kB - -
@sentry/browser (incl. Feedback) 46.05 kB - -
@sentry/browser (incl. sendFeedback) 33.62 kB - -
@sentry/browser (incl. FeedbackAsync) 38.73 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.3 kB - -
@sentry/react (incl. Tracing) 50.95 kB - -
@sentry/vue 35.73 kB - -
@sentry/vue (incl. Tracing) 51.03 kB - -
@sentry/svelte 28.59 kB - -
CDN Bundle 30.35 kB - -
CDN Bundle (incl. Tracing) 49.39 kB - -
CDN Bundle (incl. Logs, Metrics) 32.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.17 kB - -
CDN Bundle (incl. Tracing, Replay) 86.87 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.73 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.8 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.65 kB - -
CDN Bundle - uncompressed 89.95 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.22 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.24 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.91 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.41 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.71 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 280.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.08 kB - -
@sentry/nextjs (client) 53.52 kB - -
@sentry/sveltekit (client) 49.2 kB - -
@sentry/core/server 65.67 kB - -
@sentry/core/browser 51.86 kB - -
@sentry/node 123.47 kB +0.02% +20 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.23 kB - -
@sentry/node - without tracing 87.76 kB +0.02% +12 B 🔺
@sentry/node - without channel injection 103.15 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.09 kB +0.03% +21 B 🔺
@sentry/cloudflare (withSentry) - minified 200.72 kB - -
@sentry/cloudflare (withSentry) 499.25 kB - -

View base workflow run

@msonnb

msonnb commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0637f26. Configure here.

@msonnb
msonnb force-pushed the ms/bundler-plugins-disable-upload-fix branch from 0637f26 to 532bb7f Compare August 31, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant