Skip to content

fix(solidstart): Keep build-time tooling out of SolidStart 2 server bundles - #26277

Merged
mydea merged 1 commit into
developfrom
fix/solidstart-runtime-entry
Nov 11, 2026
Merged

mydea merged 1 commit into
developfrom
fix/solidstart-runtime-entry

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Why: The solidstart-2 e2e test has been failing on develop since #26200 bumped the Sentry CLI to ^0.49.0. The server entry of @sentry/solidstart still re-exports the deprecated SolidStart 1 withSentry. That pulls @sentry/bundler-plugins, and with it the CLI and oxc-parser, into the Nitro server graph. Starting with 0.48, the CLI ships as code-split ESM. Rolldown still emits its dynamic-import chunks after tree-shaking the code that imports them; Rollup doesn't. Nitro also traces oxc-parser's native binding. For every SolidStart 2 app, the result is about 3.6 MB of unused build tooling in .output/server (5.3 MB β†’ 1.7 MB with this change). The CLI chunk also carries the CLI's own debug IDs, which the app can't upload, and that's the assertion that fails.

Removing the root withSentry export is breaking (#25915, v12), and lazy imports are off the table. So sentrySolidStart() now adds a sentry-solidstart-runtime export condition to server environments. The exports map resolves that condition to the existing server entry, which is the same as today's minus withSentry. SolidStart 1's app.config.ts never sets the condition, so it still gets withSentry.

How to review: Start with the exports change in package.json, then makeServerEntryPlugin. Locally, solidstart-2 (including the tunnel-basepath dev variant) and solidstart pass against CI tarballs.

Unsure about: Whether a custom export condition is the shape we want here, versus living with the bloat until v12. The plugin only extends conditions that are already set, because Vite would otherwise replace its defaults. Nitro and SolidStart always set them for their server environments. Separately, the Rolldown behaviour seems worth an upstream issue.

via Francesco Gringl-Novy.

--

View Session [Sentry]

…undles

The root server entry still re-exports the deprecated SolidStart 1 `withSentry`, which pulls
`@sentry/bundler-plugins` and with it the Sentry CLI and oxc-parser into the Nitro server graph.
Since the CLI bump to 0.49 (code-split ESM with dynamic imports), Rolldown emits the CLI's chunks
even after tree-shaking the code that imports them, and Nitro traces oxc-parser's native binding.

`sentrySolidStart()` now adds a `sentry-solidstart-runtime` export condition to server
environments, which resolves `@sentry/solidstart` to the server entry without `withSentry`.

Co-Authored-By: Francesco Gringl-Novy <francesco.novy@sentry.io>
@github-actions

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

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report πŸ“¦

Compared: 9cc81f6 (PR test merge using develop at 15f3d8d)

Against: 15f3d8d (develop) Β· base run #65640

βœ… Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 29.96 kB - -
@sentry/browser - with treeshaking flags 28.12 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.01 kB - -
@sentry/browser (incl. Tracing) 52.34 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.34 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.31 kB - -
@sentry/browser (incl. Tracing, Replay) 92.74 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.4 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.47 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.46 kB - -
@sentry/browser (incl. Feedback) 47.56 kB - -
@sentry/browser (incl. sendFeedback) 35.05 kB - -
@sentry/browser (incl. FeedbackAsync) 40.16 kB - -
@sentry/browser (incl. Metrics) 31.53 kB - -
@sentry/browser (incl. Logs) 31.81 kB - -
@sentry/browser (incl. Metrics & Logs) 32.5 kB - -
@sentry/react 31.82 kB - -
@sentry/react (incl. Tracing) 54.79 kB - -
@sentry/vue 38.37 kB - -
@sentry/vue (incl. Tracing) 55.36 kB - -
@sentry/svelte 29.98 kB - -
@sentry/remix (Remix 3 client bundle) 57.95 kB - -
CDN Bundle 31.76 kB - -
CDN Bundle (incl. Tracing) 52.92 kB - -
CDN Bundle (incl. Logs, Metrics) 34.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.43 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.03 kB - -
CDN Bundle (incl. Tracing, Replay) 91.21 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.32 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.91 kB - -
CDN Bundle - uncompressed 92.88 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.13 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.4 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.91 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.3 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.15 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.92 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.61 kB - -
@sentry/nextjs (client) 57.77 kB - -
@sentry/sveltekit (client) 52.86 kB - -
@sentry/core/server 44.51 kB - -
@sentry/core/browser 14.02 kB - -
@sentry/node 157.8 kB +0.02% +16 B πŸ”Ί
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.31 kB - -
@sentry/node - without tracing 97.23 kB +0.02% +18 B πŸ”Ί
@sentry/node - without channel injection 138.13 kB +0.02% +20 B πŸ”Ί
@sentry/aws-serverless 106.08 kB +0.03% +23 B πŸ”Ί
@sentry/cloudflare (withSentry) - minified 203.81 kB - -
@sentry/cloudflare (withSentry) 506.45 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 225.49 kB - -

View base workflow run

@mydea
mydea requested a review from andreiborza November 11, 2026 10:35
@mydea
mydea marked this pull request as ready for review November 11, 2026 10:35
@mydea
mydea requested review from a team and stephanie-anderson November 11, 2026 10:35
@mydea
mydea requested a review from a team as a code owner November 11, 2026 10:35
@mydea
mydea requested review from chargome and s1gr1d and removed request for a team November 11, 2026 10:36
@mydea
mydea merged commit 71da049 into develop Nov 11, 2026
60 checks passed
@mydea
mydea deleted the fix/solidstart-runtime-entry branch November 11, 2026 10:42
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.

2 participants