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:
Refused to execute script from 'http://localhost:50001/dist/vendor-es5.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
I also receive the same error for 'main-es5.js'
The error is generated from my index.cshtml file in here I have:
@section scripts {
<script src="~/dist/vendor-es5.js" asp-append-version="true"></script>
<script src="~/dist/main-es5.js" asp-append-version="true"></script>
}
changing the
<script type="text/javascript" src="~/dist/vendor-es5.js" asp-append-version="true"></script>
still gives the same error.
my index.cshtml file resides in views/home the dist directory resides in clientapp
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.