报错如下:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
解决办法:
在nginx的配置文件内添加
location ~* \.mjs$ {
root D:/htkjweb/web/lysbhq/dist;//这个是项目路径
default_type application/javascript;
}