-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
32 lines (30 loc) · 924 Bytes
/
Copy pathvite.config.ts
File metadata and controls
32 lines (30 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
const env = loadEnv(mode, (process as any).cwd(), '');
return {
plugins: [react()],
// Polyfill process.env with loaded env variables
define: {
'process.env': env,
},
build: {
outDir: 'dist',
chunkSizeWarningLimit: 1600,
rollupOptions: {
output: {
manualChunks: {
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
'vendor-ui': ['recharts', 'lucide-react', '@google/genai']
}
}
}
},
server: {
host: '0.0.0.0', // Listen on all network interfaces
port: 3000, // Match Supabase Site URL
strictPort: true // Do not auto-switch to 3001 if 3000 is taken.
}
};
});