vue-cli run build 後 背景圖片 css background:url('path') 加載問題

1、在webpack.prod.conf.js文件裏output裏面添加:publicPath:'./' 2、在utils.js文件裏添加 publicPath:'../../' 3、在config/index.js文件裏,添加assetsPublicPath:'./' run build 之後 圖片 正常顯示  成功!
相關文章
相關標籤/搜索