webpack-electron-reload
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i webpack-electron-reload

Weekly Downloads

213

Version

1.0.1

License

MIT

Unpacked Size

5.88 kB

Total Files

7

Last publish

Collaborators

  • tverdohleb