Skip to content

Webpack plugin to restart electron process automatically on code changes

License

Notifications You must be signed in to change notification settings

tverdohleb/webpack-electron-reload

Repository files navigation

npm info

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.

About

Webpack plugin to restart electron process automatically on code changes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •