I'm having trouble running the below task with gulp in version 4.0.
The problem occurs when I'm trying to run dependencies.
Would anyone know why?
const gulp = require("gulp"),
imagemin = require("gulp-imagemin"),
clean = require("gulp-clean");
gulp.task("copy", gulp.series('clean', function() {
return gulp.src("src/img/**/*").pipe(gulp.dest("dist/img"));
}));
gulp.task("clean", function() {
return gulp.src("dist").pipe(clean());
});
gulp.task("build-image", function() {
return gulp
.src("dist/img/**/*")
.pipe(imagemin())
.pipe(gulp.dest("dist/img/"));
});