Answer the question
In order to leave comments, you need to log in
What is the correct plugin for @media grouping without sourcemap conflicts?
What is the correct plugin for grouping media without conflicts with gulp-sourcemaps?
So that he does not get confused in the order of the conditions.
Now gulp-group-css-media-queries.
gulp.task("css", function () {
return gulp.src("source/less/style.less")
.pipe(plumber())
.pipe(sourcemap.init())
.pipe(less())
.pipe(gcmq())
.pipe(postcss([
autoprefixer()
]))
.pipe(gulp.dest("build/css"))
.pipe(csso({
restructure: false
}))
.pipe(rename("style.min.css"))
.pipe(sourcemap.write("."))
.pipe(gulp.dest("build/css"))
.pipe(browserSync.stream());
});
Answer the question
In order to leave comments, you need to log in
Only through PostCSS, fortunately, you already have it connected.
One and two , your choice.
Personally, I use the first one, but not really comparing it - it just caught my eye earlier, but in general these are "extremes of the same flesh", very similar tools for solving the same problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question