angular - Azure静态网站不加载支持的js文件

标签 angular azure azure-blob-storage

我刚刚在 Azure 门户创建了一个静态网站,它给了我类似 https://abcd.z99.web.core.windows.net/ 的 URL。但是当我上传文件并导航到此 url 时,它会加载 index.html 页面并出现以下错误。

Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

我得到的运行时-XXX、polifiles-XXX 和 main-XXX 文件。

我在这里缺少什么?

最佳答案

Angular repository 中提到了此问题以及。您可以通过

修复它

将文件“tsconfig.json”中的属性“target”更改为“es5”

关于angular - Azure静态网站不加载支持的js文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60139463/

相关文章:

javascript - 如何在 MEAN 堆栈中设置 HTTP header 键/值对

azure - 如何使用服务器端的列投影将 Parquet 文件从 Azure Blob 读取到 Pandas DataFrame 中?

python - Azure 函数 python 命名参数没有值

javascript - Angular4 社交媒体 Facebook 分享页面,包含详细信息

javascript - 如何更改 .css 类属性 - 背景 : url ('' ) for each item javascript/typescript

angular - 我需要监听表单中是否有任何更改,如果有更改则启用/禁用“保存”按钮 | Angular

Azure应用程序自动扩展

azure - 在 Azure 模拟器上运行 WebJobs

python - 如何使用 KeyVault 从 Python 连接到 ML Studio 工作区?

c# - Azure block blob "staging"区域 block 过期