23 lines
514 B
TypeScript
23 lines
514 B
TypeScript
import { defineConfig } from '@vben/vite-config';
|
|
|
|
export default defineConfig(async () => {
|
|
return {
|
|
application: {},
|
|
vite: {
|
|
server: {
|
|
port: 14002,
|
|
proxy: {
|
|
'/api': {
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
// mock代理目标地址
|
|
// target: 'http://localhost:5320/api',
|
|
target: 'http://127.0.0.1:15002/api/',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|