vite.config.mts 634 B

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