Не читает стили css и sass
создал локальный сервер через gulp, но не применяются стили, Помогите пожалуйста Выводит в консоль такую ошибку: Refused to apply style from 'http://localhost:3000/public/sass/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
const gulp = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const cleanCss = require('gulp-clean-css');
const autoprefixer = require('gulp-autoprefixer');
const browserSync = require('browser-sync');
const uglify = require('gulp-uglify');
const htmlmin = require('gulp-htmlmin');
gulp.task('minify-html', () => {
return gulp
.src('app/*.html')
.pipe(htmlmin({ collapseWhitespace: true }))
.pipe(gulp.dest('public/'));
});
gulp.task('minify-css', async () => {
return gulp
.src('app/css/*.css')
.pipe(
autoprefixer({
ovverideBrawserlist: ['last 20 verrsions'],
cascade: false,
})
)
.pipe(cleanCss())
.pipe(gulp.dest('public/css/'));
});
gulp.task('sassToCss', async () => {
return gulp
.src('app/sass/*.sass')
.pipe(sass())
.pipe(
autoprefixer({
ovverideBrawserlist: ['last 20 verrsions'],
cascade: false,
})
)
.pipe(cleanCss())
.pipe(gulp.dest('public/sass/'));
});
gulp.task('minify-js', async () => {
return gulp.src('*.js').pipe(uglify()).pipe(gulp.dest('public/js/'));
});
gulp.task('server', async () => {
browserSync.init({ server: 'app' });
browserSync.watch('public/**/*').on('change', browserSync.reload);
});
gulp.task('watch-files', async () => {
gulp.watch('app/css/*.css', gulp.series('minify-css'));
gulp.watch('app/js/*.js', gulp.series('minify-js'));
gulp.watch('app/sass/*.sass', gulp.series('sassToCss'));
gulp.watch('app/*.html', gulp.series('minify-html'));
});
gulp.task('default', gulp.parallel('watch-files', 'server'));
Источник: Stack Overflow на русском