英文:
favicons not displaying in quasar project
问题
在我的当前项目中,我遇到了favicons不显示的问题。我已经更新了index.template.html
以反映图标:
<link rel="icon" type="image/png" href="statics/cu.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/cu-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/cu-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="statics/icons/cu-96x96.png">
<link rel="icon" type="image/ico" href="statics/icons/favicon.ico">
我检查了quasar.conf.js
文件是否有更新的PWA配置:
icons: [{
src: 'statics/icons/cu-16x16.png',
sizes: '16x16',
type: 'image/png'
},
{
src: 'statics/icons/cu-32x32.png',
sizes: '32x32',
type: 'image/png'
},
{
src: 'statics/icons/cu-96x96.png',
sizes: '96x96',
type: 'image/png'
},
]
我确认它们存在于正确的目录中。然而,当我在本地运行它时,图标总是返回404错误。非常感谢任何建议和建议。
英文:
In my current project, I am struggling with getting the favicons to show up. I updated my index.template.html
to reflect the icons:
<link rel="icon" type="image/png" href="statics/cu.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/cu-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/cu-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="statics/icons/cu-96x96.png">
<link rel="icon" type="image/ico" href="statics/icons/favicon.ico">
I checked that the quasar.conf.js
file had an updated pwa:
icons: [{
src: 'statics/icons/cu-16x16.png',
sizes: '16x16',
type: 'image/png'
},
{
src: 'statics/icons/cu-32x32.png',
sizes: '32x32',
type: 'image/png'
},
{
src: 'statics/icons/cu-96x96.png',
sizes: '96x96',
type: 'image/png'
},
]
I confirmed that they do exist in the correct directory. However, when I run it locally I always get a 404 error on the icons. Any advice and suggestions would be greatly appreciated.
答案1
得分: 2
https://quasar.dev/quasar-cli-webpack/developing-spa/app-icons-spa
Let icon genie CLI do it for you.
英文:
https://quasar.dev/quasar-cli-webpack/developing-spa/app-icons-spa
Let icon genie CLI do it for you.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论