webpack-dev-server 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/bin/webpack-dev-server.js +12 -1
- package/client/index.bundle.js +1 -3
- package/client/index.js +10 -2
- package/client/live.bundle.js +3 -6
- package/client/sockjs.bundle.js +1 -2
- package/lib/Server.js +62 -52
- package/lib/util/addDevServerEntrypoints.js +4 -2
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -19,8 +19,6 @@ Use [webpack](https://webpack.js.org) with a development server that provides li
|
|
|
19
19
|
|
|
20
20
|
It uses [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) under the hood, which provides fast in-memory access to the webpack assets.
|
|
21
21
|
|
|
22
|
-
**Note: There are known issues with Node.js v7 and webpack / webpack-dev-server. Please use Node.js v6 for the moment.**
|
|
23
|
-
|
|
24
22
|
<h2 align="center">Install</h2>
|
|
25
23
|
|
|
26
24
|
```
|
|
@@ -247,7 +247,11 @@ function processOptions(wpOpt) {
|
|
|
247
247
|
if(options.contentBase === undefined) {
|
|
248
248
|
if(argv["content-base"]) {
|
|
249
249
|
options.contentBase = argv["content-base"];
|
|
250
|
-
if(
|
|
250
|
+
if(Array.isArray(options.contentBase)) {
|
|
251
|
+
options.contentBase = options.contentBase.map(function(val) {
|
|
252
|
+
return path.resolve(val);
|
|
253
|
+
});
|
|
254
|
+
} else if(/^[0-9]$/.test(options.contentBase))
|
|
251
255
|
options.contentBase = +options.contentBase;
|
|
252
256
|
else if(!/^(https?:)?\/\//.test(options.contentBase))
|
|
253
257
|
options.contentBase = path.resolve(options.contentBase);
|
|
@@ -361,6 +365,13 @@ function startDevServer(wpOpt, options) {
|
|
|
361
365
|
throw e;
|
|
362
366
|
}
|
|
363
367
|
|
|
368
|
+
["SIGINT", "SIGTERM"].forEach(function(sig) {
|
|
369
|
+
process.on(sig, function() {
|
|
370
|
+
server.close();
|
|
371
|
+
process.exit(); // eslint-disable-line no-process-exit
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
|
|
364
375
|
if(options.socket) {
|
|
365
376
|
server.listeningApp.on("error", function(e) {
|
|
366
377
|
if(e.code === "EADDRINUSE") {
|