我正在 Visual Studio 2017 中使用 ReactJs 前端构建 ASP.NET Core 应用。

最近,我开始注意到控制台中缺少 manifest.json 错误 - 见下文。它似乎不会影响我的应用程序,但我确实想摆脱这个错误。

如果我在 Edge 中查看我的应用,我不会看到缺少 manifest.json 错误,因此此错误似乎仅包含在 Chrome 中。

我将应用程序发布到 Azure,然后在 Chrome 中再次遇到相同的错误,但在 Edge 中却没有。

知道如何解决吗?

请您参考如下方法:

很可能在项目中的某处引用了 manifest.json,而文件/资源​​本身并不存在。

检查是否有任何 link 标记,其 rel=manifest 类似于

<link rel="manifest" href="/manifest.webmanifest"> 

The .webmanifest extension is specified in the Media type registration section of the specification, but browsers generally support manifests with other appropriate extensions like .json.

<link rel="manifest" href="/manifest.json"> 

并将其从代码中删除以停止错误。

引用Web App Manifest


评论关闭
IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!