我刚刚在 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/