24 lines
517 B
TypeScript
24 lines
517 B
TypeScript
import { defineConfig } from '@vben/vite-config';
|
|
|
|
export default defineConfig(async () => {
|
|
return {
|
|
application: {},
|
|
vite: {
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
changeOrigin: true,
|
|
target: 'http://localhost:5211',
|
|
ws: true,
|
|
},
|
|
'/file-api': {
|
|
changeOrigin: true,
|
|
target: 'http://localhost:8080',
|
|
rewrite: (path) => path.replace(/^\/file-api/, ''),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|