webpack 解决跨域问题

位置:config/ index.js

 在dev中添加以下代码
 proxyTable: {
    '/aaa': {      //遇到已aaa开头的将替换为 target 的内容
    target: 'http://192.168.1.8:8500',
    changeOrigin: true   //是否解决跨域
  },

},
  以上为常用的webpack解决跨域
原文地址:https://www.cnblogs.com/httpL/p/8884512.html