Reload Electron on HTML changes

If you want to reload an Electron window on HTML changes:

npm i electron-reload

Now add the package on the top of the Electron main.js:

// If you want to reload only on html changes

// You could also omit the index.html file
// require('electron-reload')();

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.