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

Execute code before reloading #120

Open
dtsmarin opened this issue Sep 8, 2023 · 1 comment
Open

Execute code before reloading #120

dtsmarin opened this issue Sep 8, 2023 · 1 comment

Comments

@dtsmarin
Copy link

dtsmarin commented Sep 8, 2023

Is it possible to run code before reloading?

@jasonok6
Copy link

jasonok6 commented Apr 22, 2024

Just ran into this problem. Not possible as is. I created a fork which required adding 3 lines of code that lets you execute a function before reload like so:

require('electron-reload')(__dirname, {
    electron: path.join(__dirname, 'node_modules', '.bin', 'electron'),
    before: runSomeFunction
});

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