Answer the question
In order to leave comments, you need to log in
How to properly include gulp-sass?
I connect gulp-sass 5.1.0 as in the documentation:
const sass = require('gulp-sass')(require('sass'));
const styles = () => {
return src('./src/scss/**/*.scss')
.pipe(sass.sync().on('error', sass.logError))
.pipe(gulp.dest('./css'))
.pipe(gulpif(!isProd, sourcemaps.init()))
.pipe(concat('main.css'))
.pipe(autoprefixer({
cascade: false
}))
.pipe(cleancss({
level: 2
}))
.pipe(gulpif(!isProd, sourcemaps.write()))
.pipe(dest('dist/styles'))
.pipe(browserSync.stream())
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question