Repository navigation
perf(build): split the vendor chunk by the pages that use it - #522
Merged
Merged
Conversation
vendor-shared held 692 kB raw on every page, including reka-ui menus, selects and hover cards that only some pages open. What the app entry imports stays in vendor-shared; the rest splits by the set of pages importing it.
Collaborator
Author
|
Agent check (Claude Code, Harlan Agent Kit), since CI cannot cover it:
|
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.
❓ Type of change
📚 Description
Every page preloaded one
vendor-sharedchunk of 692 kB raw. It held the reka-ui menus, selects, hover cards and dialogs that only some pages open, beside the Vue runtime that every page needs.The group now has two parts.
vendor-sharedkeeps what the app entry imports, through Rolldown's$initialtag.vendor-lazytakes the rest and splits it by the set of pages that import each module (entriesAware), folding sets under 20 kB into a neighbour. A page now loads only the vendor code its own components use.JavaScript each launch page preloads, from local
pnpm buildoutput againstmainat 6bd14f7://skills/demos/skills/trending/gh/anthropics/skills/frontend-design/cli/developersThe trade is 4 to 8 more files per page, which crawl efficiency counts as a crawl cost. A 60 kB fold threshold gave no smaller page and more files, so 20 kB stays.