Webpack plugin that restarts Electron main process automatically on webpack build. Inspired by electron-reload-webpack-plugin.
npm install --save-dev webpack-electron-reload
const path = require('path');
const ElectronReloadPlugin = require('webpack-electron-reload')({
path: path.join(__dirname, './dist/main.js'),
});
module.exports = {
// ...
target: 'electron-main',
plugins: [
// ...
ElectronReloadPlugin()
],
// ...
};
webpack --watch
Plugin will start/restart electron app when webpack rebuilds sources.