Question
本地运行Django项目报错:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/plain”. Strict MIME type checking is enforced for module scripts per HTML spec.
Solution
windows 直接修改注册表就行:
- 点击 HKEY_CLASSES_ROOT.js 文件夹
- 双击 Content Type 项,修改值为
application/javascript
重启本地实例应该就可以加载js module了。