Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-hot-middleware

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-hot-middleware - npm Package Compare versions

Comparing version 2.21.0 to 2.21.1

15

middleware.js

@@ -15,12 +15,19 @@ module.exports = webpackHotMiddleware;

compiler.plugin("compile", function() {
if (compiler.hooks) {
compiler.hooks.compile.tap("webpack-hot-middleware", onCompile);
compiler.hooks.done.tap("webpack-hot-middleware", onDone);
} else {
compiler.plugin("compile", onCompile);
compiler.plugin("done", onDone);
}
function onCompile() {
latestStats = null;
if (opts.log) opts.log("webpack building...");
eventStream.publish({action: "building"});
});
compiler.plugin("done", function(statsResult) {
}
function onDone(statsResult) {
// Keep hold of latest stats so they can be propagated to new clients
latestStats = statsResult;
publishStats("built", latestStats, eventStream, opts.log);
});
}
var middleware = function(req, res, next) {

@@ -27,0 +34,0 @@ if (!pathMatch(req.url, opts.path)) return next();

{
"name": "webpack-hot-middleware",
"version": "2.21.0",
"version": "2.21.1",
"description": "Webpack hot reloading you can attach to your own server",

@@ -5,0 +5,0 @@ "keywords": [

@@ -95,3 +95,3 @@ # Webpack Hot Middleware

* **ansiColors** - An object to customize the client overlay colors as mentioned in the [ansi-html](https://github.com/Tjatse/ansi-html/blob/99ec49e431c70af6275b3c4e00c7be34be51753c/README.md#set-colors) package.
* **overlaySyles** - An object to let you override or add new inline styles to the client overlay div.
* **overlayStyles** - An object to let you override or add new inline styles to the client overlay div.

@@ -167,4 +167,8 @@ > Note:

Use [koa-webpack-middleware](https://www.npmjs.com/package/koa-webpack-middleware), which wraps this module and makes it work with koa.
[koa-webpack-middleware](https://www.npmjs.com/package/koa-webpack-middleware)
wraps this module for use with Koa 1.x
[koa-webpack](https://www.npmjs.com/package/koa-webpack)
can be used for Koa 2.x
## Troubleshooting

@@ -171,0 +175,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc