# webpack-electron-connect-plugin

> webpack plugin to reload and restart Electron

Latest version **1.0.4** (published 2018-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-electron-connect-plugin
pnpm add webpack-electron-connect-plugin
yarn add webpack-electron-connect-plugin
bun add webpack-electron-connect-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-03-06 |
| First published | 2018-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | bytefunc |
| Maintainers | bytefunc |
| Keywords | electron, webpack, plugin, webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/webpack-electron-connect-plugin
- Repository: https://github.com/bytefunc/webpack-electron-connect-plugin
- Homepage: https://github.com/bytefunc/webpack-electron-connect-plugin#readme
- Issues: https://github.com/bytefunc/webpack-electron-connect-plugin/issues
- npm.io page: https://npm.io/package/webpack-electron-connect-plugin

## 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.4 (latest) — 2018-03-06
- 1.0.3 — 2018-03-06
- 1.0.2 — 2018-02-09
- 1.0.1 — 2018-02-09
- 1.0.0 — 2018-02-09

## README

# webpack-electron-connect-plugin

webpack plugin to reload and restart Electron

requires electron-connect package

## Installation

```javascript
npm install --save-dev electron-connect webpack-electron-connect-plugin

or

yarn add --dev electron-connect webpack-electron-connect-plugin
```

## Usage

Electron renderer process

```html
<html>
<body>

<!-- add script -->
<script>require('electron-connect').client.create()</script>

</body>
</html>
```

webpack.config

```javascript
const ElectronConnectPlugin = require("webpack-electron-connect-plugin");

{
    // ...
    plugins: [
        new ElectronConnectPlugin({
            type: "reload", // "reload" or "restart"
            options: {}
        })
    ];
}
```

use webpack watch option

```cli
webpack -w
```

## API

### type

```javascript
// Not kill Electron process. reload Electron
{
    type: "reload",
}

// Kill Electron process. restart Electron
{
    type: "restart",
}
```

### options

check [server.create([options])](https://www.npmjs.com/package/electron-connect) from npm electron-connect page

```javascript
// example
{
    options: {
        port: 30080, // WebSocket server port (default: 30080)
    }
}
```

## License

MIT

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