Any way to split clientBundle into smaller chunks?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
My icons bundle size is 1008KB. Mostly because of using icons from the "flags" collection, which is quite heavy.
I don't know if it's feasible, but a way to automatically split the bundled icons into smaller chunk would be awesome. Example in nuxt.config.ts:
icon: {
clientBundle: {
icons: iconsToBundle,
scan: false,
sizeLimitKb: 1100,
splitLimitKb: 500, // 500 by default
}
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the clientBundle configuration shown in nuxt.config.ts and identify where the icons list is bundled. Determine whether automatic chunking can honor the proposed splitLimitKb while preserving the existing sizeLimitKb behavior. Done should include a documented configuration and a working example for the flags collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100