提示

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec

angular某个版本script type改成了module导致报错

解决方法
方法1
把打包好涉及的script typemodule改为text/javascript
例如文件
index.html中
runtime.js中

方法2
tsconfig.jsontarget的值改为es5

参考链接:
https://github.com/angular/angular/issues/30835

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐