首页 > 其他 > 详细

vue 打包 以及跨域问题组织

时间:2019-02-14 12:28:27      阅读:235      评论:0      收藏:0      [点我收藏+]
config  > index 
proxyTable: {
‘/api‘: {
// target: "http://www.yjy100.cn/",
target: "http://192.168.0.240/",
changeOrigin: true,
pathRewrite: {
‘^/api‘: ‘/‘
}
}
},
跨域
 
build > utils
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: ‘vue-style-loader‘,
publicPath:‘../../‘
})
}
静态资源打包
config  > index 
assetsPublicPath: ‘./‘,
 
 

vue 打包 以及跨域问题组织

原文:https://www.cnblogs.com/liuliang389897172/p/10373811.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!