vue.config.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. },
  43. },
  44. });