title: IIS returning text/html for js file, why?
body: <p>When my app initially loads all is ok and in Chrome, console errors are 0. When I press the browser refresh, I receive the following error:</p>
  
  <blockquote>
    <p>Refused to execute script from
    '<a href="http://localhost:50001/dist/vendor-es5.js" rel="nofollow noreferrer">http://localhost:50001/dist/vendor-es5.js</a>' because its MIME type
    ('text/html') is not executable, and strict MIME type checking is
    enabled.</p>
  </blockquote>
  
  <p>I also receive the same error for 'main-es5.js'</p>
  
  <p>The error is generated from my index.cshtml file in here I have:</p>
  
  <pre><code>@section scripts {
      &lt;script src="~/dist/vendor-es5.js" asp-append-version="true"&gt;&lt;/script&gt;
  
      &lt;script src="~/dist/main-es5.js" asp-append-version="true"&gt;&lt;/script&gt;
  }
  </code></pre>
  
  <p>changing the 
  
  <pre><code>&lt;script type="text/javascript" src="~/dist/vendor-es5.js" asp-append-version="true"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>still gives the same error.</p>
  
  <p>my index.cshtml file resides in views/home
  the dist directory resides in clientapp</p>
  
  <p>if I change the reference on the script src to be ./clientapp/dist/vendor-es5.js for instance, then the app still loads correctly first time in, but then when I press the refresh, I get no console errors, but the page still doesn't refresh. Anybody have any ideas where I should go next.</p>