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.4.1 to 2.5.0

example/extra.js

7

client.js

@@ -112,7 +112,4 @@ /*eslint-env browser*/

} else {
if (obj.warnings.length > 0) {
problems('warnings', obj);
} else {
success();
}
if (obj.warnings.length > 0) problems('warnings', obj);
success();

@@ -119,0 +116,0 @@ processUpdate(obj.hash, obj.modules, options);

@@ -13,3 +13,6 @@ {

"webpack-hot-middleware": "./../"
},
"scripts": {
"start:multientry": "WEBPACK_CONFIG=./webpack.config.multientry.js node server.js"
}
}

@@ -16,1 +16,12 @@ # Webpack Hot Middleware Example

* Also try making a syntax error in `client.js`.
## Multiple Entry Points Example
There is also an example for multiple entry points in webpack.
```sh
npm run start:multientry
```
* Open page in browser http://localhost:1616/multientry
* Edit `client.js` or `extra.js` & save

@@ -16,3 +16,3 @@ var http = require('http');

var webpack = require('webpack');
var webpackConfig = require('./webpack.config');
var webpackConfig = require(process.env.WEBPACK_CONFIG ? process.env.WEBPACK_CONFIG : './webpack.config');
var compiler = webpack(webpackConfig);

@@ -36,2 +36,5 @@

});
app.get("/multientry", function(req, res) {
res.sendFile(__dirname + '/index-multientry.html');
});

@@ -38,0 +41,0 @@ if (require.main === module) {

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

@@ -5,0 +5,0 @@ "main": "middleware.js",

@@ -81,3 +81,3 @@ # Webpack Hot Middleware

* **noInfo** - Set to `true` to disable informational console logging.
* **reload** - Set to `true` to disable all console logging.
* **quiet** - Set to `true` to disable all console logging.

@@ -106,2 +106,13 @@ ## How it Works

### Use with multiple entry points in webpack
If you want to use [multiple entry points in your webpack config](https://webpack.github.io/docs/multiple-entry-points.html) you need to include the hot middleware client in each entry point. This ensures that each entry point file knows how to handle hot updates. See the [examples folder README](example/README.md) for an example.
```js
entry: {
vendor: ['jquery', 'webpack-hot-middleware/client'],
index: ['./src/index', 'webpack-hot-middleware/client']
}
```
## License

@@ -108,0 +119,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