vue-cli

http://blog.csdn.net/hongchh/article/details/55113751 //vue里webpack配置详解

vue-cli各项说明 ==> 地址 https://segmentfault.com/a/1190000007880723  ===> 

vue-cli#2.0项目结构分析

配置别名

 

 

 

 

 打开根目录下的config/index.js,找到dev下的proxyTable,利用这个proxyTable我们能够将外部的请求通过webpack转发给本地,也就能够将跨域请求变成同域请求了。

proxyTable: {
'/auth':{
target: 'http://localhost:8889',
changeOrigin: true
},
'/api':{
target: 'http://localhost:8889',
changeOrigin: true
}
}
原文地址:https://www.cnblogs.com/yuruiweb/p/6925332.html