Files
xk-admin/apps/web-antd/vite.config.mts

33 lines
1005 B
TypeScript
Raw Permalink Normal View History

import { defineConfig } from '@vben/vite-config';
2024-05-19 21:20:42 +08:00
export default defineConfig(async () => {
return {
application: {},
vite: {
server: {
proxy: {
'/api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// 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/',
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-05-19 21:20:42 +08:00
});