Vue项目打包后资源引用错误

在项目根目录新建vue.config.js文件

module.exports = {
   // 在这里配置路径
  publicPath: './'
}

然后重新打包项目

 

vue-cli 配置详情https://cli.vuejs.org/zh/config/#baseurl

猜你喜欢

转载自www.cnblogs.com/chenmoumou/p/10536543.html