This repository was archived by the owner on Oct 1, 2020. It is now read-only.
Use chokidar instead of fs for watching files.#190
Open
Mike-Dax wants to merge 1 commit intoelectron-userland:masterfrom
Open
Use chokidar instead of fs for watching files.#190Mike-Dax wants to merge 1 commit intoelectron-userland:masterfrom
Mike-Dax wants to merge 1 commit intoelectron-userland:masterfrom
Conversation
Contributor
|
Chokidar doesn't work on Windows - we dedupe notifications here: https://github.com/electron/electron-compile/blob/master/src/live-reload.js#L56 |
This was referenced Mar 1, 2017
Contributor
Author
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.