electron-react-typescript
electron-react-typescript copied to clipboard
HMR not working on "main"?
Is there any easy way to set HMR also on "main" side? because currently it's working only in "renderer" side
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. 😄
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 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.