Blame view

internal/vite-config/src/config/common.ts 546 Bytes
1
import { type UserConfig } from 'vite';
vben authored
2
3
import UnoCSS from 'unocss/vite';
import { presetTypography, presetUno } from 'unocss';
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

const commonConfig: UserConfig = {
  server: {
    host: true,
  },
  esbuild: {
    drop: ['console', 'debugger'],
  },
  build: {
    reportCompressedSize: false,
    chunkSizeWarningLimit: 1500,
    rollupOptions: {
      // TODO: Prevent memory overflow
      maxParallelFileOps: 3,
    },
  },
vben authored
20
21
22
23
24
  plugins: [
    UnoCSS({
      presets: [presetUno(), presetTypography()],
    }),
  ],
25
26
27
};

export { commonConfig };