1.0.1 • Published 5 years ago
webpack-electron-reload v1.0.1
webpack-electron-reload
Webpack plugin that restarts Electron main process automatically on webpack build. Inspired by electron-reload-webpack-plugin.
Installation
npm install --save-dev webpack-electron-reload
Usage
Add plugin to webpack config
const path = require('path');
const ElectronReloadPlugin = require('webpack-electron-reload')({
path: path.join(__dirname, './dist/main.js'),
});
module.exports = {
// ...
target: 'electron-main',
plugins: [
// ...
ElectronReloadPlugin()
],
// ...
};
Start webpack with 'watch' option
webpack --watch
Plugin will start/restart electron app when webpack rebuilds sources.