fix(nuxt): don't disable scripts in dev mode with experimental noScripts (#7745)

This commit is contained in:
Daniel Roe 2022-09-26 10:52:43 +01:00 committed by GitHub
parent 198576a741
commit 4c5048826c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
},
replace: {
'process.env.NUXT_NO_SSR': nuxt.options.ssr === false,
'process.env.NUXT_NO_SCRIPTS': !!nuxt.options.experimental.noScripts,
'process.env.NUXT_NO_SCRIPTS': !!nuxt.options.experimental.noScripts && !nuxt.options.dev,
'process.env.NUXT_INLINE_STYLES': !!nuxt.options.experimental.inlineSSRStyles,
'process.env.NUXT_PAYLOAD_EXTRACTION': !!nuxt.options.experimental.payloadExtraction,
'process.dev': nuxt.options.dev,