mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
fix(nitro): replace global.
in fewer instances (#3107)
This commit is contained in:
parent
790a54897a
commit
22e6c857f6
@ -156,7 +156,7 @@ export const getRollupConfig = (nitroContext: NitroContext) => {
|
|||||||
values: {
|
values: {
|
||||||
'process.env.NODE_ENV': nitroContext._nuxt.dev ? '"development"' : '"production"',
|
'process.env.NODE_ENV': nitroContext._nuxt.dev ? '"development"' : '"production"',
|
||||||
'typeof window': '"undefined"',
|
'typeof window': '"undefined"',
|
||||||
'global.': 'globalThis.',
|
...Object.fromEntries([';', '(', '{', '}', ' ', '\t', '\n'].map(d => [`${d}global.`, `${d}globalThis.`])),
|
||||||
'process.server': 'true',
|
'process.server': 'true',
|
||||||
'process.client': 'false',
|
'process.client': 'false',
|
||||||
'process.env.NUXT_NO_SSR': JSON.stringify(!nitroContext._nuxt.ssr),
|
'process.env.NUXT_NO_SSR': JSON.stringify(!nitroContext._nuxt.ssr),
|
||||||
|
Loading…
Reference in New Issue
Block a user