@sentry/sveltekit bloats node_modules in a production build

オープン
#25,215 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@chargome がすでに取り組んでいます。

2026年10月9日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
TypeScript
スター
8.8k
フォーク
1.9k
平均マージ
1日 8時間
マージ済み PR(30日)
744

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-javascript のほかの issue

getsentry/sentry-javascript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。