Strict MIME type checking is enforced for module scripts per HTML spec.

目录

  • 前言
  • 错误信息如下:

前言

最近使用docker打包Nginx和vue 为镜像文件,启动镜像时报错

错误信息如下:

index89886.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Strict MIME type checking is enforced for module scripts per HTML spec._第1张图片
需要修改这个文件:
Strict MIME type checking is enforced for module scripts per HTML spec._第2张图片
上面的文件内容如下:


types {
    text/html                                        html htm shtml;
    text/css                                         css;
    text/xml                                       

你可能感兴趣的:(日常工作总结,html,前端)