vue-vben-admin/apps/web-antd/vite.config.mts
vertoryao 8d17c6eb9f feat(@vben/web-antd): 实现模板动态加载调整 API 地址并优化爬虫功能
- 修改生产环境 API 地址为本地地址- 更新爬虫功能相关代码,增加 markdown-it 依赖
-调整 Vite 配置中的代理目标地址
- 优化工作流视图中的爬虫运行逻辑
2025-06-12 16:16:40 +08:00

51 lines
1.6 KiB
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://172.16.35.190:9090/api',
// target: 'http://43.139.10.64:8082/api',
target: 'http://localhost:8081/api',
// target: 'http://192.168.3.238:8081/api',
ws: true,
},
'/files': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/files/, ''),
target: 'http://47.112.173.8:6800/files/',
},
'/guangzhou': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/guangzhou/, ''),
target: 'http://47.112.173.8:6800/',
},
'/pptx': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/pptx/, ''),
target: 'http://47.112.173.8:6800/',
},
'/spider': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/spider/, ''),
target: 'http://47.112.173.8:6806/static',
},
'/v1': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1/, ''),
target: 'http://localhost:8081/v1',
// target: 'http://43.139.10.64:8082/v1',
// target: 'http://192.168.3.238:8081/v1',
},
},
},
},
};
});