vue-vben-admin/vite.config.ts

25 lines
628 B
TypeScript
Raw Normal View History

2023-04-05 00:20:48 +08:00
import { defineApplicationConfig } from '@vben/vite-config';
2021-04-07 23:14:51 +08:00
2023-04-05 00:20:48 +08:00
export default defineApplicationConfig({
overrides: {
2021-01-09 23:28:52 +08:00
server: {
2023-04-05 00:20:48 +08:00
proxy: {
'/basic-api': {
target: 'http://localhost:3000',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
// only https
// secure: false
},
'/upload': {
target: 'http://localhost:3300/upload',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
2020-12-29 23:37:40 +08:00
},
},
2020-10-16 22:03:44 +08:00
},
2023-04-05 00:20:48 +08:00
},
});