I'm setting a webserver on my local machine using nginx, but I'm not able to run javascript. When I try to import a javascript file as a module, I run into "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". My nginx configuration file looks like this:
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/error_log info;
http {
include /etc/nginx/mime.types;
server {
location / {
root /home/jyoung/Web/Test1/www;
}
location /images/ {
root /home/jyoung/Web/Test1;
}
}
}
events {
worker_connections 1024;
use epoll;
}
I have restarted nginx every time I've made edits. I'd be grateful for any tips.