2024-07-29 00:19:26 +08:00
|
|
|
import { defineConfig } from '@vben/vite-config';
|
2024-05-19 21:20:42 +08:00
|
|
|
|
2024-07-13 21:00:31 +08:00
|
|
|
export default defineConfig(async () => {
|
|
|
|
|
return {
|
2024-07-29 00:19:26 +08:00
|
|
|
application: {},
|
2024-07-13 21:00:31 +08:00
|
|
|
vite: {
|
|
|
|
|
server: {
|
2026-01-23 17:13:48 +08:00
|
|
|
port: 14002,
|
2024-07-13 21:00:31 +08:00
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
2024-07-28 14:29:05 +08:00
|
|
|
// mock代理目标地址
|
2025-05-12 16:19:27 +08:00
|
|
|
// target: 'http://localhost:5320/api',
|
2026-08-10 13:58:01 +08:00
|
|
|
target: 'http://127.0.0.1:18006/api/',
|
2024-07-13 21:00:31 +08:00
|
|
|
ws: true,
|
|
|
|
|
},
|
2024-05-19 21:20:42 +08:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-07-13 21:00:31 +08:00
|
|
|
};
|
2024-05-19 21:20:42 +08:00
|
|
|
});
|