mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
chore(nitro): provide process.client and process.server
They should be handled in vite/webpack step but just in case
This commit is contained in:
parent
eee45396d1
commit
b6104c6e83
@ -132,6 +132,8 @@ export const getRollupConfig = (nitroContext: NitroContext) => {
|
|||||||
'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.',
|
'global.': 'globalThis.',
|
||||||
|
'process.server': 'true',
|
||||||
|
'process.client': 'false',
|
||||||
'process.env.ROUTER_BASE': JSON.stringify(nitroContext._nuxt.routerBase),
|
'process.env.ROUTER_BASE': JSON.stringify(nitroContext._nuxt.routerBase),
|
||||||
'process.env.PUBLIC_PATH': JSON.stringify(nitroContext._nuxt.publicPath),
|
'process.env.PUBLIC_PATH': JSON.stringify(nitroContext._nuxt.publicPath),
|
||||||
'process.env.NUXT_STATIC_BASE': JSON.stringify(nitroContext._nuxt.staticAssets.base),
|
'process.env.NUXT_STATIC_BASE': JSON.stringify(nitroContext._nuxt.staticAssets.base),
|
||||||
|
Loading…
Reference in New Issue
Block a user