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代理目标地址
|
|
|
|
target: 'http://localhost:8081/api',
|
|
|
|
ws: true,
|
|
|
|
},
|
2025-05-04 18:45:03 +08:00
|
|
|
'/static/*.docx': {
|
2025-05-05 01:52:39 +08:00
|
|
|
changeOrigin: true,
|
2025-05-04 18:45:03 +08:00
|
|
|
target: 'http://47.112.173.8:6805',
|
2025-05-05 01:52:39 +08:00
|
|
|
},
|
2025-05-06 01:46:24 +08:00
|
|
|
'/static/*.ppt': {
|
|
|
|
changeOrigin: true,
|
|
|
|
target: 'http://47.112.173.8:6802',
|
|
|
|
},
|
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/, ''),
|
|
|
|
target: 'http://localhost:8081/v1',
|
2025-05-04 18:45:03 +08:00
|
|
|
},
|
2025-05-02 22:08:36 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|