问题:在vue项目中, 需要将标签上的icon换成自己所需的,发现在更换了public/favicon.ico后,没有生效,依旧是原来Vue的icon。

解决办法:在vue.config.js中,修改pwa配置

代码

module.exports = {
  pwa: {
    iconPaths: {
      favicon32: 'favicon.ico',
      favicon316: 'favicon.ico',
      appleTouchIcon: 'favicon.ico',
      maskIcon: 'favicon.ico',
      msTileImage: 'favicon.ico',
    }
  }
}

相关文章:

  • 2021-11-28
  • 2022-12-23
  • 2021-11-03
  • 2021-07-04
  • 2021-06-27
  • 2022-12-23
  • 2021-06-21
猜你喜欢
  • 2021-09-17
  • 2021-10-06
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案