webpack-hot-middleware
Advanced tools
Comparing version 2.0.0 to 2.0.1
/*eslint-env browser*/ | ||
/*global __resourceQuery*/ | ||
require("eventsource-polyfill"); | ||
var options = { | ||
@@ -5,0 +7,0 @@ path: "/__webpack_hmr", |
@@ -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 @@ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
16282
353
92
2
1
+ Addedeventsource-polyfill@^0.9.6
+ Addedeventsource-polyfill@0.9.6(transitive)