If JS makes a mistake, then gulp watch stops its work and you give the following:

enter image description here

Here is the uglify task:

 gulp.task('scripts', function () { return gulp.src([ 'app/js/libs/jquery.magnific-popup.min.js', 'app/js/libs/slick.min.js', 'app/js/common.js' ]) .pipe(concat('main.min.js')) .pipe(uglify()) .pipe(gulp.dest('dist/js')); }); 

How to make it so that the work of gulp watch does not stop, and wrote that the error in such a file.

    1 answer 1

    Use the plugin gulp-plumber .

     var plumber = require('gulp-plumber'); gulp.task('scripts', () => { return gulp.src('app/scripts') .pipe(plumber()) // весь остальной код таска }); 
    • Yes, ATP, just read about it - Karalahti