Angular 6应用程序:清单:行:1,列:1,意外令牌 [英] Angular 6 application : Manifest: Line: 1, column: 1, Unexpected token

查看:196
本文介绍了Angular 6应用程序:清单:行:1,列:1,意外令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建代码并将其部署到Azure时出现此错误. 使用VSCode在本地运行代码时,该代码不会出现在控制台中. 对此问题的任何帮助,不胜感激.

This error appears when the code is built and deployed to Azure. When the code is run locally using VSCode this doesn't appear in the console. Any help regarding this matter is appreciated.

清单文件代码:

{
    "name": "",
    "icons": [
        {
            "src": "assets/android-chrome-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
        }
    ],
    "theme_color": "#ffffff",
    "background_color": "#ffffff",
    "display": "standalone"
}

在index.html中引用文件的方式如下

The file is referenced in the index.html as follows

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

推荐答案

通过在标记中使用crossorigin ="use-credentials"修复了该问题.

Fixed it by using crossorigin="use-credentials" in the tag.

<link rel="manifest" crossorigin="use-credentials" href="./assets/manifest.json">

这篇关于Angular 6应用程序:清单:行:1,列:1,意外令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆