vite.config.ts 737 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import legacy from '@vitejs/plugin-legacy'
  4. import path from 'path'
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. plugins: [
  8. vue(),
  9. legacy({
  10. polyfills: ['es.promise.finally', 'es/map', 'es/set'],
  11. modernPolyfills: ['es.promise.finally']
  12. })
  13. ],
  14. server: {
  15. port: 3000,
  16. cors: true,
  17. host: '0.0.0.0',
  18. proxy: {
  19. '/v1': {
  20. // target: 'http://8.136.199.33:8608',
  21. target: 'https://charttest.hzinsights.com',
  22. changeOrigin: true,
  23. rewrite: (path) => path.replace(/^\/v1/, '/v1')
  24. }
  25. },
  26. },
  27. build: {
  28. outDir: 'horz_chart',
  29. },
  30. resolve: {
  31. alias: {
  32. '@': path.resolve(__dirname, './src')
  33. },
  34. },
  35. })