Skip to content

How to catch watch stream errors? #53

@sawyerh

Description

@sawyerh

Forgive me if this is a noob question, I'm a little new when it comes to Gulp. I'm wondering if it's possible to catch errors that happen during a watch. I'm able to do this successfully like this:

gulp.src(config.src)
    .pipe(bundle())
    .on('error', handleErrors)
    ...

However, I'm not quite sure how to do it here:

bundle.watch({
    configPath: path.join(__dirname, '../bundle.config.js'),
    dest: path.join(__dirname, '../../public/assets')
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions