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: {
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
2024-07-28 14:29:05 +08:00
|
|
|
// mock代理目标地址
|
2025-03-07 08:18:45 +08:00
|
|
|
// target: 'https://api.xiaokang88.com/api/admin/',
|
|
|
|
|
target: 'http://localhost:18001/api/admin/',
|
|
|
|
|
// target: 'http://api.xiaokang88.com/api/admin/',
|
2024-07-13 21:00:31 +08:00
|
|
|
ws: true,
|
|
|
|
|
},
|
2025-07-19 16:47:52 +08:00
|
|
|
'/im-api': {
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/im-api/, ''),
|
|
|
|
|
// mock代理目标地址
|
|
|
|
|
// target: 'https://api.xiaokang88.com/api/admin/',
|
2025-12-24 16:19:23 +08:00
|
|
|
// target: 'https://api.ws.g.xiaokang88.com/api/',
|
|
|
|
|
target: 'http://localhost:12080/api/',
|
2025-07-19 16:47:52 +08:00
|
|
|
// target: 'http://api.xiaokang88.com/api/admin/',
|
|
|
|
|
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
|
|
|
});
|