vite.config.js 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import {resolve} from "path";
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. plugins: [vue()],
  7. base: '/',
  8. resolve: {
  9. alias: {
  10. '@': resolve(__dirname, 'src'),
  11. },
  12. },
  13. server: {
  14. port: 1006,
  15. // open: true,
  16. https: false,
  17. base: '/',
  18. host: '0.0.0.0',
  19. strictPort: false,
  20. proxy: {
  21. '/api': {
  22. // target: 'http://localhost:8080/',
  23. target: 'http://120.25.74.229:8000/',
  24. // target: 'http://192.168.1.110:8080/',
  25. changeOrigin: true,
  26. rewrite: path => {
  27. return path.replace(/^\/api/, '')
  28. }
  29. },
  30. '/EzServer6-api': {
  31. target: 'http://74.10.28.116:8090/',
  32. changeOrigin: true,
  33. rewrite: path => {
  34. return path
  35. }
  36. },
  37. }
  38. },
  39. build: {
  40. outDir: "seat-tools",
  41. },
  42. publicDir: 'src/out',
  43. optimizeDeps: {
  44. include: []
  45. }
  46. })