我的webapp使用react + webpack。
使用“offline-plugin”,它会为静态缓存创建一个服务工作者和清单。
最后一个难题是创建一个manifest.json,在Android上启用启动画面。
我已将以下链接添加为instructed清单:
<link rel="manifest" href="/manifest.json">
但是manifest.json内容的链接是webpack没有解析的,所以它在生产中不起作用,该怎么办?
Json样本:
{
"short_name": "Kinlan's Amaze App",
"name": "Kinlan's Amazing Application ++",
"icons": [
{
"src": "launcher-icon-2x.png",
"sizes": "96x96",[enter link description here][2]
"type": "image/png"
},
{
"src": "launcher-icon-3x.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "launcher-icon-4x.png",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "/index.html",
"display": "standalone",
"orientation": "landscape"
}