Answer the question
In order to leave comments, you need to log in
How to minify libraries in Gulp 4?
Hello. Tell me please.
In gulp 4, I have libraries (libs.min.css, libs.min.js) and scripts (scripts.min.css, scripts.min.js) in separate files. But when minifying libraries, I need them to go one after another with comments, here is an example:
And
now it turns out like this
Here is my code
function libsCss() {
return src(paths.styles.srcLibs)
.pipe(eval(preprocessor)())
.pipe(concat(paths.cssLibsOutputName))
.pipe(autoprefixer({
overrideBrowserslist: ['last 10 versions'],
grid: true
}))
.pipe(cleancss({
level: {
1: {
specialComments: 'all'
}
},
/*format: 'beautify' */
}))
.pipe(dest(paths.styles.dest))
.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