I'm trying to serve a javascript app with Nginx, which makes use of ES2016 modules. All of the module files have .the extension .js. When accessing the app from chrome, I receive the following error:
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
I've tried including mime.types and making use of
types {
application/javascript js;
}
In my nginx.conf, neither has made a difference. How should I configure nginx to serve javascript module files with the appropriate MIME type?
Thanks,
howardd
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
I've tried including mime.types and making use of
types {
application/javascript js;
}
In my nginx.conf, neither has made a difference. How should I configure nginx to serve javascript module files with the appropriate MIME type?
Thanks,
howardd