8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 827259b commit 26cb685Copy full SHA for 26cb685
src/node/plugin.ts
@@ -353,14 +353,18 @@ export async function createVitePressPlugin(
353
return null
354
},
355
356
- generateBundle(_options, bundle) {
357
- if (ssr) {
358
- this.emitFile({
359
- type: 'asset',
360
- fileName: 'package.json',
361
- source: '{ "private": true, "type": "module" }'
362
- })
363
- } else {
+ generateBundle: {
+ order: ssr ? null : 'post',
+ handler(_options, bundle) {
+ if (ssr) {
+ this.emitFile({
+ type: 'asset',
+ fileName: 'package.json',
+ source: '{ "private": true, "type": "module" }'
364
+ })
365
+ return
366
+ }
367
+
368
// client build:
369
// for each .md entry chunk, adjust its name to its correct path.
370
for (const name in bundle) {
0 commit comments