electron-react-typescript icon indicating copy to clipboard operation
electron-react-typescript copied to clipboard

HMR not working on "main"?

Open gididaf opened this issue 6 years ago • 3 comments
trafficstars

Is there any easy way to set HMR also on "main" side? because currently it's working only in "renderer" side

gididaf avatar Jul 21 '19 20:07 gididaf

I haven't been very successful with this so far. I had a few ideas for this in the past but nothing that was quite working as of yet. If you have any good ideas, open a PR and maybe we can add it together. 😄

Robinfr avatar Oct 14 '19 12:10 Robinfr

The main process is actually an electron process. The only way is to stop and restart it. you can do this with nodemon, a custom script with chokidar, or pm2 package. Since your directory structure is setup nicely for the structure of how electron applications work. it would be relatively easy to monitor just the main process files.

Css-IanM avatar May 27 '20 14:05 Css-IanM

@Css-IanM there are several MRs open that implement this, I was mostly waiting for people to show interest in it. Let me know if you also want this, then I'll try to get it in.

Robinfr avatar May 28 '20 06:05 Robinfr