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

在页面引入了bootstrap:

但是控制台报错如下:

 

 解决方案:

这个问题出现的场景是在node环境下使用express框架的静态资源访问,加上下面的代码即可:

 

 同时要保证这个要访问的静态资源在public目录下即可解决。

posted @ 2020-04-04 20:33  Guorisy  阅读(6076)  评论(1编辑  收藏  举报