Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Use chokidar instead of fs for watching files. #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mike-Dax
Copy link
Contributor

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.

@anaisbetts
Copy link
Contributor

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

@Mike-Dax
Copy link
Contributor Author

Mike-Dax commented Mar 1, 2017

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

watchPath calls subscribers multiple times
2 participants