1
0

vite.config.ts 628 B

123456789101112131415161718192021222324
  1. import { defineApplicationConfig } from '@vben/vite-config';
  2. export default defineApplicationConfig({
  3. overrides: {
  4. server: {
  5. proxy: {
  6. '/basic-api': {
  7. target: 'http://localhost:3000',
  8. changeOrigin: true,
  9. ws: true,
  10. rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
  11. // only https
  12. // secure: false
  13. },
  14. '/upload': {
  15. target: 'http://localhost:3300/upload',
  16. changeOrigin: true,
  17. ws: true,
  18. rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
  19. },
  20. },
  21. },
  22. },
  23. });