diff --git a/apps/minifront/vite.config.ts b/apps/minifront/vite.config.ts index 2bd319b53b..c452c49c52 100644 --- a/apps/minifront/vite.config.ts +++ b/apps/minifront/vite.config.ts @@ -6,9 +6,11 @@ import basicSsl from '@vitejs/plugin-basic-ssl'; import { commitInfoPlugin } from './src/utils/commit-info-vite-plugin'; import polyfillNode from 'vite-plugin-node-stdlib-browser'; -export default defineConfig({ - define: { 'globalThis.__DEV__': 'import.meta.env.DEV' }, - clearScreen: false, - base: './', - plugins: [polyfillNode(), react(), basicSsl(), commitInfoPlugin()], +export default defineConfig(({ mode }) => { + return { + define: { 'globalThis.__DEV__': mode === 'development' }, + clearScreen: false, + base: './', + plugins: [polyfillNode(), react(), basicSsl(), commitInfoPlugin()], + }; });