Skip to content

feat(solidstart): Delete source maps through the bundler plugin instead of a glob - #26335

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

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

Conversation

@timfish

@timfish timfish commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

When the app sets no build.sourcemap, the SolidStart SDK turns on hidden source maps and deleted them with a default glob. The SolidStart 1 glob .*/**/*.map deleted every map in any dot folder, not only the ones the SDK created. The SolidStart 2 glob ./**/*.map skipped dot folders, so when no upload ran, for example without an auth token, the client maps stayed in .output/public and were served. Both SDKs now pass deleteSourcemapsAfterUpload: true and sdkEnabledSourceMaps to the bundler plugin for builds where the SDK enabled the maps. The plugin then removes all of those maps from the build output: also when no upload runs, and also for chunks that a user's assets or ignore leaves out. The SDK only answers for the top-level build.sourcemap. Nitro gives its nitro and ssr environments their own setting, and @sentry/nitro still uploads and deletes those server maps after the build.

Maps the user enabled with build.sourcemap keep today's behaviour. One change: on SolidStart 2 with build.sourcemap unset, maps that an output turns on with its own rollupOptions.output.sourcemap or rolldownOptions.output.sourcemap (true or 'hidden') are now removed, where they stayed before. With disable: 'disable-upload', SolidStart 1 still removes the maps the SDK turned on, and SolidStart 2 keeps them, as before and as @sentry/nitro does for the server. A user's own filesToDeleteAfterUpload still runs next to the SDK's deletion.

The SDK's enable plugin now runs before the Sentry plugin, because the bundler plugin decides in its own config hook. In solidstart-2 the client map assertion is now strict. Its chunk recorder moved to generateBundle, because the plugin removes maps from the bundle before writeBundle, which had exempted every debug ID. Both E2E apps get a no-upload variant.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 9454409 (PR test merge using develop at 9279303)

Against: 9279303 (develop) · base run #66015

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

Path Size % Change Change
@sentry/browser 30.1 kB - -
@sentry/browser - with treeshaking flags 28.3 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.2 kB - -
@sentry/browser (incl. Tracing) 52.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.25 kB - -
@sentry/browser (incl. Tracing, Replay) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.6 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.6 kB - -
@sentry/browser (incl. Feedback) 47.73 kB - -
@sentry/browser (incl. sendFeedback) 30.69 kB - -
@sentry/browser (incl. FeedbackAsync) 35.69 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.71 kB - -
@sentry/browser (incl. Metrics & Logs) 32.37 kB - -
@sentry/react 32.11 kB - -
@sentry/react (incl. Tracing) 54.95 kB - -
@sentry/vue 38.3 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 30.12 kB - -
@sentry/remix (Remix 3 client bundle) 58.06 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 52.7 kB - -
CDN Bundle (incl. Logs, Metrics) 34.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.09 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.69 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.45 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.43 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.6 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.01 kB - -
@sentry/nextjs (client) 58.34 kB - -
@sentry/sveltekit (client) 53.46 kB - -
@sentry/core/server 44.57 kB - -
@sentry/core/browser 13.99 kB - -
@sentry/node 149.54 kB -0.01% -4 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.3 kB - -
@sentry/node - without tracing 88.47 kB -0.01% -8 B 🔽
@sentry/node - without channel injection 138.5 kB -0.01% -3 B 🔽
@sentry/aws-serverless 97.39 kB -0.01% -7 B 🔽
@sentry/cloudflare (withSentry) - minified 204.55 kB - -
@sentry/cloudflare (withSentry) 474.76 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 229.86 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 1 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 57s Details

@timfish
timfish force-pushed the feat/solidstart-delete-sourcemaps-after-upload branch 2 times, most recently from d4cd675 to 814a202 Compare November 13, 2026 11:34
Base automatically changed from feat/bundler-plugins-delete-without-upload to develop November 13, 2026 13:49
…ad of a glob

The SDK enables hidden source maps when the app sets none and now passes
`deleteSourcemapsAfterUpload: true` and `sdkEnabledSourceMaps` to the
bundler plugin for those builds, on SolidStart 1 and 2. This replaces the
default `.*/**/*.map` and `./**/*.map` globs. Maps now also go away when
no upload runs, and when a user's `assets` or `ignore` leaves chunks out.

The SDK only answers for the top-level `build.sourcemap`. Nitro gives its
`nitro` and `ssr` environments their own setting, and `@sentry/nitro`
uploads and deletes those maps after the build, so they stay with it.

The enable plugin moves before the Sentry plugin, because the bundler
plugin decides in its own `config` hook. Maps the user enabled keep
today's behaviour. With `disable: 'disable-upload'`, SolidStart 1 still
removes the maps the SDK turned on, and SolidStart 2 keeps them. A user's
own `deleteSourcemapsAfterUpload` passes through to every environment,
and a user's own `filesToDeleteAfterUpload` runs as well.
@timfish
timfish force-pushed the feat/solidstart-delete-sourcemaps-after-upload branch from 814a202 to 96468c2 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

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