
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
electron-watcher-webpack-plugin
Advanced tools
Live reload Electron main and renderers processes with webpack plugin
npm install electron-watcher-webpack-plugin --save
Add to webpack.config.js plugins array:
const path = require("path");
const { ElectronWatcherWebpackPlugin } = require("electron-watcher-webpack-plugin");
// ...
module.exports = {
// ...
plugins: [
// ...
new ElectronWatcherWebpackPlugin({
// Absolute path to directory where node_modules placed. Required
root: __dirname,
// List of globs to watch for hard reload. Required
watch: [path.resolve(__dirname, "./src/main")],
// Launch electron only once. Default: true. Optional
once: true,
// Absolute path to nodemon executable. Default: root/node_modules/.bin/nodemon. Optional
nodemon: path.resolve(__dirname, "node_modules", ".bin", "nodemon"),
// Absolute path to electron executable. Default: root/node_modules/.bin/electron. Optional
electron: path.resolve(__dirname, "node_modules", ".bin", "electron"),
// Options to pass to `spawn` process. Optional
options: {
cwd: path.resolve(__dirname, "..")
}
}),
// ...
];
// ...
}
And watch files changes inside main.js:
const { app, BrowserWindow } = require("electron");
// ...
require("electron-watcher-webpack-plugin").watch({
// List of globs for hard refresh
hard: [path.resolve(__dirname, "../main")],
// List of globs for soft refresh
soft: [path.resolve(__dirname, "../renderer")]
// Watching enabled only in dev environment, but you can force watching anytime. Default: false. Optional
forceWatch: false
});
// ...
FAQs
Live reload Electron main and renderers processes with webpack plugin
We found that electron-watcher-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.