2025-05-02 22:08:36 +08:00
|
|
|
import { defineConfig } from '@vben/vite-config';
|
|
|
|
|
|
|
|
export default defineConfig(async () => {
|
|
|
|
return {
|
|
|
|
application: {},
|
|
|
|
vite: {
|
|
|
|
server: {
|
|
|
|
proxy: {
|
|
|
|
'/api': {
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
|
|
// mock代理目标地址
|
2025-05-18 01:17:03 +08:00
|
|
|
target: 'http://localhost:8081/api',
|
|
|
|
// target: 'http://43.139.10.64:8082/api',
|
2025-05-12 19:52:53 +08:00
|
|
|
// target: 'http://192.168.3.238:8081/api',
|
2025-05-02 22:08:36 +08:00
|
|
|
ws: true,
|
|
|
|
},
|
2025-05-06 10:28:44 +08:00
|
|
|
'/docx': {
|
2025-05-05 01:52:39 +08:00
|
|
|
changeOrigin: true,
|
2025-05-06 10:28:44 +08:00
|
|
|
rewrite: (path) => path.replace(/^\/docx/, ''),
|
2025-05-12 15:39:43 +08:00
|
|
|
target: 'http://47.112.173.8:6805/static',
|
2025-05-05 01:52:39 +08:00
|
|
|
},
|
2025-05-18 01:17:03 +08:00
|
|
|
'/guangzhou': {
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/guangzhou/, ''),
|
|
|
|
target: 'http://47.112.173.8:6800/',
|
|
|
|
},
|
2025-05-06 10:28:44 +08:00
|
|
|
'/pptx': {
|
2025-05-06 01:46:24 +08:00
|
|
|
changeOrigin: true,
|
2025-05-06 10:28:44 +08:00
|
|
|
rewrite: (path) => path.replace(/^\/pptx/, ''),
|
|
|
|
target: 'http://47.112.173.8:6802/static',
|
2025-05-06 01:46:24 +08:00
|
|
|
},
|
2025-05-18 01:17:03 +08:00
|
|
|
'/spider': {
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/spider/, ''),
|
|
|
|
target: 'http://47.112.173.8:6806/static',
|
|
|
|
},
|
2025-05-05 01:52:39 +08:00
|
|
|
'/v1': {
|
2025-05-04 18:45:03 +08:00
|
|
|
changeOrigin: true,
|
2025-05-05 01:52:39 +08:00
|
|
|
rewrite: (path) => path.replace(/^\/v1/, ''),
|
2025-05-10 12:39:10 +08:00
|
|
|
// target: 'http://localhost:8081/v1',
|
|
|
|
target: 'http://43.139.10.64:8082/v1',
|
2025-05-12 19:52:53 +08:00
|
|
|
// target: 'http://192.168.3.238:8081/v1',
|
2025-05-04 18:45:03 +08:00
|
|
|
},
|
2025-05-02 22:08:36 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|