vite.config.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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: 6886,
  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://127.0.0.1:3001/',
  24. // target: 'http://10.110.35.47/',
  25. changeOrigin: true,
  26. rewrite: path => {
  27. return path.replace(/^\/api/, '')
  28. }
  29. },
  30. '/api-gateway/': {
  31. // target: 'http://localhost:8080/',
  32. target: 'http://127.0.0.1:3002/',
  33. // target: 'http://10.110.32.62/',
  34. changeOrigin: true,
  35. rewrite: path => {
  36. return path.replace(/^\/api-gateway/, '')
  37. }
  38. },
  39. '/api-tes/': {
  40. // target: 'http://localhost:8080/',
  41. target: 'http://10.110.31.81/odae-video/',
  42. // target: 'http://10.110.32.62/',
  43. changeOrigin: true,
  44. rewrite: path => {
  45. return path.replace(/^\/api-tes/, '')
  46. }
  47. },
  48. '/api-tes-ws/': {
  49. target: 'http://10.110.31.81/odae-video/',
  50. ws: true,
  51. changeOrigin: true,
  52. rewrite: path => {
  53. return path.replace(/^\/api-tes-ws/, '')
  54. }
  55. }
  56. }
  57. },
  58. build: {
  59. outDir: "social-management-screen",
  60. },
  61. publicDir: 'src/out',
  62. optimizeDeps: {
  63. include: []
  64. }
  65. })