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

前端 未结 4 1069
遇见更好的自我
遇见更好的自我 2020-12-11 16:05

I have a Vue.js project, when I check the console found this issue bellow:

Refused to apply style from \'http://localhost:8080/dist/cropper.min.css\'

4条回答
  •  再見小時候
    2020-12-11 16:39

    You provided insufficient information. But i had the same problem, so i have a solution.

    Say you @import css files in a component's style block. So my problem was in path that i specified. And the error message Refused to apply style appeared because of wrong path. I thought that my src path alias ~ is resolved in a style block, but it wasn't.

    All i had to do is to specify /src/assets/css... instead of ~/assets/css...

提交回复
热议问题