Repository navigation
Keep production UI builds below the existing chunk limit - #95
Merged
Merged
Conversation
This was referenced Nov 14, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 16, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 19, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 21, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 22, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 23, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
Author
|
Still carried in the integration train and not upstream, so it continues as #245. |
pjeweb
added a commit
that referenced
this pull request
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The production build fails whenever one chunk grows past 1,159 kB, and the base is only about 2 kB below that. Almost any small UI addition now breaks the build: several open PRs (for example #77, #79 and #74) fail it on their own. The cause is that the bundler collects shared application code into a chunk named after the development tools, which aren't even shipped in production.
What
apps/frontend/README.mdexplains why production code must not get a manual chunk, and the size trade-off.How: the development tools are already removed from production builds, so I dropped their manual
devtoolschunk invite.config.tsand let the bundler split shared code where it naturally falls. The notification bundle check looked up locale chunks by prefix and would mistake a helper such asnetwork-speed-….jsfor thenetworklocale once those files appear, so it now matches the exact name plus hash.The trade-off: smaller chunks compress slightly worse. Total gzip grows by about 22 kB (about 2%) and the first page load by about 21 kB, both well under their existing budgets.
How to verify
Run the production frontend build: the warning check and the four gzip budgets pass.
scripts/ci/notification-bundle.test.tscovers the new name matching. Open the built app at phone and desktop width; navigation, theme and language switching work as before.Testing and limits
Risks
Chunk loading order changes, so a circular import could in theory surface as an initialization error at load time. The full suite and the browser smoke test didn't show one. Rolling back is restoring the four removed lines.
Checklist