Search code examples
cssangularionic-frameworkfullcalendar

Angular/ionic : Refused to apply style from '<URL>' because its MIME type


I tried to implement fullcalendar (4.1.0) library in my angular 5.0.0 / ionic (v4, i'm using scss too). In fullcalendar docs it says that i have to import these 2 css files in my global css stylesheet:

@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';

But for some reason, the css doesn't load and the project gives me the following error:

Refused to apply style from '' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I tried a lot of things, but none of them worked for me and now im kinda confused and don't know what to do to fix this.


Solution

  • I fixed it, my project was built with SASS and i just discovered that the imports for .css files needs to end without it. Just like This:

    @import '~@fullcalendar/core/main';
    @import '~@fullcalendar/daygrid/main';