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.1.0 to 2.2.0

.travis.yml

5

middleware.js
module.exports = webpackHotMiddleware;
var helpers = require('./helpers');
var pathMatch = helpers.pathMatch;
function webpackHotMiddleware(compiler, opts) {

@@ -29,3 +32,3 @@ opts = opts || {};

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

@@ -32,0 +35,0 @@ };

7

package.json
{
"name": "webpack-hot-middleware",
"version": "2.1.0",
"version": "2.2.0",
"description": "Webpack hot reloading you can attach to your own server",
"main": "middleware.js",
"scripts": {
"test": "echo \"Maybe someday\""
"test": "mocha"
},

@@ -17,3 +17,6 @@ "repository": {

"strip-ansi": "^2.0.1"
},
"devDependencies": {
"mocha": "^2.3.2"
}
}

@@ -87,2 +87,16 @@ # Webpack Hot Middleware

## Troubleshooting
### Use on browsers without EventSource
If you want to use this module with browsers that don't support eventsource, you'll need to use a [polyfill](https://libraries.io/search?platforms=NPM&q=eventsource+polyfill). See [issue #11](https://github.com/glenjamin/webpack-hot-middleware/issues/11)
### Not receiving updates in client when using Gzip
This is because gzip generally buffers the response, but the Server Sent Events event-stream expects to be able to send data to the client immediately. You should make sure gzipping isn't being applied to the event-stream. See [issue #10](https://github.com/glenjamin/webpack-hot-middleware/issues/10).
### Use with auto-restarting servers
This module expects to remain running while you make changes to your webpack bundle, if you use a process manager like nodemon then you will likely see very slow changes on the client side. If you want to reload the server component, either use a separate process, or find a way to reload your server routes without restarting the whole process.
## License

@@ -89,0 +103,0 @@

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