@sentry/sveltekit bloats node_modules in a production build

Aberta
#25,215 2 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@chargome já está trabalhando nisso.

Desde 9/10/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
8.8k
Forks
1.9k
Merge médio
1d 8h
PRs com merge (30d)
744

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de getsentry/sentry-javascript

Todas as issues de getsentry/sentry-javascript

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.