Vue 修改网站图标的方法

1、在stateic下新增favicon.ico文件

2、修改index.html文件,如图

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" type="image/x-icon" href="static/favicon.ico" rel="external nofollow" >
  <title>网站名称</title>
 </head>
 <body>
  <div id="app"></div>
  <!-- built files will be auto injected -->
 </body>
</html>

3、如果有新开页面无法显示图标问题,修改bulid下的webpack.dev.conf.js文件

  new HtmlWebpackPlugin({
   filename: 'index.html',
   template: 'index.html',
   inject: true,
   favicon:'static/favicon.ico'//新增
  }),

4、这个时候再重新启动一次项目就好啦

以上就是Vue 修改网站图标的方法的详细内容,更多关于Vue 修改网站图标的资料请关注呐喊教程其它相关文章!

声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:notice#nhooo.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。