Javascript – Sync code changes in electron app while developing

electronjavascriptlivereloadnodemon

Are there any tools to live reload electron app when code is changed similar to browser-sync for web?

Whenever we change code for electron app, I am terminating existing running process and relaunching with
electron .
Are they any tools to reload electron app automatically when code is changed.

Best Answer

In this case, you should take a look at development tools for NodeJS process management. My personal favorite is nodemon because you can either use config file or pass something like this:

nodemon --watch . --exec "electron ."

And it will work just fine. But again, it's my opinion, pick the right for you from the list.