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