
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
webpack-watcher
Advanced tools
A wrapper around webpack compilers which:
var webpack = require('webpack');
var WebpackWatcher = require('webpack-watcher');
var config = require('./path/to/your/webpack.config');
var compiler = webpack(config);
var watcher = new WebpackWatcher(compiler);
watcher.onceDone(function(err, stats) {
// Called once the current compilation process has completed. If the
// process has already completed, the function will be called immediately.
// If a compilation process is already underway, concurrent calls to
// `onceDone` will stack up until the process completes.
});
watcher.writeAssets(function(err, filenames) {
// Read the assets from memory and write them to the file system
});
watcher.onDone(function(err, stats) {
// Called every time the compilation completes
});
watcher.onInvalid(function() {
// Called whenever the compiler's watcher determines that the bundle
// needs to be recompiled
});
watcher.onFailed(function(err) {
// Called if the compilation process failed or produced errors
});
// Run the compilation process once and start the watcher.
// Called automatically by `onceDone`, if `watch: true`
watcher.watch();
// Run the compilation process once.
// Called automatically by `onceDone`, if `watch: false`
watcher.run();
// Force the compiler to invalidate the assets.
watcher.invalidate();
// Close the compiler's watcher
watcher.close();
var watcher = new WebpackWatcher(webpack(config), {
// Defaults
// --------
// Indicates that your source files should be watched for changes
watch: true,
// The delay between a change being detected and the restart
// of the compilation process
watchDelay: 200,
// Reduces the overhead of background compilation by forcing
// the compiler to write to an in-memory filesystem.
useMemoryFS: true
});
This codebase is heavily indebted to webpack-dev-middleware.
FAQs
Webpack compiler wrapper
The npm package webpack-watcher receives a total of 14 weekly downloads. As such, webpack-watcher popularity was classified as not popular.
We found that webpack-watcher 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.