webpack-dev-server 2.9.7 → 2.11.1

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,6 +19,15 @@ live reloading. This should be used for **development only**.
19
19
  It uses [webpack-dev-middleware][middleware-url] under the hood, which provides
20
20
  fast in-memory access to the webpack assets.
21
21
 
22
+ ## Project in Maintenance
23
+
24
+ **Please note that `webpack-dev-server` is presently in a maintenance-only mode**
25
+ and will not be accepting any additional features in the near term. Most new feature
26
+ requests can be accomplished with Express middleware; please look into using
27
+ the [`before`](https://webpack.js.org/configuration/dev-server/#devserver-before)
28
+ and [`after`](https://webpack.js.org/configuration/dev-server/#devserver-after)
29
+ hooks in the documentation.
30
+
22
31
  ## Getting Started
23
32
 
24
33
  First thing's first, install the module:
@@ -75,18 +84,15 @@ you edit your assets while the server is running.
75
84
 
76
85
  See [**the documentation**][docs-url] for more use cases and options.
77
86
 
78
- ## Caveats
87
+ ## Browser Support
79
88
 
80
- Version 2.8.0 introduced a change which included ES6 keywords `const` and `let`
81
- within the scripts being served to the browser. This effects environments which
82
- support _no ES6 whatsoever_, including older versions of UglifyJS and Internet
83
- Explorer. This was not considered a breaking change at the time due to official
84
- support for oldIE ending in 2016, rather this was seen as a maintenance update.
85
- Those wishing to support oldIE should stick with version 2.7.1.
89
+ While `webpack-dev-server` transpiles the client (browser) scripts to an ES5
90
+ state, the project only officially supports the _last two versions of major
91
+ browsers_. We simply don't have the resources to support every whacky
92
+ browser out there.
86
93
 
87
- For version 2.8.0+ those using UglifyJS in their webpack configs should use the
88
- beta version of [uglifyjs-webpack-plugin][uglify-url] independently, and _not_
89
- the built-in plugin. This will change once the new version is out of beta.
94
+ If you find an bug with an obscure / old browser, we would actively welcome a
95
+ Pull Request to resolve the bug.
90
96
 
91
97
  ## Support
92
98
 
@@ -55,7 +55,8 @@ require('webpack/bin/config-yargs')(yargs);
55
55
 
56
56
  // It is important that this is done after the webpack yargs config,
57
57
  // so it overrides webpack's version info.
58
- yargs.version(versionInfo);
58
+ yargs
59
+ .version(versionInfo());
59
60
 
60
61
  const ADVANCED_GROUP = 'Advanced options:';
61
62
  const DISPLAY_GROUP = 'Stats options:';
@@ -247,6 +248,8 @@ function processOptions(webpackOptions) {
247
248
 
248
249
  if (argv.socket) { options.socket = argv.socket; }
249
250
 
251
+ if (argv.progress) { options.progress = argv.progress; }
252
+
250
253
  if (!options.publicPath) {
251
254
  // eslint-disable-next-line
252
255
  options.publicPath = firstWpOpt.output && firstWpOpt.output.publicPath || '';
@@ -294,7 +297,9 @@ function processOptions(webpackOptions) {
294
297
  };
295
298
  }
296
299
 
297
- if (typeof options.stats === 'object' && typeof options.stats.colors === 'undefined') { options.stats.colors = argv.color; }
300
+ if (typeof options.stats === 'object' && typeof options.stats.colors === 'undefined') {
301
+ options.stats = Object.assign({}, options.stats, { colors: argv.color });
302
+ }
298
303
 
299
304
  if (argv.lazy) { options.lazy = true; }
300
305
 
@@ -368,7 +373,7 @@ function startDevServer(webpackOptions, options) {
368
373
  throw e;
369
374
  }
370
375
 
371
- if (argv.progress) {
376
+ if (options.progress) {
372
377
  compiler.apply(new webpack.ProgressPlugin({
373
378
  profile: argv.profile
374
379
  }));
@@ -445,7 +450,8 @@ function reportReadiness(uri, options) {
445
450
  if (options.socket) {
446
451
  startSentence = `Listening to socket at ${colorInfo(useColor, options.socket)}`;
447
452
  }
448
- console.log((argv.progress ? '\n' : '') + startSentence);
453
+
454
+ console.log((options.progress ? '\n' : '') + startSentence);
449
455
 
450
456
  console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);
451
457