Blame view

vite.config.ts 920 Bytes
1
import { defineApplicationConfig } from '@vben/vite-config';
Vben authored
2
3
4
export default defineApplicationConfig({
  overrides: {
vben authored
5
6
7
8
9
10
11
12
13
14
15
16
    optimizeDeps: {
      include: [
        'echarts/core',
        'echarts/charts',
        'echarts/components',
        'echarts/renderers',
        'qrcode',
        '@iconify/iconify',
        'ant-design-vue/es/locale/zh_CN',
        'ant-design-vue/es/locale/en_US',
      ],
    },
vben authored
17
    server: {
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      proxy: {
        '/basic-api': {
          target: 'http://localhost:3000',
          changeOrigin: true,
          ws: true,
          rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
          // only https
          // secure: false
        },
        '/upload': {
          target: 'http://localhost:3300/upload',
          changeOrigin: true,
          ws: true,
          rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
32
        },
33
      },
vben authored
34
    },
35
36
  },
});