2024-07-28 16:19:26 +00:00
|
|
|
import { defineConfig } from '@vben/vite-config';
|
2024-05-19 13:20:42 +00:00
|
|
|
|
2024-07-13 13:00:31 +00:00
|
|
|
export default defineConfig(async () => {
|
|
|
|
return {
|
2024-07-28 16:19:26 +00:00
|
|
|
application: {},
|
2024-07-13 13:00:31 +00:00
|
|
|
vite: {
|
|
|
|
server: {
|
|
|
|
proxy: {
|
|
|
|
'/api': {
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
2024-07-28 06:29:05 +00:00
|
|
|
// mock代理目标地址
|
2024-07-13 13:00:31 +00:00
|
|
|
target: 'http://localhost:5320/api',
|
|
|
|
ws: true,
|
|
|
|
},
|
2024-05-19 13:20:42 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-07-13 13:00:31 +00:00
|
|
|
};
|
2024-05-19 13:20:42 +00:00
|
|
|
});
|