fix(nuxt): only delete assets when building (#7486)

This commit is contained in:
Daniel Roe 2022-09-13 22:57:58 +01:00 committed by GitHub
parent addcb5cd47
commit 40d090745b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ async function initNuxt (nuxt: Nuxt) {
} }
// TODO: [Experimental] Avoid emitting assets when flag is enabled // TODO: [Experimental] Avoid emitting assets when flag is enabled
if (nuxt.options.experimental.noScripts) { if (nuxt.options.experimental.noScripts && !nuxt.options.dev) {
nuxt.hook('build:manifest', async (manifest) => { nuxt.hook('build:manifest', async (manifest) => {
for (const file in manifest) { for (const file in manifest) {
if (manifest[file].resourceType === 'script') { if (manifest[file].resourceType === 'script') {