vue项目 npm run build后 在浏览器上打开index.html常见问题

1.打开报错

解决方法

config文件里的index.js里,  assetsPublicPath:'/',改成   ./  重新build即可

2.打开后使用的icon字体图标不显示

解决方法

build文件里的utils.js里添加 publicPath:'../../' ,重新build即可

猜你喜欢

转载自blog.csdn.net/weixin_44314258/article/details/103491418