chore: update

pull/707/head
Anthony Fu 3 years ago
parent 3117cda0d7
commit 5249922187

@ -215,6 +215,17 @@ export async function createVitePressPlugin(
delete bundle[name] delete bundle[name]
} }
} }
// in Vite v3
// we generate a fake package.json to make the output `.js` as ESM
// @ts-ignore
if (config.ssr?.format === 'esm') {
this.emitFile({
type: 'asset',
fileName: 'package.json',
source: '{ "private": true, "type": "module" }'
})
}
} else { } else {
// client build: // client build:
// for each .md entry chunk, adjust its name to its correct path. // for each .md entry chunk, adjust its name to its correct path.

Loading…
Cancel
Save