vite.config.mts 577 B

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