title: Loading module was blocked because of a disallowed MIME type
body: <p>I am getting <code>Loading module from “http://localhost:3000/d3.js” was blocked because of a disallowed MIME type (“”)</code> when trying to import d3.js library. The project uses npm and the error has been encountered in Firefox.</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;header&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;D3&lt;/title&gt;
    &lt;/header&gt;
  
    &lt;body&gt;
      &lt;div id="svg"&gt;&lt;/div&gt;
      &lt;script src="./index.js" type="module"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import * as d3 from "./d3.js";
  </code></pre>