module.exports={
runtimeCompiler:true,
publicPath:"/", //基本路径
devServer:{
host:"localhost",
port:8080,
open:true,
https:false,
//设置开发接口代理
proxy:{
"/api":{
target:"https://www.fastmock.site/mock/test",
ws:true,
changOrigin:true,
pathRewrite:{
"^/api":""
}
}
}
}
}
一般在vue.config.js中配置。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)