diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 667258fad350..6cfc02f6fe67 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -346,6 +346,10 @@ export async function createVitePressPlugin( bundle[name + '-lean'] = { ...chunk, fileName: chunk.fileName.replace(/\.js$/, '.lean.js'), + preliminaryFileName: chunk.preliminaryFileName.replace( + /\.js$/, + '.lean.js' + ), code: chunk.code.replace(staticStripRE, `""`) }