fix(nitro): support process.dev #3601)

This commit is contained in:
Daniel Roe 2022-03-11 10:47:18 +00:00 committed by GitHub
parent 7650f6c57d
commit 8c6af7da7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,6 +159,7 @@ export const getRollupConfig = (nitroContext: NitroContext) => {
...Object.fromEntries([';', '(', '{', '}', ' ', '\t', '\n'].map(d => [`${d}global.`, `${d}globalThis.`])),
'process.server': 'true',
'process.client': 'false',
'process.dev': String(nitroContext._nuxt.dev),
'process.env.NUXT_NO_SSR': JSON.stringify(!nitroContext._nuxt.ssr),
'process.env.NUXT_STATIC_BASE': JSON.stringify(nitroContext._nuxt.staticAssets.base),
'process.env.NUXT_STATIC_VERSION': JSON.stringify(nitroContext._nuxt.staticAssets.version),