vue-vben-admin/apps/web-antd/vite.config.mts
vertoryao d12ea7dd83 refactor(@vben/web-antd): 调整 API 路由和请求配置
- 移除未使用的 repository API 导出
- 优化 PPT 和 Spider 视图中的数据处理
- 调整请求客户端的默认超时时间
- 更新 Vite 配置中的代理设置
2025-05-05 01:52:39 +08:00

35 lines
910 B
TypeScript

import { defineConfig } from '@vben/vite-config';
export default defineConfig(async () => {
return {
application: {},
vite: {
server: {
proxy: {
'/api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// mock代理目标地址
target: 'http://localhost:8081/api',
ws: true,
},
'/static': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/static/, ''),
target: 'http://47.112.173.8:6802',
},
'/static/*.docx': {
changeOrigin: true,
target: 'http://47.112.173.8:6805',
},
'/v1': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1/, ''),
target: 'http://localhost:8081/v1',
},
},
},
},
};
});