diff --git a/packages/bridge/src/vite/vite.ts b/packages/bridge/src/vite/vite.ts index 3f5747d9fc..4b614e1a57 100644 --- a/packages/bridge/src/vite/vite.ts +++ b/packages/bridge/src/vite/vite.ts @@ -26,6 +26,10 @@ async function bundle (nuxt: Nuxt, builder: any) { mode: nuxt.options.dev ? 'development' : 'production', logLevel: 'warn', define: { + 'process.static': nuxt.options.target === 'static', + 'process.env.NODE_ENV': JSON.stringify(nuxt.options.dev ? 'development' : 'production'), + 'process.mode': JSON.stringify(nuxt.options.dev ? 'development' : 'production'), + 'process.target': JSON.stringify(nuxt.options.target), 'process.dev': nuxt.options.dev }, resolve: {