zont / gulp-usemin

MIT License
338 stars 92 forks source link

Task never ends when using uglify #184

Closed ArielGueta closed 8 years ago

ArielGueta commented 8 years ago

I have a simple gulp task that uses the usemin plugin. When I am using the uglify plugin with that, the task completes but never ends.

var usemin = require('gulp-usemin');
var uglify = require('gulp-uglify');

gulp.task('usemin', function() {
   gulp.src('./index.html')
    .pipe(usemin({
      assetsDir: __dirname + '/../',
      js: [uglify({
        compress: {
          drop_console: true
        },
        mangle: false
      }), rev()],
      css: [minifyCSS(), rev()]
    }))
    .pipe(gulp.dest('./../production'));
}); 

The process is stuck:

[13:30:01] Starting 'usemin'...
[13:30:01] Finished 'usemin' after 49 ms

When I removed the uglify function, it ends so the problem is there.