Sign in

canrd-outside / order-erp-front · Files

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 1
  • Labels
  • Wiki
  • order-erp-front
  • internal
  • vite-config
  • src
  • config
  • common.ts
  • perf: Refactor vite configuration
    5e99463c
    vben authored
    2023-04-05 00:20:48 +0800  
    Browse Code ยป
common.ts 369 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import { type UserConfig } from 'vite';

const commonConfig: UserConfig = {
  server: {
    host: true,
  },
  esbuild: {
    drop: ['console', 'debugger'],
  },
  build: {
    reportCompressedSize: false,
    chunkSizeWarningLimit: 1500,
    rollupOptions: {
      // TODO: Prevent memory overflow
      maxParallelFileOps: 3,
    },
  },
};

export { commonConfig };