Blame view

internal/vite-config/src/config/common.ts 535 Bytes
vben authored
1
import { presetTypography, presetUno } from 'unocss';
2
3
import UnoCSS from 'unocss/vite';
import { type UserConfig } from 'vite';
4
5
6
7
8
9

const commonConfig: UserConfig = {
  server: {
    host: true,
  },
  esbuild: {
10
    drop: ['debugger'],
11
12
13
14
15
16
17
18
19
  },
  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 };