diff --git a/packages/vite/src/manifest.ts b/packages/vite/src/manifest.ts index 30f715cc3d8..b251a7f718d 100644 --- a/packages/vite/src/manifest.ts +++ b/packages/vite/src/manifest.ts @@ -52,4 +52,8 @@ export async function writeManifest (ctx: ViteBuildContext, css: string[] = []) await fse.writeFile(resolve(serverDist, 'client.manifest.json'), JSON.stringify(manifest, null, 2), 'utf8') await fse.writeFile(resolve(serverDist, 'client.manifest.mjs'), 'export default ' + JSON.stringify(manifest, null, 2), 'utf8') + + if (!ctx.nuxt.options.dev) { + await fse.rm(resolve(clientDist, 'manifest.json'), { force: true }) + } }