2023-04-05 00:20:48 +08:00
|
|
|
import { defineApplicationConfig } from '@vben/vite-config';
|
2021-04-07 23:14:51 +08:00
|
|
|
|
2023-04-05 00:20:48 +08:00
|
|
|
export default defineApplicationConfig({
|
|
|
|
overrides: {
|
2023-04-06 22:47:39 +08:00
|
|
|
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',
|
|
|
|
],
|
|
|
|
},
|
2021-01-09 23:28:52 +08:00
|
|
|
server: {
|
2023-04-05 00:20:48 +08:00
|
|
|
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`), ''),
|
2020-12-29 23:37:40 +08:00
|
|
|
},
|
2020-12-22 22:13:03 +08:00
|
|
|
},
|
2024-03-05 13:05:26 +08:00
|
|
|
open: true, // 项目启动后,自动打开
|
2024-01-06 09:19:52 +08:00
|
|
|
warmup: {
|
|
|
|
clientFiles: ['./index.html', './src/{views,components}/*'],
|
|
|
|
},
|
2020-10-16 22:03:44 +08:00
|
|
|
},
|
2023-04-05 00:20:48 +08:00
|
|
|
},
|
|
|
|
});
|