webpack-hot-middleware
Advanced tools
Comparing version 2.22.3 to 2.23.0
@@ -94,11 +94,25 @@ module.exports = webpackHotMiddleware; | ||
function publishStats(action, statsResult, eventStream, log) { | ||
var stats = statsResult.toJson({ | ||
all: false, | ||
children: true, | ||
modules: true, | ||
timings: true, | ||
hash: true | ||
}); | ||
// For multi-compiler, stats will be an object with a 'children' array of stats | ||
var bundles = extractBundles(statsResult.toJson({ errorDetails: false })); | ||
var bundles = extractBundles(stats); | ||
bundles.forEach(function(stats) { | ||
var name = stats.name || ""; | ||
// Fallback to compilation name in case of 1 bundle | ||
if (bundles.length === 1 && !name) { | ||
name = statsResult.compilation.name || ""; | ||
} | ||
if (log) { | ||
log("webpack built " + (stats.name ? stats.name + " " : "") + | ||
log("webpack built " + (name ? name + " " : "") + | ||
stats.hash + " in " + stats.time + "ms"); | ||
} | ||
eventStream.publish({ | ||
name: stats.name, | ||
name: name, | ||
action: action, | ||
@@ -105,0 +119,0 @@ time: stats.time, |
{ | ||
"name": "webpack-hot-middleware", | ||
"version": "2.22.3", | ||
"version": "2.23.0", | ||
"description": "Webpack hot reloading you can attach to your own server", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
"test": "mocha", | ||
"security": "nsp check", | ||
"security": "npm audit", | ||
"ci:lint": "npm run lint && npm run security", | ||
@@ -42,7 +42,6 @@ "ci:test": "npm run test", | ||
"istanbul": "^0.4.2", | ||
"mocha": "^2.3.2", | ||
"nsp": "^3.2.1", | ||
"mocha": "^5.2.0", | ||
"sinon": "^1.12.2", | ||
"supertest": "^1.1.0" | ||
"supertest": "^3.1.0" | ||
} | ||
} |
@@ -26,4 +26,4 @@ # Webpack Hot Middleware | ||
plugins: [ | ||
// OccurenceOrderPlugin is needed for webpack 1.x only | ||
new webpack.optimize.OccurenceOrderPlugin(), | ||
// OccurrenceOrderPlugin is needed for webpack 1.x only | ||
new webpack.optimize.OccurrenceOrderPlugin(), | ||
new webpack.HotModuleReplacementPlugin(), | ||
@@ -30,0 +30,0 @@ // Use NoErrorsPlugin for webpack 1.x |
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
30222
6
618