vue.config.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. const { defineConfig } = require("@vue/cli-service");
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. lintOnSave: false,
  5. devServer: {
  6. proxy: {
  7. '/bench': {
  8. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  9. changeOrigin: true, //需要代理跨域
  10. rewrite: (path) => path.replace(/^\/bench/, ''), //路径重写,把'/api'替换为''
  11. },
  12. '/plan': {
  13. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  14. changeOrigin: true, //需要代理跨域
  15. rewrite: (path) => path.replace(/^\/plan/, ''), //路径重写,把'/api'替换为''
  16. },
  17. '/mantis-test': {
  18. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  19. changeOrigin: true, //需要代理跨域
  20. rewrite: (path) => path.replace(/^\/mantis-test/, ''), //路径重写,把'/api'替换为''
  21. },
  22. '/bmt-test': {
  23. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  24. changeOrigin: true, //需要代理跨域
  25. rewrite: (path) => path.replace(/^\/bmt-test/, ''), //路径重写,把'/api'替换为''
  26. },
  27. '/tts-test': {
  28. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  29. changeOrigin: true, //需要代理跨域
  30. rewrite: (path) => path.replace(/^\/tts-test/, ''), //路径重写,把'/api'替换为''
  31. },
  32. '/arbitrator': {
  33. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  34. changeOrigin: true, //需要代理跨域
  35. rewrite: (path) => path.replace(/^\/arbitrator/, ''), //路径重写,把'/api'替换为''
  36. },
  37. },
  38. },
  39. });