【发布时间】:2020-12-16 07:29:14
【问题描述】:
有没有人有在新的 Azure 资源Static Web Apps 中托管 Angular PWA 应用程序的经验?
我尝试修改routes.json文件:
{
"routes": [
{
"route": "/*",
"serve": "/index.html",
"statusCode": 200
}
],
"mimeTypes": {
"json": "application/json",
"webmanifest": "application/json"
}
}
但没有成功。
当我使用 web.config 将相同的应用程序部署到 Azure Web 应用程序时
<staticContent>
<mimeMap fileExtension="webmanifest" mimeType="application/json" />
<mimeMap fileExtension="json" mimeType="application/json" />
</staticContent>
PWA 是可安装的。
谢谢。
【问题讨论】:
-
将清单的 mimeType 更改为 application/manifest+json
标签: angular progressive-web-apps azure-static-web-app