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
15 changes: 14 additions & 1 deletion packages/bundler-vite/src/plugins/mainPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,20 @@ import '@vuepress/client/app'
// also add hash to ssr entry file, so that users could build multiple sites in a single process
entryFileNames: `[name].[hash].mjs`,
}
: {}),
: {
manualChunks(id) {
// move known framework code into a stable chunk
if (
id.includes('plugin-vue:export-helper') ||
/node_modules\/@vuepress\/shared\//.test(id) ||
/node_modules\/vue(-router)?\//.test(id)
) {
return 'framework'
}

return undefined
},
}),
},
preserveEntrySignatures: 'allow-extension',
},
Expand Down