-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 823 Bytes
/
Copy pathvite.config.ts
File metadata and controls
35 lines (34 loc) · 823 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
33
34
35
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
optimizeDeps: {
exclude: ['lucide-react'],
include: ['react', 'react-dom', 'react-router-dom']
},
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom'],
router: ['react-router-dom'],
icons: ['lucide-react']
}
}
},
sourcemap: false, // Disable sourcemaps in production to reduce bundle size
minify: 'esbuild', // Use esbuild instead of terser for faster builds
target: 'esnext'
},
server: {
fs: {
strict: false
}
},
preview: {
// Configure preview server to handle SPA routing
host: true,
port: 4173
}
});