我使用grunt contrib connect和grunt contrib watch来实现实时重新加载功能,如下所示:
watch: {
options: {
livereload: true,
},
files: ['src/**/*'],
tasks: ['dev']
},
connect: {
server: {
options: {
port: 8000,
base: './dist',
hostname: '0.0.0.0',
protocol: 'http',
livereload: true,
open: true,
}
}
},
Refused to apply style from 'http://localhost:8000/section-featured-work/mod-mobile-design.css?livereload=1533148529995' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
有没有办法为加载CSS文件的脚本指定MIME类型?
我不相信这是
stackoverflow.com/questions/48248832/
,我相信这是