Main file is ignored
mscoobby opened this issue · 13 comments
What is the problem
The main files is included in the ignored paths and therefore the watcher ignores is resulting in no hard resets at all.
How to reproduce
Import the library in any Electron project, run the app and make changes on the main file without setting the forceHardReset
flag
Additional information
"electron-reload": "~1.4.0",
"electron": "~5.0.6",
The main file is in ignored paths both with and without forced hard reset, but it seems that chokidar
behaves differently. Does hard reset work for the main file when forceHardReset
is set to true
? On which OS are you?
If I set the forceHardReset
to true
it works for all files. I'm using Windows but removing mainFile
from the ignored paths fixes the issue. No it's not related to #26 since it finds the appPath
and mainFile
correctly.
This is really interesting, forceHardReset
does not change the ignored path, but solves the problem. 🤔
It adds the glob
which most likely overwrites the specific path.
Adding just extends the list of files to be watched. It shouldn't change the ignored list.
Try the changes on
develop
branch.
I don't have the repository cloned. But removing the mainFile
from the ignored paths actually triggers the hard reset.
You don't need the repository cloned, just run npm i https://github.com/yan-foto/electron-reload.git#develop
and require
it as usual and see if everything works.
You don't need the repository cloned, just run
npm i https://github.com/yan-foto/electron-reload.git#develop
andrequire
it as usual and see if everything works.
Yes I've just cloned it and run the app. Hard reset works without any modifications and it spawns only 1 process.
Alright, thanks! I'll release a new version.
Alright, thanks! I'll release a new version.
Perfect! When do you expect to release it?
ASAP. I've got a lot to take care of.