When running the final build step in GULP, I am trying to use uglify with a wildcard in the gulp.src, but seeing an error.
This works:
gulp.task('build', ['lint','karma','clean'], function () {
return gulp.src('./src/js/file.js')
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(size())
.pipe(gulp.dest('./dist'));
});
But this doesn't:
gulp.task('build', ['lint','karma','clean'], function () {
return gulp.src('./src/js/*.js')
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(size())
.pipe(gulp.dest('./dist'));
});
The only difference being that I select a specific file in the working gulp.src, but use a wildcard in the non-working version. I have narrowed this down to uglify() because if I comment it out, I don't get the error, and everything completes without issue.
Any help would be greatly appreciated