Repository navigation
Reduce production framework bundle size - #158
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
trueadm
marked this pull request as ready for review
July 18, 2026 10:50
# Conflicts: # packages/octane/src/compiler/compile.js # packages/octane/src/runtime.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dfec189. Configure here.
This branch was previously deployed
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.

Summary
ErrorBoundaryJSX to direct control-flow primitivesWhy
The benchmark chunks were being split, but broad runtime call edges kept optional feature graphs reachable inside the framework chunk. In particular, ordinary component/control-flow paths retained transition swaps, dynamic host handling, generic returned-value reconciliation, and generic attribute routing even when the application did not need them.
Bundle impact
Fresh normalized-minify builds against current
main:Weather total gzip falls from 41,175 B to 28,181 B (-31.6%). Its framework payload is now 2,194 B / 12.0% above Svelte instead of 15,060 B / 82.2% above.
Validation
pnpm test— 1,139 files / 11,087 tests passedpnpm typecheckpnpm format:checknode benchmarks/bench.mjs --record --ratios bundle-size— all 17 applicable ratio guards passedNote
Medium Risk
Touches core runtime (component slots, transitions, SSR try boundaries) and broad compiler lowering; behavior is heavily tested but regressions could affect hydration, Suspense, or ErrorBoundary reset flows.
Overview
Production builds drop optional runtime graphs from the framework chunk when apps never use them. Transition off-screen swaps install only when
startTransition()runs, so ordinary@if/component paths no longer retain the WIP/Suspense swap machinery.The compiler specializes more call sites: void components (including
memowrappers andif (!x) return nullguards) can usecomponentSlotVoidwith cross-module proof viafindVoidComponentImports; staticErrorBoundaryJSX lowers totryBlock/ssrTrywithpropagateSuspense; boolean and lowercasearia-*attrs emitsetBooleanAttribute/setAriaAttributeinstead of genericsetAttribute. Dynamic host tags and value-return reconciliation stay on the genericcomponentSlotpath.Bundle baselines, website benchmark ratios, tests, and a patch changeset are updated; weather-app framework gzip drops sharply (~39k → ~21k in the baseline).
Reviewed by Cursor Bugbot for commit acee214. Bugbot is set up for automated code reviews on this repo. Configure here.