Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled

Does not work for me :frowning:

I had this problem earlier this year and fixed it, but I can’t remember how…

i used yarn add typescript
its workfor me

There are two three things that worked for me

  1. npm install
  2. npm install @ionic/app-scripts@latest --save-dev
  3. npm install @ionic/lab
  4. ionic serve

Problem solved!!!

In my case I had in index.html:

<base href="." />

and what fix the issue was to change it to:
<base href="/" />

1 Like