33 lines
796 B
TypeScript
33 lines
796 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: 'http://localhost:8081/api',
|
|
ws: true,
|
|
},
|
|
'/static/*.ppt': {
|
|
target: 'http://47.112.173.8:6802',
|
|
changeOrigin: true,
|
|
},
|
|
'/static/*.docx': {
|
|
target: 'http://47.112.173.8:6805',
|
|
changeOrigin: true,
|
|
},
|
|
'/v1': {
|
|
changeOrigin: true,
|
|
target: 'http://localhost:8081/v1',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|