favicons not displaying in quasar project

huangapple go评论57阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月24日 02:05:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/75548673.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定