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

Hard resets not working with electron-forge #50

Open
ToP29 opened this issue Jul 6, 2018 · 8 comments
Open

Hard resets not working with electron-forge #50

ToP29 opened this issue Jul 6, 2018 · 8 comments

Comments

@ToP29
Copy link

ToP29 commented Jul 6, 2018

I am trying to get hardresets to work with electron-forge, but to start electron-forge you need to execute electron-forge start. Since i can add only path to executable I am unable to use hard resets

I would need something like this:

require('electron-reload')(path.join(__dirname, '../app'), {
	electron: path.join(__dirname, '../node_modules', '.bin', 'electron-forge start')
})
@yan-foto
Copy link
Owner

yan-foto commented Jul 6, 2018

So you want some option to restart electron through electron-forge?

@ToP29
Copy link
Author

ToP29 commented Jul 6, 2018

Yop :)

@yan-foto
Copy link
Owner

yan-foto commented Jul 6, 2018

So one idea would be to enhance options so you could spawn any process and not only electron. Care to submit a pull request?

@ToP29
Copy link
Author

ToP29 commented Jul 6, 2018

I would like to, but I don'n know how :/ I am kinda new at this stuff

yan-foto added a commit that referenced this issue Nov 10, 2018
Allow command line arguments (could be extended to support #50 in the future)
@steeltomato
Copy link

I think this is a bug, not an enhancement. createWatcher applies ignored: ignoredPaths to to both watchers. In the case of the hardWatcher, this results in chokidar ignoring changes to the mainFile.

@yan-foto
Copy link
Owner

@steeltomato Good point, but wrong thread?

@gbrunow
Copy link

gbrunow commented Nov 29, 2021

Is there any updates on this?
Do we have any compatibility with electron-forge yet? I can try and submit a PR if there isn't.

@dreams-and-thoughts
Copy link

This is probably wrong, but I think I had this same problem:

The electron forge app would 'crash' when editing main.js and not recover...

require('electron-reload')(__dirname, {
    electron: path.join(__dirname, 'node_modules', '.bin', 'electron-forge'),
    electronArgv: ['start'],
    hardResetMethod: 'exit',
    awaitWriteFinish: true
})

It solved the problem for me, not sure if relevant to this issue though.

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

No branches or pull requests

5 participants