【发布时间】:2021-08-12 20:19:03
【问题描述】:
我正在制作 PWA,但遇到了一些问题。当应用程序处于开发模式时,我没有收到 PWA 的错误,但是当我将其推送到生产环境时,我得到:
Web 应用清单或 Service Worker 不满足可安装性要求
清单不包含合适的图标 - 需要至少 144 像素的 PNG、SVG 或 WebP 格式,必须设置 sizes 属性,并且如果设置了 purpose 属性,则必须包含“any”或“maskable”。
我不明白为什么,因为这是我的 manifest.json
{
"short_name": "Ionic App",
"name": "My Ionic App",
"icons": [
{
"src": "assets/icon/favicon.png",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon",
"purpose": "any"
},
{
"src": "assets/icon/icon.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "maskable"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#ffffff",
"background_color": "#ffffff"
}
任何帮助将不胜感激
【问题讨论】:
标签: reactjs ionic-framework progressive-web-apps manifest.json