2.x.x
The emitted events now emits an object with relativePath and absPath properties
watcher.on('add', ({ relativePath, absPath }) => {
})
Now you have to define an explicit watch mode when creating the watcher instance.
const lspWatcher = compiler.watcher(config!, 'lsp')
const watcher = compiler.watcher(config!, 'raw')