angular 提示 Failed to load module script: Expected a JavaScript module script but the server responde
·
提示
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.json把target的值改为es5
参考链接:
https://github.com/angular/angular/issues/30835
更多推荐

所有评论(0)