Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,12 +795,29 @@ export default defineNuxtConfig({
// imports with it, and its ContentRenderer imports every content
// component, so the Skill card, the package setup form and zod
// (through that form) rode in this chunk on every page.
//
// Two groups, so a page loads only the vendor code it uses.
// `vendor-shared` holds what the app entry imports, which every
// page runs. `vendor-lazy` holds the rest, such as the reka-ui
// menus, selects and hover cards only some pages open. It splits
// by the set of pages that import each module, and folds sets
// under 20 kB into a neighbour, so a launch page gains 4 to 8
// files. One chunk held 692 kB raw on every page.
groups: [
{
name: 'vendor-shared',
test: (id: string) => id.includes('node_modules') && !LAZY_ONLY_VENDOR.test(id),
tags: ['$initial'],
minShareCount: 2,
maxModuleSize: 8 * 1024,
},
{
name: 'vendor-lazy',
test: (id: string) => id.includes('node_modules') && !LAZY_ONLY_VENDOR.test(id),
minShareCount: 2,
maxModuleSize: 8 * 1024,
entriesAware: true,
entriesAwareMergeThreshold: 20 * 1024,
},
],
},
Expand Down
Loading