Skip to content

fix(sveltekit): Move sentrySvelteKit off the runtime entry to @sentry/sveltekit/vite - #23247

Draft
logaretm wants to merge 1 commit into
developfrom
awad/sveltekit-vite-plugin-subpath-export
Draft

fix(sveltekit): Move sentrySvelteKit off the runtime entry to @sentry/sveltekit/vite#23247
logaretm wants to merge 1 commit into
developfrom
awad/sveltekit-vite-plugin-subpath-export

Conversation

@logaretm

@logaretm logaretm commented Aug 11, 2026

Copy link
Copy Markdown
Member

Moves the sentrySvelteKit Vite plugin off the main @sentry/sveltekit entry and behind a dedicated @sentry/sveltekit/vite subpath export.

This matches the layout @sentry/solidstart and @sentry/tanstackstart-react already use.

This is a breaking change to the public API, so I added an entry into the v11 migration guide.

closes #23243

…try/sveltekit/vite`

The server entry statically re-exported the Vite build plugin, pulling the
build-time module graph (`@sentry/vite-plugin`, and through it `@babel/core`)
into the runtime graph on any server-side import. Serverless bundlers that
trace by reachability (`@vercel/nft`) then copied all of it into the function.

Expose the plugin via a dedicated `@sentry/sveltekit/vite` subpath instead, so
it is never reachable from the server entry.
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.35 kB - -
@sentry/browser - with treeshaking flags 28.52 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.85 kB - -
@sentry/browser (incl. Tracing) 48.61 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.62 kB - -
@sentry/browser (incl. Tracing, Profiling) 53.46 kB - -
@sentry/browser (incl. Tracing, Replay) 88.04 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.45 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.77 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.45 kB - -
@sentry/browser (incl. Feedback) 47.69 kB - -
@sentry/browser (incl. sendFeedback) 35.18 kB - -
@sentry/browser (incl. FeedbackAsync) 40.33 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.66 kB - -
@sentry/browser (incl. Metrics & Logs) 32.34 kB - -
@sentry/react 32.14 kB - -
@sentry/react (incl. Tracing) 50.82 kB - -
@sentry/vue 35.45 kB - -
@sentry/vue (incl. Tracing) 50.59 kB - -
@sentry/svelte 30.38 kB - -
CDN Bundle 31.61 kB - -
CDN Bundle (incl. Tracing) 48.92 kB - -
CDN Bundle (incl. Logs, Metrics) 33.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.38 kB - -
CDN Bundle (incl. Tracing, Replay) 86.49 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.18 kB - -
CDN Bundle - uncompressed 93.95 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.92 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.78 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.34 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.17 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.7 kB - -
@sentry/nextjs (client) 53.38 kB - -
@sentry/sveltekit (client) 49.03 kB - -
@sentry/core/server 65.65 kB - -
@sentry/core/browser 51.98 kB - -
@sentry/node 118.46 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.57 kB - -
@sentry/aws-serverless 91.94 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 214.7 kB - -
@sentry/cloudflare (withSentry) 530.37 kB - -

View base workflow run

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.

@sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graph

1 participant