vite.config.ts 2.5 KB

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