1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| import UnoCSS from 'unocss/vite';
| import { type UserConfig } from 'vite';
|
| const commonConfig: (mode: string) => UserConfig = (mode) => ({
| server: {
| host: true,
| },
| esbuild: {
| drop: mode === 'production' ? ['console', 'debugger'] : [],
| },
| build: {
| reportCompressedSize: false,
| chunkSizeWarningLimit: 1500,
| rollupOptions: {
| // TODO: Prevent memory overflow
| maxParallelFileOps: 3,
| },
| },
| plugins: [UnoCSS()],
| });
|
| export { commonConfig };
|
|