Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help with problem of using gulp-usemin with Gulp 4. #179

Open
ivanzhaowy opened this issue Sep 3, 2016 · 1 comment
Open

Need help with problem of using gulp-usemin with Gulp 4. #179

ivanzhaowy opened this issue Sep 3, 2016 · 1 comment

Comments

@ivanzhaowy
Copy link

Hi everyone, I recently tried to migrate from Gulp 3 to Gulp 4, I use gulp-usemin in my project, I have a task like this:

gulp.task('usemin', function () {
  return gulp.src('.tmp/**/*.html')
    .pipe($.usemin({
      css: ['concat', $.cleanCss],
      js: ['concat', $.uglify]
    }))
    .pipe(gulp.dest('dist'));
});

This works fine but when I try to pass some options into uglify or cleanCss task like this:

gulp.task('usemin', function () {
  return gulp.src('.tmp/**/*.html')
    .pipe($.usemin({
      css: ['concat', $.cleanCss],
      js: ['concat', $.uglify({ outSourceMap: true })]
    }))
    .pipe(gulp.dest('dist'));
});

Gulp break the workflow and throughout this:

[20:29:31] The following tasks did not complete: build, usemin
[20:29:31] Did you forget to signal async completion?

What should I do to avoid this? Thx

@harrisrobin
Copy link

try using runSequence. Seems that one of your tasks is running too early/too late to play nicely with usemin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants