我的 localhost 服务器在root
文件夹中运行,我的webapp
文件夹位于该root
文件夹中。
http://127.0.0.1:8887/ ->root
http://127.0.0.1:8887/webapp ->root/webapp
webapp
包含它index.html
链接到manifest.json
像这样在同一文件夹中的文件。
<link rel="manifest" href="./manifest.json">
webapp
在此设置中,Chrome 未检测到清单文件。
manifest.json
仅当 localhost 服务器在webapp
文件夹中启动时才会检测到。
http://127.0.0.1:8887/ ->webapp
我希望它以其他方式工作,该怎么做?
mainfest.json
{
"name": "Web app",
"short_name": "Web app",
"icons": [{
"src": "icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
}, {
"src": "icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
}, {
"src": "icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
}, {
"src": "icons/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
}],
"start_url": "/webapp/",
"scope":"/webapp/",
"display": "standalone",
"background_color": "#3E4EB8",
"theme_color": "#2F3BA2"
}