Stylesheet not loaded because of MIME-type

前端 未结 30 2479
猫巷女王i
猫巷女王i 2020-11-22 07:29

I\'m working on a website that uses gulp to compile and browser sync to keep the browser synchronised with my changes.

The gulp task compiles everything

30条回答
  •  既然无缘
    2020-11-22 08:07

    The issue, I think, was with a CSS library starting with comments.

    While in development, I do not minify files and I don't remove comments. This meant that the stylesheet started with some comments, causing it to be seen as something different from CSS.

    Removing the library and putting it into a vendor file (which is ALWAYS minified without comments) solved the issue.

    Again, I'm not 100% sure this is a fix, but it's still a win for me as it works as expected now.

提交回复
热议问题