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 63079bf commit ae0d52dCopy full SHA for ae0d52d
src/node/plugin.ts
@@ -366,15 +366,12 @@ export async function createVitePressPlugin(
366
pageToHashMap![chunk.name.toLowerCase()] = hash
367
368
// inject another chunk with the content stripped
369
- bundle[name + '-lean'] = {
370
- ...chunk,
+ this.emitFile({
+ type: 'asset',
371
+ name: name + '-lean',
372
fileName: chunk.fileName.replace(/\.js$/, '.lean.js'),
- preliminaryFileName: chunk.preliminaryFileName.replace(
373
- /\.js$/,
374
- '.lean.js'
375
- ),
376
- code: chunk.code.replace(staticStripRE, `""`)
377
- }
+ source: chunk.code.replace(staticStripRE, `""`)
+ })
378
379
// remove static markers from original code
380
chunk.code = chunk.code.replace(staticRestoreRE, '')
0 commit comments