webpack-hot-middleware
Advanced tools
Comparing version 2.4.1 to 2.5.0
@@ -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 @@ |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
31869
24
679
121
5