vue小图标 favicon不显示的解决方法
vue项目favicon不正常显示,或只显示在首页或登录页之后不显示解决方案:1.直接将favicon.ico放到根目录,与src,static同级2.在 webpack.dev.conf.js 文件里plugins里加入以下代码new HtmlWebpackPlugin({filename: 'index.html',template: 'inde...
·
vue项目favicon不正常显示,或只显示在首页或登录页之后不显示
解决方案:
1.直接将favicon.ico放到根目录,与src,static同级
2.在 webpack.dev.conf.js 文件里plugins里加入以下代码
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: './favicon.ico'
})
3.在index.html 中引入以下代码
<link rel="shortcut icon" href="./favicon.ico">
4.确定以上步骤无误后,重新启动就好了,npm run dev
该代码仅供参考,未经允许不得转载,转载请著名出处:https://blog.csdn.net/qq_40701522/article/details/82698459
更多推荐
已为社区贡献10条内容
所有评论(0)