From reading code example, it is using lazypipe as transformStream, but lazypipe can only attach error listener after it is initialized. So I guess there is no way to capture transformStream's error in our gulpfile.
My situation is running a watch task for babel transformStream, once babel throw error a syntax error, it will exit the watch process, here is a short code example:
In this case my onError won't end the transformStream as I wish.
My question is if we can add on('error') on those transformStream by default to emit('end') and let gulpfile handling the error itself. I would also appreciate any suggestion for how to handle this?
From reading code example, it is using lazypipe as transformStream, but lazypipe can only attach error listener after it is initialized. So I guess there is no way to capture transformStream's error in our gulpfile.
My situation is running a watch task for babel transformStream, once babel throw error a syntax error, it will exit the watch process, here is a short code example:
In this case my onError won't end the transformStream as I wish. My question is if we can add
on('error')
on those transformStream by default toemit('end')
and let gulpfile handling the error itself. I would also appreciate any suggestion for how to handle this?Thanks.