Socket
Socket
Sign inDemoInstall

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.2.1 to 2.3.0

process-update.js

13

client.js

@@ -100,4 +100,5 @@ /*eslint-env browser*/

var processUpdate = require('./processUpdate');
var processUpdate = require('./process-update');
var customHandler;
function processMessage(obj) {

@@ -119,3 +120,13 @@ if (obj.action == "building") {

}
} else if (customHandler) {
customHandler(obj);
}
}
if (module) {
module.exports = {
subscribe: function subscribe(handler) {
customHandler = handler;
}
};
}

5

middleware.js

@@ -31,6 +31,8 @@ module.exports = webpackHotMiddleware;

});
return function(req, res, next) {
var middleware = function(req, res, next) {
if (!pathMatch(req.url, opts.path)) return next();
eventStream.handler(req, res);
};
middleware.publish = eventStream.publish;
return middleware;
}

@@ -57,2 +59,3 @@

'Content-Type': 'text/event-stream;charset=utf-8',
'Transfer-Encoding': 'chunked',
'Cache-Control': 'no-cache, no-transform',

@@ -59,0 +62,0 @@ 'Connection': 'keep-alive'

{
"name": "webpack-hot-middleware",
"version": "2.2.1",
"version": "2.3.0",
"description": "Webpack hot reloading you can attach to your own server",
"main": "middleware.js",
"scripts": {
"test": "mocha"
"test": "mocha",
"travis": "istanbul cover _mocha --"
},

@@ -19,4 +20,9 @@ "repository": {

"devDependencies": {
"mocha": "^2.3.2"
"express": "^4.13.3",
"mocha": "^2.3.2",
"supertest": "^1.1.0",
"sinon": "^1.12.2",
"coveralls": "^2.11.2",
"istanbul": "^0.3.14"
}
}

@@ -5,2 +5,4 @@ # Webpack Hot Middleware

[![npm version](https://img.shields.io/npm/v/webpack-hot-middleware.svg)](https://www.npmjs.com/package/webpack-hot-middleware) [![Build Status](https://img.shields.io/travis/glenjamin/webpack-hot-middleware/master.svg)](https://travis-ci.org/glenjamin/webpack-hot-middleware) [![Coverage Status](https://coveralls.io/repos/glenjamin/webpack-hot-middleware/badge.svg?branch=master)](https://coveralls.io/r/glenjamin/webpack-hot-middleware?branch=master) ![MIT Licensed](https://img.shields.io/npm/l/webpack-hot-middleware.svg)
## Installation & Usage

@@ -7,0 +9,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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