Skip to content

fix(bundler-plugins): Inject the release only into chunks that load at startup - #25541

Merged
timfish merged 2 commits into
developfrom
feat/bundler-plugins-release-entry-chunks
Oct 20, 2026
Merged

timfish merged 2 commits into
developfrom
feat/bundler-plugins-release-entry-chunks

Conversation

@timfish

@timfish timfish commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

The Rollup, Vite and webpack plugins added the SENTRY_RELEASE snippet to every JS chunk. On apps with many lazily loaded chunks that is a lot of repeated output, and the global only needs to exist before Sentry.init runs.

The release snippet now goes only into entry chunks and the chunks they reach through static imports. Debug ID and module metadata injection stay per chunk. esbuild already injects per entry point and does not change.

A plain chunk.isEntry check is not enough: Vite multi-page builds drop pure-import HTML facade chunks and put the app code in non-entry shared chunks. The Rollup plugin walks the chunk graph that renderChunk receives, and injects everywhere when no graph is available. The webpack plugin uses chunk.canBeInitial().

@timfish
timfish marked this pull request as ready for review October 19, 2026 19:42
@timfish
timfish requested a review from isaacs October 19, 2026 19:42
@anonrig

anonrig commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

thank you

@timfish
timfish requested a review from logaretm October 19, 2026 20:21
@timfish
timfish requested a review from nicohrubec October 20, 2026 11:53
@timfish
timfish merged commit 3d47e12 into develop Oct 20, 2026
538 of 542 checks passed
@timfish
timfish deleted the feat/bundler-plugins-release-entry-chunks branch October 20, 2026 12:01
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.

3 participants