vite.config.ts 923 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { defineApplicationConfig } from '@vben/vite-config';
  2. export default defineApplicationConfig({
  3. overrides: {
  4. optimizeDeps: {
  5. include: [
  6. 'echarts/core',
  7. 'echarts/charts',
  8. 'echarts/components',
  9. 'echarts/renderers',
  10. 'qrcode',
  11. '@iconify/iconify',
  12. 'ant-design-vue/es/locale/zh_CN',
  13. 'ant-design-vue/es/locale/en_US',
  14. ],
  15. },
  16. server: {
  17. proxy: {
  18. '/basic-api': {
  19. target: 'http://localhost:3000',
  20. changeOrigin: true,
  21. ws: true,
  22. rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
  23. // only https
  24. // secure: false
  25. },
  26. '/upload': {
  27. target: 'http://localhost:3300/upload',
  28. changeOrigin: true,
  29. ws: true,
  30. rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
  31. },
  32. },
  33. },
  34. },
  35. });