const gulp = require('gulp') const usemin = require('gulp-usemin') const htmlmin = require('gulp-htmlmin') const cleanCss = require('gulp-clean-css') const rev = require('gulp-rev') gulp.task('usemin', () => gulp.src('./src/index.html') .pipe(usemin({ css: [ rev() ], html: [ htmlmin({ collapseWhitespace: true }) ], inlinecss: [ cleanCss(), 'concat' ] })) .pipe(gulp.dest('dist/')))