R5: bundle slimming — retarget the budget to the app, no code slimming #36
Reference in New Issue
Block a user
Delete Branch "feature/r5-bundle-budget"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
R5 — Bundle slimming (
PRERELEASE.md)Outcome: analysed → no code slimming warranted; the budget metric was retargeted to measure the app correctly. No app code change.
Analysis
dist(gzip + sourcemap attribution): the app bundle is already minified + tree-shaken and dominated by the Connect/FlatBuffers transport runtime + generated FB/PB bindings (~2/3 ofmain) + the Svelte runtime — irreducible within scope.bundle-size.mjssums every emitted chunk → zero total-size win, plus +N gateway fetches of latency on first navigation. Chunk-collapsing rejected too (keeps the stable Svelte runtime cacheable; HTTP/2 makes the extra preload negligible).Change
bundle-size.mjsnow measures per HTML entry with three independent gates:main) ≤ 100 KB — now 74.2landing.js); landing reported separately (~24.5 KB).ui/README.md.Verification
pnpm check(0 errors),pnpm test:unit(138 passed),pnpm build+node scripts/bundle-size.mjs(all 3 gates green). No functional change → e2e unaffected.