config配置
module.exports ={
lintOnSave:false,
outputDir:'dist',
assetsDir:'static',
productionSourceMap:false,
publicPath:'./' ,
devServer:{
open:true,
host:'0.0.0.0',
// port:8083,
hotOnly:false,
proxy:{
// https://open.weixin.qq.com
'/api':{
//服务器端接口地址
// target:'http://192.168.0.155:8081',
target:'http://192.168.0.107:8083',
// target:'http://h5.u2sy.cn',
ws:true,
//是否跨域
changeOrigin:true,
pathRewrite:{
'^/api':''
}
}
}
}
}
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/15000443.html

浙公网安备 33010602011771号