vite.config.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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-wazx/': {
  40. // target: 'http://localhost:8080/',
  41. // target: 'http://127.0.0.1:3002/',
  42. target: 'http://10.110.49.2:8090/api-wazx/',
  43. changeOrigin: true,
  44. rewrite: path => {
  45. return path.replace(/^\/api-wazx/, '')
  46. }
  47. },
  48. '/api-csb/': {
  49. // target: 'http://localhost:8080/',
  50. // target: 'http://127.0.0.1:3002/',
  51. target: 'http://10.110.49.2:8090/api-csb/',
  52. changeOrigin: true,
  53. rewrite: path => {
  54. return path.replace(/^\/api-csb/, '')
  55. }
  56. },
  57. '/api-screen/': {
  58. // target: 'http://localhost:8080/',
  59. // target: 'http://127.0.0.1:3002/',
  60. target: 'http://10.110.49.2:8090/api-screen/',
  61. changeOrigin: true,
  62. rewrite: path => {
  63. return path.replace(/^\/api-screen/, '')
  64. }
  65. },
  66. '/api-tes/': {
  67. // target: 'http://localhost:8080/',
  68. target: 'http://10.110.31.81/odae-video/',
  69. // target: 'http://10.110.32.62/',
  70. changeOrigin: true,
  71. rewrite: path => {
  72. return path.replace(/^\/api-tes/, '')
  73. }
  74. },
  75. '/api-tes-ws/': {
  76. target: 'http://10.110.31.81/odae-video/',
  77. ws: true,
  78. changeOrigin: true,
  79. rewrite: path => {
  80. return path.replace(/^\/api-tes-ws/, '')
  81. }
  82. }
  83. }
  84. },
  85. build: {
  86. outDir: "social-management-screen",
  87. },
  88. publicDir: 'src/out',
  89. optimizeDeps: {
  90. include: []
  91. }
  92. })