Socket
Socket
Sign inDemoInstall

webpack-hot-middleware

Package Overview
Dependencies
Maintainers
3
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.22.3 to 2.23.0

20

middleware.js

@@ -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,

9

package.json
{
"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

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