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

Viewed 527

I get the following error in my JavaScript application:

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.

How can I get my scripts to run?

1 Answers

In your nginx config file add the following line:

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