vue.config.js 2.2 KB

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