1
0

vite.config.mts 439 B

1234567891011121314151617181920
  1. import { defineConfig } from '@vben/vite-config';
  2. export default defineConfig(async () => {
  3. return {
  4. application: {},
  5. vite: {
  6. server: {
  7. proxy: {
  8. '/api': {
  9. changeOrigin: true,
  10. rewrite: (path) => path.replace(/^\/api/, ''),
  11. // mock代理目标地址
  12. target: 'http://localhost:5320/api',
  13. ws: true,
  14. },
  15. },
  16. },
  17. },
  18. };
  19. });