vue3 框架搭建后,默认显示 vue 自己的 icon
public/favicon.ico替换成自己想要的icon
public/index.html 修改:
<link rel="icon" href="<%= BASE_URL %>favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>favicon.ico" />
vue.config.js:
const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ pwa: { iconPaths: { favicon32: "favicon.ico", favicon16: "favicon.ico", appleTouchIcon: "favicon.ico", maskIcon: "favicon.ico", msTileImage: "favicon.ico" } } })
标签:vue,ico,favicon,public,vue3,浏览器,小图标,defineConfig From: https://www.cnblogs.com/moguzi12345/p/18003182