vite.config.mts 466 B

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