@sentry/sveltekit bloats node_modules in a production build

Aperta
#25,215 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@chargome ci sta già lavorando.

Dal 9/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Bug SvelteKit
Is there an existing issue for this?
How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/sveltekit

SDK Version

11.4.0

Framework Version

@sveltejs/kit 2.70.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://stackblitz.com/edit/sveltejs-kit-template-default-zp5huzg7

@sveltejs/adapter-node requires node_modules (production dependencies only) to be deployed to the server. When using @sentry/sveltekit packages like @sentry/bundler-plugins end up on the server making deploys way bigger than needed. Is it possible to make the default behavior for @sentry/sveltekit being a dev dependency, and bundling only the needed node code to prevent dependency bloat? This would save ±130MB in the production deploy.

Real world example in my case is 208MB which could be 73MB by just ignoring @sentry/bundler-plugins in production installs. I'm already cheating by installing @sentry/node for production deps and @sentry/sveltekit only for dev deps.

Steps to Reproduce
  1. Setup SvelteKit app with @sveltejs/adapter-node
  2. Follow the @sentry/sveltekit setup steps
  3. Build app
  4. Clean npm production install (npm ci --omit dev)
  5. Inspect node_modules
Expected Result

Reasonable size of dependencies for compiled production applications.

Actual Result

130MB dependencies needed for compiling, not for running.

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Lingua principale
TypeScript
Stelle
8.8k
Fork
1.9k
Merge medio
1g 8h
PR unite (30g)
744

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-javascript

Tutte le issue di getsentry/sentry-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.