vue.config.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. '/execution': {
  28. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  29. changeOrigin: true, //需要代理跨域
  30. rewrite: (path) => path.replace(/^\/execution/, ''), //路径重写,把'/api'替换为''
  31. },
  32. '/bmt-test': {
  33. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  34. changeOrigin: true, //需要代理跨域
  35. rewrite: (path) => path.replace(/^\/bmt-test/, ''), //路径重写,把'/api'替换为''
  36. },
  37. '/task': {
  38. target: 'http://106.14.237.165', //需要代理的域名,目标域名
  39. changeOrigin: true, //需要代理跨域
  40. rewrite: (path) => path.replace(/^\/task/, ''), //路径重写,把'/api'替换为''
  41. },
  42. '/arbitrator': {
  43. target: 'http://139.196.158.57:8080', //需要代理的域名,目标域名
  44. changeOrigin: true, //需要代理跨域
  45. rewrite: (path) => path.replace(/^\/arbitrator/, ''), //路径重写,把'/api'替换为''
  46. },
  47. '/8b934420_ZJUb_b6f9': {
  48. target: 'http://172.16.50.4:18080',
  49. changeOrigin: true, //需要代理跨域
  50. rewrite: (path) => path.replace(/^\/8b934420_ZJUb_b6f9/, ''), //路径重写,把'/api'替换为''
  51. },
  52. '/models': {
  53. target: 'http://172.16.50.4:18080',
  54. changeOrigin: true, //需要代理跨域
  55. rewrite: (path) => path.replace(/^\/models/, ''), //路径重写,把'/api'替换为''
  56. }
  57. },
  58. },
  59. });