vite.config.ts 800 B

12345678910111213141516171819202122232425262728293031323334353637
  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. targets: ['> 1%, last 1 version, ie >= 11'],
  11. additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
  12. polyfills: ['es.promise.finally', 'es/map', 'es/set'],
  13. modernPolyfills: ['es.promise.finally']
  14. })
  15. ],
  16. server: {
  17. port: 3000,
  18. cors: true,
  19. host: '0.0.0.0',
  20. proxy: {
  21. '/v1': {
  22. target: 'http://8.136.199.33:8608',
  23. changeOrigin: true,
  24. rewrite: (path) => path.replace(/^\/v1/, '/v1')
  25. }
  26. },
  27. },
  28. build: {
  29. outDir: 'horz_chart',
  30. },
  31. resolve: {
  32. alias: {
  33. '@': path.resolve(__dirname, './src')
  34. },
  35. },
  36. })