My Ionic build was working perfectly up until I wanted to test on my iPhone, so I stopped my server, did a ionic serve --address localhost
, and I noticed that my stylesheet wasn't loading anymore... so I killed the server again went back to ionic serve
and the error persisted...
(index):1 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.
I've tried clearing the the cache on localhost:8100
and rebuilding the project, but the error remains...
How can I fix this problem?
The way I ended up fixing it might not be the best... but at least it works again. I just went into my GitHub repository for my app downloaded the main.css
and pasted it into the build
folder and I've not had a problem since.