Skip to content

feat(bundler-plugins): Enable external source maps and delete them after upload in the esbuild plugin - #25648

Open
timfish wants to merge 1 commit into
feat/bundler-plugins-delete-sourcemaps-webpackfrom
feat/bundler-plugins-delete-sourcemaps-esbuild
Open

timfish wants to merge 1 commit into
feat/bundler-plugins-delete-sourcemaps-webpackfrom
feat/bundler-plugins-delete-sourcemaps-esbuild

Conversation

@timfish

@timfish timfish commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Part of the stack for #25609. esbuild writes its output before onEnd runs and has no hook to drop an output, so the plugin sets sourcemap: 'external' when the setting is unset and, after a successful upload, deletes the maps of the chunks that were uploaded: those that pass sourcemaps.assets and sourcemaps.ignore and carry a debug ID. Shared chunks and CSS get no debug ID, so their maps stay. When the upload fails all maps stay, with an error log.

The metafile lists outputs relative to absWorkingDir, while the upload globbed them from the process working directory, so builds with an absWorkingDir elsewhere uploaded nothing. The paths are now resolved against absWorkingDir first, and passed with forward slashes because glob reads backslashes as escapes. Integration fixtures cover ignore and assets on the staged path for esbuild.

@timfish
timfish added this pull request to stack #25649 October 22, 2026 10:47
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 4a52c57 (PR test merge using develop at 2b25b5f)

Against: a3dae70 (develop) · base run #64482

⚠️ Baseline mismatch: 6 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 2b25b5f finishes.

Path Size % Change Change
@sentry/browser 30.39 kB - -
@sentry/browser - with treeshaking flags 28.54 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.42 kB - -
@sentry/browser (incl. Tracing) 52.71 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.72 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.69 kB - -
@sentry/browser (incl. Tracing, Replay) 93.01 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.76 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.75 kB - -
@sentry/browser (incl. Feedback) 47.98 kB - -
@sentry/browser (incl. sendFeedback) 35.5 kB - -
@sentry/browser (incl. FeedbackAsync) 40.6 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.72 kB - -
@sentry/browser (incl. Metrics & Logs) 32.44 kB - -
@sentry/react 32.28 kB - -
@sentry/react (incl. Tracing) 55.08 kB - -
@sentry/vue 38.66 kB - -
@sentry/vue (incl. Tracing) 55.73 kB - -
@sentry/svelte 30.42 kB - -
@sentry/remix (Remix 3 client bundle) 57.79 kB - -
CDN Bundle 32.18 kB - -
CDN Bundle (incl. Tracing) 53.23 kB - -
CDN Bundle (incl. Logs, Metrics) 34.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.17 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.87 kB - -
CDN Bundle (incl. Tracing, Replay) 91.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.55 kB - -
CDN Bundle - uncompressed 94.64 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.6 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.11 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.34 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.68 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 279.29 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 293 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 298.71 kB - -
@sentry/nextjs (client) 58.03 kB - -
@sentry/sveltekit (client) 53.23 kB - -
@sentry/core/server 44.24 kB - -
@sentry/core/browser 13.93 kB - -
@sentry/node 155.39 kB +0.02% +25 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.08 kB - -
@sentry/node - without tracing 96.69 kB +0.03% +25 B 🔺
@sentry/node - without channel injection 135.76 kB +0.02% +22 B 🔺
@sentry/aws-serverless 104.88 kB +0.03% +22 B 🔺
@sentry/cloudflare (withSentry) - minified 197.94 kB - -
@sentry/cloudflare (withSentry) 491.97 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 218.48 kB - -

View base workflow run

@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 0d05fc7 to 73fee34 Compare October 22, 2026 10:57
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 2 not successful, 41 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Failing after 2m Details
❌ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Failing after 34s Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 23s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 19s Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 20s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 23s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 16s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 21s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 24s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 19s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 26s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 (tracer provider) Test (optional) Successful in 23s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 21s Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 34s Details

@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 73fee34 to 4040760 Compare October 22, 2026 11:13
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch 2 times, most recently from 3885821 to 62b848d Compare October 27, 2026 16:25
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 62b848d to f5d5367 Compare October 27, 2026 16:32
@timfish
timfish marked this pull request as ready for review October 27, 2026 18:02

@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.

Stale Bugbot comment from a previous run.

@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from f5d5367 to ba5d8ca Compare October 28, 2026 12:15
@timfish
timfish requested review from a team as code owners October 28, 2026 12:15
@timfish
timfish requested review from isaacs, logaretm, msonnb, mydea and nicohrubec and removed request for a team October 28, 2026 12:15
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from ba5d8ca to 6f13518 Compare October 28, 2026 12:33
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 26d1b2d to 3f489b3 Compare October 29, 2026 17:10
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 3f489b3 to 2b44493 Compare October 29, 2026 17:15

@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.

Stale Bugbot comment from a previous run.

@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 2b44493 to 71c0775 Compare October 29, 2026 17:39
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 71c0775 to 0edb347 Compare October 29, 2026 17:43
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 0edb347 to 5c128dc Compare October 29, 2026 20:54
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 5c128dc to 8d8e755 Compare October 29, 2026 21:36
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 8d8e755 to 2b9c8fe Compare October 29, 2026 21:59
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch 3 times, most recently from d661b73 to 2854a5a Compare October 30, 2026 12:46
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 2854a5a to d8075e3 Compare October 30, 2026 15:05
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from d8075e3 to 35e806c Compare October 30, 2026 15:22
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 35e806c to 84a11f9 Compare October 30, 2026 15:57

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 84a11f9. Configure here.

…ter upload in the esbuild plugin

esbuild writes its output before `onEnd` runs and has no hook to drop
an output, so the maps are deleted from disk after a successful upload
instead. When the upload fails they stay, with an error log.
@timfish
timfish force-pushed the feat/bundler-plugins-delete-sourcemaps-esbuild branch from 84a11f9 to 6f443bc Compare October 30, 2026 16:17

This branch has not been deployed

No deployments
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