提示

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

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐