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 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(/^[0-9]$/.test(options.contentBase))
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") {