fix(build): emit lean chunks after vite has done processing

closes #4737

Co-authored-by: green <green@sapphi.red>
pull/4739/head
Divyansh Singh 4 months ago
parent 827259b0d5
commit 26cb685adf

@ -353,14 +353,18 @@ export async function createVitePressPlugin(
return null
},
generateBundle(_options, bundle) {
if (ssr) {
this.emitFile({
type: 'asset',
fileName: 'package.json',
source: '{ "private": true, "type": "module" }'
})
} else {
generateBundle: {
order: ssr ? null : 'post',
handler(_options, bundle) {
if (ssr) {
this.emitFile({
type: 'asset',
fileName: 'package.json',
source: '{ "private": true, "type": "module" }'
})
return
}
// client build:
// for each .md entry chunk, adjust its name to its correct path.
for (const name in bundle) {

Loading…
Cancel
Save