Skip to content

feat(remix): Delete source maps through the bundler plugin instead of globs - #26332

Draft
timfish wants to merge 1 commit into
developfrom
feat/remix-delete-sourcemaps-after-upload
Draft

timfish wants to merge 1 commit into
developfrom
feat/remix-delete-sourcemaps-after-upload

Conversation

@timfish

@timfish timfish commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

When the app set no build.sourcemap, the Remix SDK turned on hidden source maps and then deleted them with an <outDir>/**/*.map glob for the client and the server build. It now passes deleteSourcemapsAfterUpload: true and the internal sdkEnabledSourceMaps flag to the bundler plugin for those builds. The plugin then removes the maps before Vite writes them, also when no upload runs. The SDK only knows that it turned maps on in its own config hook, after it created the bundler plugin, so it passes both options as functions, and its enable plugin now runs before the bundler plugin's config hook.

Maps the user turned on stay, as before. With disable: 'disable-upload' the maps also stay, so the user can upload them by hand. A user's own filesToDeleteAfterUpload is passed through and runs as well, as before. One difference: the old glob deleted every .map file in the output directory, but the plugin removes only maps the build emitted, so .map files copied from public/ now stay. The remix-sourcemaps E2E app gets a no-upload variant that asserts no maps and no sourceMappingURL comments in build. This depends on #26281.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 54db60a (PR test merge using develop at d44a8ba)

Against: d44a8ba (develop) · base run #66610

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.18 kB - -
@sentry/browser - with treeshaking flags 28.37 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.28 kB - -
@sentry/browser (incl. Tracing) 52.74 kB - -
@sentry/browser (incl. Tracing Core) 40.27 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.75 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.63 kB - -
@sentry/browser (incl. Tracing, Replay) 92.79 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.16 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.71 kB - -
@sentry/browser (incl. Feedback) 48.12 kB - -
@sentry/browser (incl. sendFeedback) 30.76 kB - -
@sentry/browser (incl. FeedbackAsync) 35.78 kB - -
@sentry/browser (incl. Metrics) 31.5 kB - -
@sentry/browser (incl. Logs) 31.78 kB - -
@sentry/browser (incl. Metrics & Logs) 32.44 kB - -
@sentry/react 32.19 kB - -
@sentry/react (incl. Tracing) 55.39 kB - -
@sentry/vue 38.38 kB - -
@sentry/vue (incl. Tracing) 55.69 kB - -
@sentry/svelte 30.19 kB - -
@sentry/remix (Remix 3 client bundle) 58.4 kB - -
CDN Bundle 32.11 kB - -
CDN Bundle (incl. Tracing) 53.15 kB - -
CDN Bundle (incl. Logs, Metrics) 34.89 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.71 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.92 kB - -
CDN Bundle (incl. Tracing, Replay) 91.03 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99 kB - -
CDN Bundle - uncompressed 93.8 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.13 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.13 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.75 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.25 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 284.91 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 296.83 kB - -
@sentry/nextjs (client) 59.02 kB - -
@sentry/sveltekit (client) 54.03 kB - -
@sentry/core/server 45.04 kB - -
@sentry/core/browser 14.4 kB - -
@sentry/node 152.01 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.34 kB - -
@sentry/node - without tracing 88.67 kB -0.01% -3 B 🔽
@sentry/node - without channel injection 140.94 kB -0.01% -7 B 🔽
@sentry/aws-serverless 99.03 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) - minified 206.95 kB - -
@sentry/cloudflare (withSentry) 480.37 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 232.31 kB - -

View base workflow run

@timfish
timfish force-pushed the feat/remix-delete-sourcemaps-after-upload branch from 63b2997 to dec1d10 Compare November 13, 2026 11:34
Base automatically changed from feat/bundler-plugins-delete-without-upload to develop November 13, 2026 13:49
@timfish
timfish force-pushed the feat/remix-delete-sourcemaps-after-upload branch from dec1d10 to 5eab8cf Compare November 13, 2026 13:53
@timfish
timfish marked this pull request as ready for review November 13, 2026 17:36
@timfish
timfish requested a review from a team November 13, 2026 17:36
@timfish timfish changed the title feat(remix): Delete source maps through the bundler plugin instead of a glob feat(remix): Delete source maps through the bundler plugin instead of globs Nov 14, 2026
@timfish
timfish marked this pull request as draft November 16, 2026 16:48
@timfish
timfish force-pushed the feat/remix-delete-sourcemaps-after-upload branch from 5eab8cf to 80c0473 Compare November 17, 2026 22:14

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