Skip to content

build(ui): Keep chunk hashes stable across deploys - #127286

Merged
scttcper merged 4 commits into
masterfrom
scttcper/lazy-seer-quota-sidebar
Oct 13, 2026
Merged

scttcper merged 4 commits into
masterfrom
scttcper/lazy-seer-quota-sidebar

Conversation

@scttcper

@scttcper scttcper commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The sentry bundler plugin was adding SENTRY_RELEASE={id:"<commit sha>"} to the top of every chunk. Since the sha changes every deploy, every chunk got a new hash and everyone re-downloaded all of the JS even when nothing in it changed. We already pass release to Sentry.init, so the injected value wasn't used. This turns injection off.

Also moves echarts, zrender and echarts-for-react into their own echarts chunk so it only changes when we upgrade echarts.

The getsentry overrides load on every page, and the Seer quota sidebar
override was imported eagerly. It renders autofix, which pulls in the
Seer markdown embeds, which pull in the chart embed and echarts. That one
import was about half of the startup JS.

Load it with `lazy()` like the other heavy overrides. Its only caller is
the issue details sidebar, which already has the autofix code loaded, so
the new chunk is tiny.

startup JS goes from 2.19 MB to 1.30 MB gzipped, echarts no longer loads
on every page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 13, 2026
@scttcper scttcper changed the title perf(seer): Lazy load the Seer quota sidebar override build(ui): Lazy load the Seer quota sidebar override Oct 13, 2026
scttcper and others added 2 commits October 13, 2026 11:56
echarts, zrender and echarts-for-react load on almost every page. Without
a named group they land in whatever chunk rspack builds from the chunk
sets that use them, and that grouping shifts as app code changes.

Pin them to a single `echarts` chunk so its hash only changes when we
upgrade echarts. 280K gzipped, nothing else in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundler plugin was prepending `SENTRY_RELEASE={id:"<sha>"}` to every
chunk. The commit sha changes every deploy, so every chunk hash changed
too and everyone re-downloaded all of the JS, even code that didn't change.

The SDK already sets `release` from the build env or the server config, so
the injected global wasn't used.

two builds of the same code with different releases went from 1,784 of
1,787 chunks renamed to 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scttcper scttcper changed the title build(ui): Lazy load the Seer quota sidebar override perf(build): Keep chunk hashes stable across deploys Oct 13, 2026
Reverts the lazy load from 854d647, leaving that for a separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scttcper scttcper changed the title perf(build): Keep chunk hashes stable across deploys build(ui): Keep chunk hashes stable across deploys Oct 13, 2026
@scttcper
scttcper marked this pull request as ready for review October 13, 2026 19:03
@scttcper
scttcper requested a review from a team October 13, 2026 19:03
Comment thread rsbuild.config.ts
maxAsyncRequests: 10, // (default: 30)
cacheGroups: localeChunkGroups,
cacheGroups: {
...localeChunkGroups,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is localeChunkGroups used anywhere else?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, seems not. but it's locale-specific. cool cool

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that handles splitting the locales into lazy chunks

@scttcper
scttcper merged commit 01cd752 into master Oct 13, 2026
78 checks passed
@scttcper
scttcper deleted the scttcper/lazy-seer-quota-sidebar branch October 13, 2026 19:54

This branch was successfully deployed

1 active deployment
Preview — 1ba5b4b9 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants