webpack-hot-middleware
Advanced tools
Comparing version 2.21.0 to 2.21.1
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28076
583
202