browserify/ify-loader

Handling Errors

mattdesl opened this issue · 1 comments

This might already be possible with one of webpacks many plugins. But it seems like errors (right now testing with glslify, but presumably brfs would have same problem) are going unhandled and causing the webpack-dev-server to crash.

The following will fix the problem, but I'm sure there's a better way.

        multipipe.apply(this, transforms)
          .once('error', function (err) { // <-- handle errors in the pipe
            console.error(err.message)
          })

The above still emits an error to webpack since the bl module is calling done with an error in the first parameter.

Ah, my bad! Fixed :)