修复JavaScript module script but the server responded with a MIME type of "text/plain" 错误


错误信息:

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.

 

解决办法:

注册表 HKEY_CLASSES_ROOT 有个  .js 项    Content Type=text/plain

改成  Content Type=text/javascript

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 ES6 服务器以非JavaScript MIME类型“text/html”响应 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". 关于vite build后访问报错:Expected a JavaScript module script but the server responded with a MIME type. Resource interpreted as Script but transferred with MIME type text/plain: web页面 显示 Resource interpreted as Stylesheet but transferred with MIME type text/plain的错误警告 Resource interpreted as Stylesheet but transferred with MIME type text/plain nginx - Resource interpreted as Stylesheet but transferred with MIME type text/plain