admin-vben/apps/web-antd/vite.config.mts

21 lines
458 B
TypeScript
Raw Normal View History

import { defineConfig } from '@vben/vite-config';
2024-05-19 13:20:42 +00:00
export default defineConfig(async () => {
return {
application: {},
vite: {
server: {
proxy: {
2024-11-16 14:33:47 +00:00
'/admin-api': {
changeOrigin: true,
2024-11-16 14:33:47 +00:00
rewrite: (path) => path.replace(/^\/admin-api/, ''),
// mock代理目标地址
2024-11-16 14:33:47 +00:00
target: 'http://localhost:48080/admin-api',
ws: true,
},
2024-05-19 13:20:42 +00:00
},
},
},
};
2024-05-19 13:20:42 +00:00
});