Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/pla
发表于 : 2024-07-19 11:18
使用pdf.js中出现错误:
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.
解决方法:
编辑apache服务器配置文件:httpd.conf,
添加以下代码来设置 MIME 类型:
AddType application/javascript .mjs
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.
解决方法:
编辑apache服务器配置文件:httpd.conf,
添加以下代码来设置 MIME 类型:
AddType application/javascript .mjs