Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tverdohleb/webpack-electron-reload
Webpack plugin to restart electron process automatically on code changes
https://github.com/tverdohleb/webpack-electron-reload
electron livereload reload restart webpack webpack-plugin
Last synced: 3 months ago
JSON representation
Webpack plugin to restart electron process automatically on code changes
- Host: GitHub
- URL: https://github.com/tverdohleb/webpack-electron-reload
- Owner: tverdohleb
- License: mit
- Created: 2019-08-29T12:29:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T19:50:44.000Z (4 months ago)
- Last Synced: 2024-09-10T00:20:05.162Z (4 months ago)
- Topics: electron, livereload, reload, restart, webpack, webpack-plugin
- Language: TypeScript
- Homepage:
- Size: 106 KB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.