electron-compile icon indicating copy to clipboard operation
electron-compile copied to clipboard

Use chokidar instead of fs for watching files.

Open Mike-Dax opened this issue 8 years ago • 2 comments

This fixes #189 by changing the watchPath function to use chokidar.

No more multiple watch events being called, we can remove the throttling done by the hot reloading code.

Mike-Dax avatar Feb 26 '17 11:02 Mike-Dax

Chokidar doesn't work on Windows - we dedupe notifications here: https://github.com/electron/electron-compile/blob/master/src/live-reload.js#L56

anaisbetts avatar Feb 28 '17 18:02 anaisbetts

@paulcbetts The debounce solution doesn't seem to work on my mac - events happen more than a second apart. I'm pretty sure it does work on windows, webpack's dev server uses it?

I'm having problems installing electron-forge on my windows computer but a rough test script with chokidar works as expected.

Mike-Dax avatar Mar 01 '17 04:03 Mike-Dax