Skip to content

Commit

Permalink
check for vite dev mode (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 authored Jul 24, 2024
1 parent f123daa commit ae50230
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/minifront/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
};
});

0 comments on commit ae50230

Please sign in to comment.