【问题标题】:application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec应用程序/八位字节流”。根据 HTML 规范对模块脚本强制执行严格的 MIME 类型检查
【发布时间】:2022-08-14 22:26:35
【问题描述】:

我的 nuxt3 应用程序有这个问题: \"Failed to load module script: The server responded with a non-JavaScript MIME type of “application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec.\"

所以任何js都可以执行? 任何想法 ?

    标签: vue.js nuxt.js nginx-location


    【解决方案1】:

    在您的 nginx 配置文件中添加以下行:

    server {
        ...
        default_type application/javascript;
        ...
    }
    

    【讨论】:

      猜你喜欢
      • 2021-12-09
      • 2019-12-16
      • 2021-08-02
      • 2015-08-11
      • 2012-02-03
      • 2017-03-27
      • 2021-03-07
      • 2021-06-05
      相关资源
      最近更新 更多