Answer the question
In order to leave comments, you need to log in
How to configure gulp-autoprefixer, where did the browsers configuration setting go?
I'm just getting started with gulp. I'm looking at usage examples, I got to the autoprefixer and the browsers[' '] parameter is used everywhere. Now on github in the use case only the parameter "cascade: false". In the code browsers['> 0.2% '] or for example "last 7 versions" will not work either.
The documentation is still hard for me to read. For example, I found the browserslist [] parameter, but I don’t quite understand where and how to use it, the description says that this is a parameter for package.json.
Answer the question
In order to leave comments, you need to log in
gulpfile.js
const autoprefixer = require('gulp-autoprefixer');
function scssTask(){
return src(files.scssPath)
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(autoprefixer())
.pipe(sourcemaps.write('.'))
.pipe(dest('public/css')
);
}
"main": "gulpfile.js",
"browserslist": [
"last 2 version",
"> 1%",
"maintained node versions",
"not dead"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question