vite.config.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. 'vxe-table/lib/locale/lang/zh-CN',
  15. 'vxe-table/es/locale/lang/en-US',
  16. ],
  17. },
  18. server: {
  19. proxy: {
  20. '/basic-api': {
  21. target: 'http://localhost:8080',
  22. changeOrigin: true,
  23. ws: true,
  24. rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
  25. // only https
  26. // secure: false
  27. },
  28. '/upload': {
  29. target: 'http://localhost:3300/upload',
  30. changeOrigin: true,
  31. ws: true,
  32. rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
  33. },
  34. },
  35. warmup: {
  36. clientFiles: ['./index.html', './src/{views,components}/*'],
  37. },
  38. },
  39. },
  40. });