webpack-hot-middleware
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -21,5 +21,4 @@ module.exports = webpackHotMiddleware; | ||
//for multi-compiler, stats will be an object with a 'children' array of stats | ||
var children = statsResult.children && statsResult.children.length ? | ||
statsResult.children : [statsResult]; | ||
children.forEach(function(stats) { | ||
var bundles = extractBundles(statsResult); | ||
bundles.forEach(function(stats) { | ||
if (opts.log) { | ||
@@ -86,2 +85,13 @@ opts.log("webpack built " + (stats.name ? stats.name + " " : "") + | ||
function extractBundles(stats) { | ||
// Stats has modules, single bundle | ||
if (stats.modules) return [stats]; | ||
// Stats has children, multiple bundles | ||
if (stats.children && stats.children.length) return stats.children; | ||
// Not sure, assume single | ||
return [stats]; | ||
} | ||
function buildModuleMap(modules) { | ||
@@ -88,0 +98,0 @@ var map = {}; |
{ | ||
"name": "webpack-hot-middleware", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Webpack hot reloading you can attach to your own server", | ||
@@ -5,0 +5,0 @@ "main": "middleware.js", |
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
35270
761