When using rollup-watch directly, without the CLI (which I am doing because I need events to fire in response to build events), errors raised in plugins appear to halt the watching process. Here's some code that should reproduce the issue:
// ./build.js
const rollup = require('rollup');
const watch = require('rollup-watch');
const buble = require('rollup-plugin-buble');
watch(rollup, {
entry: './example/test.js',
dest: './dist/output.js',
plugins: [buble()]
}).on('event', event => console.log(event));
// ./example/test.js
export function a(b) {
for (let c of b) {
}
}
In terms of output, it displays the STARTING, BUILD_START, and ERROR messages like you might expect but then the Node process exits instead of waiting for me to go fix the input file.
Am I doing this right? It looks pretty much like the way Rollup's CLI implementation does it, except that the CLI does not end its process, for no reason that I can discern.
edit:
Forgot to note that I've tested this on Node 5 and 6, Mac OS X, npm 3.8.6, rollup 0.32.0, rollup-watch 2.4.0, rollup-plugin-buble 0.11.0.