title: Importing jQuery plugin into Angular 2+ Refused to execute script because its MIME type ('text/html') is not executable
body: <p>I need to load a JavaScript (jQuery plugin) in an HTML file. But it doesn't seem to be working. This is running on Angular-CLI server (ng serve) Here's the HTML.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Test&lt;/title&gt;
    &lt;base href="/"&gt;
  
    &lt;script
    src="https://code.jquery.com/jquery-3.3.1.min.js"
    integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
    crossorigin="anonymous"&gt;&lt;/script&gt;
  
    &lt;script src="./test.js" type="text/javascript"&gt;&lt;/script&gt;
  
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;app-root&gt;Loading...&lt;/app-root&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Refused to execute script from
    '<a href="http://localhost:8080/test.js" rel="nofollow noreferrer">http://localhost:8080/test.js</a>' because its MIME type
    ('text/html') is not executable, and strict MIME type checking is
    enabled.</p>
  </blockquote>
  
  <p>I found <a href="https://stackoverflow.com/questions/19214276/">this question</a>, where the solution seems to be correcting the <code>type</code> attribute, but that didn't fix it for me. I tried <code>text/javascript</code> and <code>application/javascript</code>.</p>
  
  <p>What do I need to do here?</p>
  
  <p>EDIT: The network console shows a 404 error for the script. Says the request has no response data available. Content type says <code>text/html; charset=utf-8</code></p>
  
  <p>NOTE: I originally posted this as a more minimal example than my actual code, as I didn't think it had to do with Angular CLI server. That may be the case, so I restored my example to the actual code I have.</p>