Repository navigation
build(frame): update Vite to 8.3 and measure lazy destinations by what they fetch - #95
Conversation
A destination's cost was its static graph minus its page's startup graph. Code it shares with the destination that opens it was charged again, even though that opener has always run first. Rolldown 1.2 places such shared code in the opener's chunk, so the Work code view read as 517 KB while it fetches 15 KB. The cost is now the graph minus what every way of opening the destination has certainly loaded: its page and the destinations on the way, intersected across openers.
Vite 8.3 loads its config natively and warns on extensionless relative imports, so the config modules name their .ts files.
Vite 8.3 brings Rolldown 1.2, which places code shared with a destination's opener in the opener's chunk. Measured against what is loaded when each destination opens, startup is unchanged (browser 365,843 bytes, panel 113,358) and 83 destinations record smaller sizes; eight rise by at most 116 bytes.
The hold on Vite 8.1 existed only for the 8.3 chunking change, which the bundle budgets now measure correctly.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe bundle budget calculation now excludes files loaded before a lazy destination opens. The PR adds tests, updates recorded budgets and documentation, upgrades Vite, and changes TypeScript configuration imports to use explicit extensions. ChangesLazy Bundle Budgets
Vite Build Configuration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Suggested labels: Merge Risk: ⚪ Minimal · up to The change adjusts how lazy-destination bundle budgets are measured and upgrades Vite. No concrete risk was found, and the reported checks and builds passed. 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Vite 8.3 (Rolldown 1.1.5 → 1.2.12) looked like a 32-budget regression; it isn't one at runtime.
What changed in Rolldown 1.2: code a lazy destination shares with the destination that opens it now goes into the opener's chunk. The opener has always run first, so opening the destination fetches only its own code. Our budget measured a destination against its page's startup graph only, so that shared code was charged again:
Measurement: a destination's cost is now its static graph minus what every way of opening it has certainly loaded: its page plus the destinations on the way, intersected across openers. Destinations no page reaches are charged their whole graph.
loadedBeforeOpeningis a pure function with unit tests (direct opener, chained opener, two openers, unreachable).Result with Vite 8.3:
Also:
.tsextensions; Vite 8.3 loads its config natively and warned.Verified:
pnpm run check(739),pnpm run build(no warnings), the TabRow, Appearance and NarrowChrome component tests in WebKit (7), and the dev server serving the browser page and its entry module.Summary by CodeRabbit