We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
网站 title 上面的 favicon 图标,文件后缀为 .ico,下面这种方式加入的:
.ico
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
构建后,发现 href 后面的链接没有添加静态资源前缀,导致引入失败,图标显示不了。
href
在获取静态资源类型的函数 util.getStaticFileType 中加入 ico 的类型。
util.getStaticFileType
ico
util.js
util.getStaticFileType = () => { var list = [ 'css', 'js', 'jpg', 'jpeg', 'png', 'gif', 'webp', 'ico', 'mp3', 'aac', 'mpeg', 'flv', 'f4v', 'swf', 'ogg', 'mp4', 'm4v', 'webm', 'wav', 'ogv', 'mov', 'm3u8', 'ttf', 'otf', 'eot', 'woff', 'woff2', 'svg', 'vml', 'htc' ]; return list.map(item => '**/*.' + item); };
构建后,静态资源前缀添加上了,图标能够正常显示。
不知道这样解决这个问题是否合理???
The text was updated successfully, but these errors were encountered:
dbd9b89
No branches or pull requests
问题:
网站 title 上面的 favicon 图标,文件后缀为
.ico
,下面这种方式加入的:构建后,发现
href
后面的链接没有添加静态资源前缀,导致引入失败,图标显示不了。解决办法:
在获取静态资源类型的函数
util.getStaticFileType
中加入ico
的类型。util.js
结果
构建后,静态资源前缀添加上了,图标能够正常显示。
不知道这样解决这个问题是否合理???
The text was updated successfully, but these errors were encountered: