fix(vite): remove client manifest.json from public dir (#7021)

This commit is contained in:
Daniel Roe 2022-08-29 10:37:53 +01:00 committed by GitHub
parent b386d4618c
commit af2835fa7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.json'), JSON.stringify(manifest, null, 2), 'utf8')
await fse.writeFile(resolve(serverDist, 'client.manifest.mjs'), 'export default ' + 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 })
}
} }