Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main file is ignored #57

Closed
mscoobby opened this issue Jul 9, 2019 · 13 comments
Closed

Main file is ignored #57

mscoobby opened this issue Jul 9, 2019 · 13 comments

Comments

@mscoobby
Copy link

mscoobby commented Jul 9, 2019

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",

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

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?

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

Is this related to #26 ?

@mscoobby
Copy link
Author

mscoobby commented Jul 9, 2019

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.

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

This is really interesting, forceHardReset does not change the ignored path, but solves the problem. 🤔

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

Try the changes on develop branch.

@mscoobby
Copy link
Author

mscoobby commented Jul 9, 2019

It adds the glob which most likely overwrites the specific path.

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

Adding just extends the list of files to be watched. It shouldn't change the ignored list.

@mscoobby
Copy link
Author

mscoobby commented Jul 9, 2019

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.

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

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.

@mscoobby
Copy link
Author

mscoobby commented Jul 9, 2019

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.

Yes I've just cloned it and run the app. Hard reset works without any modifications and it spawns only 1 process.

@yan-foto
Copy link
Owner

yan-foto commented Jul 9, 2019

Alright, thanks! I'll release a new version.

@mscoobby
Copy link
Author

Alright, thanks! I'll release a new version.

Perfect! When do you expect to release it?

@yan-foto
Copy link
Owner

ASAP. I've got a lot to take care of.

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

No branches or pull requests

2 participants