【发布时间】:2020-08-06 05:21:45
【问题描述】:
在清单为空白的情况下部署 react 应用程序站点后,我遇到了问题。在 localhost 上运行时,它在应用程序下的 Chrome 开发控制台下正常显示。这是我在 index.html 上引用它的行。
<link rel="manifest" href="/manifest.json"/>
这是我的 manifest.json
{
"short_name": "Test",
"name": "Test React App",
"icons": [
{
"src": "example-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "example-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "/",
"display": "fullscreen",
"theme_color": "#ffffff",
"background_color": "#ffffff"
}
我花了很多时间试图理解为什么清单在部署时完全空白,但在本地运行时没有任何错误。从文档看来,它应该可以工作。我错过了什么吗?如果有帮助,我将通过 AWS 进行部署。任何信息都会有所帮助。
此外,我还调整了 index.html 使其看起来像 href="manifest.json"
【问题讨论】:
标签: reactjs amazon-web-services manifest