Recently i ended up in an issue where we use the "npm run build" command in our build pipeline yaml script. And followed by the parameters like 'base-href', 'configuration' etc. The build went through and the deployment was success but when we test the app, it would not render the page but the console will have the following or similar errors.
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
runtime-es2015.js:1
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
polyfills-es2015.js:1
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
vendor-es2015.js:1
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
main-es2015.js:1
the command we are using in the yaml was
npm run build -- "-c=<environment> --base-href='/Domain-href-url/'"
The suggested similar problems in the SO didnt solve or help as the script as such used to work locally, using the package.json cmds worked fine, using the vNext build pipeline for angular in Azure pipelines worked (if no parameters passed). But we need the environment params and the base-href.