|
@@ -0,0 +1,57 @@
|
|
|
+// vite.config.ts
|
|
|
+import { defineApplicationConfig } from "file:///Users/yanhuaguo/work/golang/src/ascrm/wechat-ui/internal/vite-config/dist/index.mjs";
|
|
|
+
|
|
|
+export default defineApplicationConfig({
|
|
|
+ overrides: {
|
|
|
+ optimizeDeps: {
|
|
|
+ include: [
|
|
|
+ 'echarts/core',
|
|
|
+ 'echarts/charts',
|
|
|
+ 'echarts/components',
|
|
|
+ 'echarts/renderers',
|
|
|
+ '@iconify/iconify',
|
|
|
+ 'ant-design-vue/es/locale/zh_CN',
|
|
|
+ 'ant-design-vue/es/locale/en_US',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ server: {
|
|
|
+ proxy: {
|
|
|
+ "/api":{
|
|
|
+ target: 'http://localhost:19101',
|
|
|
+ changeOrigin: true,
|
|
|
+ ws: true,
|
|
|
+ rewrite: (path) => path.replace(new RegExp(`^/api`), ''),
|
|
|
+ },
|
|
|
+ '/sys-api': {
|
|
|
+ target: 'http://localhost:9100',
|
|
|
+ changeOrigin: true,
|
|
|
+ ws: true,
|
|
|
+ rewrite: (path) => path.replace(new RegExp(`^/sys-api`), ''),
|
|
|
+ // only https
|
|
|
+ // secure: false
|
|
|
+ },
|
|
|
+ '/fms-api': {
|
|
|
+ target: 'http://localhost:9102',
|
|
|
+ changeOrigin: true,
|
|
|
+ ws: true,
|
|
|
+ rewrite: (path) => path.replace(new RegExp(`^/fms-api`), ''),
|
|
|
+ },
|
|
|
+ '/mms-api': {
|
|
|
+ target: 'http://localhost:9104',
|
|
|
+ changeOrigin: true,
|
|
|
+ ws: true,
|
|
|
+ rewrite: (path) => path.replace(new RegExp(`^/mms-api`), ''),
|
|
|
+ },
|
|
|
+ '/wechat-api': {
|
|
|
+ target: 'http://localhost:19101',
|
|
|
+ changeOrigin: true,
|
|
|
+ ws: true,
|
|
|
+ rewrite: (path) => path.replace(new RegExp(`^/wechat-api`), ''),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ warmup: {
|
|
|
+ clientFiles: ['./index.html', './src/{views,components}/*'],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+});
|