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.0.0 to 2.0.1

2

client.js
/*eslint-env browser*/
/*global __resourceQuery*/
require("eventsource-polyfill");
var options = {

@@ -5,0 +7,0 @@ path: "/__webpack_hmr",

4

middleware.js

@@ -29,3 +29,3 @@ module.exports = webpackHotMiddleware;

return function(req, res, next) {
if (req.url !== opts.path) return next();
if (req.path !== opts.path) return next();
eventStream.handler(req, res);

@@ -54,3 +54,3 @@ };

'Content-Type': 'text/event-stream;charset=utf-8',
'Cache-Control': 'no-cache',
'Cache-Control': 'no-cache, no-transform',
'Connection': 'keep-alive'

@@ -57,0 +57,0 @@ });

{
"name": "webpack-hot-middleware",
"version": "2.0.0",
"version": "2.0.1",
"description": "Webpack hot reloading you can attach to your own server",

@@ -16,4 +16,5 @@ "main": "middleware.js",

"dependencies": {
"eventsource-polyfill": "^0.9.6",
"strip-ansi": "^2.0.1"
}
}

@@ -79,2 +79,10 @@ # Webpack Hot Middleware

## How it Works
The middleware installs itself as a webpack plugin, and listens for compiler events.
Each connected client gets a [Server Sent Events](http://www.html5rocks.com/en/tutorials/eventsource/basics/) connection, the server will publish notifications to connected clients on compiler events.
When the client receives a message, it will check to see if the local code is up to date. If it isn't up to date, it will trigger webpack hot module reloading.
## License

@@ -81,0 +89,0 @@

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