René's URL Explorer Experiment


Title: @sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graph · Issue #23243 · getsentry/sentry-javascript · GitHub

Open Graph Title: @sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graph · Issue #23243 · getsentry/sentry-javascript

X Title: @sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graph · Issue #23243 · getsentry/sentry-javascript

Description: Summary @sentry/sveltekit's server entry point statically re-exports the Vite build plugin, so importing the SDK in server code instantiates and evaluates the entire build-time module graph — including @babel/core and ~200 of its files. ...

Open Graph Description: Summary @sentry/sveltekit's server entry point statically re-exports the Vite build plugin, so importing the SDK in server code instantiates and evaluates the entire build-time module graph — inclu...

X Description: Summary @sentry/sveltekit's server entry point statically re-exports the Vite build plugin, so importing the SDK in server code instantiates and evaluates the entire build-time module graph — i...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23243

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graph","articleBody":"## Summary\n\n`@sentry/sveltekit`'s **server** entry point statically re-exports the Vite build plugin, so importing the SDK in server code instantiates and evaluates the entire build-time module graph — including `@babel/core` and ~200 of its files.\n\nThis is deliberately *not* a request to move `@sentry/vite-plugin` out of `dependencies` — I've read getsentry/sentry-javascript#19360 and [#18215](\u003chttps://github.com/getsentry/sentry-javascript/issues/18215>) and understand the one-package decision. This is the narrower follow-up to what @Lms24 wrote in getsentry/sentry-javascript#19360:\n\n> Our Vite plugin should not be *used* at runtime and hence *not* be pulled into any JS bundles executed at runtime. If that's the case, it's likely a bug we need to fix.\n\nIt is pulled in, and the mechanism is a single static re-export.\n\n## The chain\n\n`build/esm/index.server.js:2` — the Node/`default` condition entry:\n\n```js\nexport { trackComponent } from './server/index.js';\nexport { sentrySvelteKit } from './vite/sentryVitePlugins.js';   // \u003c-- build plugin, from the runtime entry\nexport * from '@sentry/node';\n```\n\nFrom there every link is a top-level static ESM import:\n\n```\nbuild/esm/index.server.js:2      export { sentrySvelteKit } from './vite/sentryVitePlugins.js'\nbuild/esm/vite/sentryVitePlugins.js:7  import { makeCustomSentryVitePlugins } from './sourceMaps.js'\nbuild/esm/vite/sourceMaps.js:3   import { sentryVitePlugin } from '@sentry/vite-plugin'\n@sentry/vite-plugin  index.mjs:3 import { sentryCliBinaryExists } from '@sentry/bundler-plugin-core'\n@sentry/bundler-plugin-core index.mjs:1  import { transformAsync } from '@babel/core'\n```\n\nBecause these are static re-exports rather than lazy imports, they are part of the module graph and get evaluated when the entry is evaluated — no call to `sentrySvelteKit()` required.\n\n## Measurement\n\nNode v24.15.0, macOS, pnpm 11.16.0, 3 runs each. `cjs` counts `require.cache` keys after the dynamic import resolves:\n\n\u003c!-- linear:table-colwidths:200,200,200,200 -->\n| import | time | CJS modules loaded | of which `@babel/*` |\n| -- | -- | -- | -- |\n| `@sentry/node` (ESM entry) | 2.8 – 3.2 s | 168 | 0 |\n| `@sentry/sveltekit` (server entry) | 4.0 – 5.0 s | 392 | **201** |\n\nRepro:\n\n```js\n// probe.mjs, run with: node probe.mjs\nimport { createRequire } from 'node:module';\nconst require = createRequire(process.cwd() + '/');\nawait import('@sentry/sveltekit');\nconst loaded = Object.keys(require.cache);\nconsole.log(loaded.length, loaded.filter((p) => p.includes('/@babel/')).length);\n// -> 392 201\n```\n\nThe absolute timings are from a laptop and won't transfer to a serverless runtime, but the module counts are deterministic.\n\n## Impact we observed\n\nWith `@sveltejs/adapter-vercel`, SvelteKit leaves `@sentry/sveltekit` unbundled in the server output — it survives as a single bare `from \"@sentry/sveltekit\"` import in the chunk our logger lives in, and the logger is imported by essentially every repository and service. `@vercel/nft` then traces that specifier and, because it traces files rather than symbols, copies the whole reachable graph into the serverless function:\n\n* **156 packages / 2,743 files / 22 MB** in a single `.func`, including `@babel/core`, `@babel/traverse`, `@babel/parser`, `@babel/generator`, `@babel/types`, `caniuse-lite` (via babel's `browserslist`), `acorn` and `@sentry/bundler-plugin-core`\n* those 201 Babel files are then loaded on every cold start, per the measurement above\n\nNote this is the outcome @Lms24 suggested in getsentry/sentry-javascript#19360 as the mitigation (\"use tools like `@vercel/nft` to prune your runtime node modules\") — nft is already what runs here, and it can't help, because the reachability is real rather than incidental.\n\n## Suggested fix\n\nMove `sentrySvelteKit` off the runtime entry, e.g. to a dedicated `@sentry/sveltekit/vite` export used from `vite.config.ts`. That keeps the one-package installation story intact (no new package to publish, no version-skew risk) while keeping the build plugin out of the runtime graph.\n\nIf a breaking change to the `.` export isn't desirable, exposing it via a lazy accessor rather than a static re-export would also break the static edge.\n\n## Environment\n\n* `@sentry/sveltekit` 10.69.0\n* `@sveltejs/kit` 2.70.2, `@sveltejs/adapter-vercel` 6.3.4, `svelte` 5.56.8, `vite` 8.2.0\n* Node v24.15.0, pnpm 11.16.0","author":{"url":"https://github.com/MathiasWP","@type":"Person","name":"MathiasWP"},"datePublished":"2026-08-10T15:25:35Z","url":"https://github.com/getsentry/sentry-javascript/issues/23243"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:45032a4e-705b-28bf-f743-8e182cd0e189
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3BC:281ABB:416C2D:59FF73:6B046DEA
html-safe-noncebf69749d79e08dfa5428b3a3be156d15d3af20d38027e23b40826acea0d935b0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0JDOjI4MUFCQjo0MTZDMkQ6NTlGRjczOjZCMDQ2REVBIiwidmlzaXRvcl9pZCI6IjU3NTg3OTM2NzI0MTQyMjc5NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac18caf31bef2b2b7bb0037e32c99cfb367f371a6818ecaf4685cfc32688768c3b
hovercard-subject-tagissue:5111690580
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/23243/issue_layout
twitter:imagehttps://opengraph.githubassets.com/690c98adb160a733c5acad2a43ffaff805ca8ed26d7f328cb526ee63b92d718c/getsentry/sentry-javascript/issues/23243
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/690c98adb160a733c5acad2a43ffaff805ca8ed26d7f328cb526ee63b92d718c/getsentry/sentry-javascript/issues/23243
og:image:altSummary @sentry/sveltekit's server entry point statically re-exports the Vite build plugin, so importing the SDK in server code instantiates and evaluates the entire build-time module graph — inclu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMathiasWP
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/23243#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F23243
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F23243
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/23243
Reloadhttps://github.com/getsentry/sentry-javascript/issues/23243
Reloadhttps://github.com/getsentry/sentry-javascript/issues/23243
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests54 (54)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/23243
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/23243
#23247https://github.com/getsentry/sentry-javascript/pull/23247
@sentry/sveltekit: server entry statically re-exports the Vite plugin, pulling @babel/core into the runtime module graphhttps://github.com/getsentry/sentry-javascript/issues/23243#top
#23247https://github.com/getsentry/sentry-javascript/pull/23247
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
SvelteKithttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22SvelteKit%22
https://github.com/MathiasWP
MathiasWPhttps://github.com/MathiasWP
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243#issue-5111690580
#19360https://github.com/getsentry/sentry-javascript/issues/19360
#18215https://github.com/getsentry/sentry-javascript/issues/18215
@Lms24https://github.com/Lms24
#19360https://github.com/getsentry/sentry-javascript/issues/19360
@Lms24https://github.com/Lms24
#19360https://github.com/getsentry/sentry-javascript/issues/19360
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29231294878
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29231300242
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243#issuecomment-5242331808
Linear Codehttps://linear.app
JS-3340https://linear.app/getsentry/issue/JS-3340
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243
linear-codehttps://github.com/apps/linear-code
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
SvelteKithttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22SvelteKit%22
on Aug 10, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29231339645
https://github.com/logaretm
logaretmhttps://github.com/logaretm
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243#issuecomment-5249081063
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29260036513
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243
JPeer264https://github.com/JPeer264
JPeer264https://github.com/JPeer264
JPeer264https://github.com/JPeer264
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29264618617
logaretmhttps://github.com/logaretm
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#23247https://github.com/getsentry/sentry-javascript/pull/23247
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29295493641
pullhttps://github.com/apps/pull
on Aug 11, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29307629835
fix(sveltekit)!: Move `sentrySvelteKit` off the runtime entry to `@se…https://github.com/TheDegenerateDev5150/sentry-javascript/commit/4f70f75b735f060531e67803ad19ae0f36bbb7bc
https://docs.github.com/articles/closing-issues-via-commit-messages
4f70f75https://github.com/TheDegenerateDev5150/sentry-javascript/commit/4f70f75b735f060531e67803ad19ae0f36bbb7bc
JPeer264https://github.com/JPeer264
on Aug 12, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-29338541093
fix(sveltekit)!: Move `sentrySvelteKit` off the runtime entry to `@se…https://github.com/getsentry/sentry-javascript/commit/6463d8bfba9db3a5fd93573e92707454514140d0
https://docs.github.com/articles/closing-issues-via-commit-messages
6463d8bhttps://github.com/getsentry/sentry-javascript/commit/6463d8bfba9db3a5fd93573e92707454514140d0
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 23, 2026https://github.com/getsentry/sentry-javascript/issues/23243#issuecomment-5795077102
GitHub Actionshttps://help.github.com/en/actions
#23247https://github.com/getsentry/sentry-javascript/pull/23247
11.0.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/11.0.0
isaacshttps://github.com/isaacs
on Oct 29, 2026https://github.com/getsentry/sentry-javascript/issues/23243#event-34617039494
test(bundler-tests): Guard server runtime entries against build-time …https://github.com/getsentry/sentry-javascript/commit/a837f5a912aa8cc82e06ae410a02f1f2f209a88e
a837f5ahttps://github.com/getsentry/sentry-javascript/commit/a837f5a912aa8cc82e06ae410a02f1f2f209a88e
test(bundler-tests): Guard server runtime entries against build-time …https://github.com/getsentry/sentry-javascript/commit/8cbb9ca00de99004d43e9f2a12e5f36491fd7c99
8cbb9cahttps://github.com/getsentry/sentry-javascript/commit/8cbb9ca00de99004d43e9f2a12e5f36491fd7c99
test(bundler-tests): Guard server runtime entries against build-time …https://github.com/getsentry/sentry-javascript/commit/d045e1c26d128f5b9f29e1f5d497bd0df12310eb
d045e1chttps://github.com/getsentry/sentry-javascript/commit/d045e1c26d128f5b9f29e1f5d497bd0df12310eb
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/23243
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/23243
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
SvelteKithttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22SvelteKit%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.