# webpack-electron-reload

> Webpack plugin which restarts electron process on recompile

Latest version **1.0.1** (published 2020-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-electron-reload
pnpm add webpack-electron-reload
yarn add webpack-electron-reload
bun add webpack-electron-reload
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-05 |
| First published | 2019-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Valeriy Tverdohleb |
| Maintainers | tverdohleb |
| Keywords | electron, webpack, webpack-plugin, plugin, live-reload |

## Links

- npm: https://www.npmjs.com/package/webpack-electron-reload
- Repository: git@github.com:tverdohleb/webpack-electron-reload
- Homepage: https://github.com/tverdohleb/webpack-electron-reload
- Issues: https://github.com/tverdohleb/webpack-electron-reload/issues
- npm.io page: https://npm.io/package/webpack-electron-reload

## Dependencies (1)

- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-04-05
- 1.0.0 — 2019-08-30
- 0.0.4 — 2019-08-30
- 0.0.3 — 2019-08-30
- 0.0.2 — 2019-08-29
- 0.0.1 — 2019-08-29

## README

[npm_img]: https://img.shields.io/npm/v/webpack-electron-reload.svg?style=flat-square
[npm_site]: https://www.npmjs.org/package/webpack-electron-reload

[![npm info][npm_img]][npm_site]

# webpack-electron-reload
[Webpack](https://webpack.js.org/) plugin that restarts [Electron](https://electronjs.org/) main process automatically on webpack build. Inspired by [electron-reload-webpack-plugin](https://github.com/O4epegb/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.

---
_Source: https://npm.io/package/webpack-electron-reload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
