webpack-dev-server 3.3.0 → 3.3.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/CHANGELOG.md +12 -3
- package/bin/webpack-dev-server.js +0 -3
- package/lib/Server.js +9 -5
- package/lib/options.json +21 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.3.1](https://github.com/webpack/webpack-dev-server/compare/v3.3.0...v3.3.1) (2019-04-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **regression:** always get necessary stats for hmr ([#1780](https://github.com/webpack/webpack-dev-server/issues/1780)) ([66b04a9](https://github.com/webpack/webpack-dev-server/commit/66b04a9))
|
|
11
|
+
* **regression:** host and port can be undefined or null ([#1779](https://github.com/webpack/webpack-dev-server/issues/1779)) ([028ceee](https://github.com/webpack/webpack-dev-server/commit/028ceee))
|
|
12
|
+
* only add entries after compilers have been created ([#1774](https://github.com/webpack/webpack-dev-server/issues/1774)) ([b31cbaa](https://github.com/webpack/webpack-dev-server/commit/b31cbaa))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
# [3.3.0](https://github.com/webpack/webpack-dev-server/compare/v3.2.1...v3.3.0) (2019-04-08)
|
|
6
17
|
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
|
9
20
|
|
|
10
|
-
* **deps:** update dependency yargs to v12.0.5 ([#1707](https://github.com/webpack/webpack-dev-server/issues/1707)) ([fa17131](https://github.com/webpack/webpack-dev-server/commit/fa17131))
|
|
11
|
-
* **example/util:** use path.resolve ([#1678](https://github.com/webpack/webpack-dev-server/issues/1678)) ([5d1476e](https://github.com/webpack/webpack-dev-server/commit/5d1476e)), closes [#1428](https://github.com/webpack/webpack-dev-server/issues/1428)
|
|
12
21
|
* compatibility with webpack-cli@3.3 ([#1754](https://github.com/webpack/webpack-dev-server/issues/1754)) ([fd7cb0d](https://github.com/webpack/webpack-dev-server/commit/fd7cb0d))
|
|
13
22
|
* ignore proxy when bypass return false ([#1696](https://github.com/webpack/webpack-dev-server/issues/1696)) ([aa7de77](https://github.com/webpack/webpack-dev-server/commit/aa7de77))
|
|
14
23
|
* respect stats option from webpack config ([#1665](https://github.com/webpack/webpack-dev-server/issues/1665)) ([efaa740](https://github.com/webpack/webpack-dev-server/commit/efaa740))
|
|
15
24
|
* use location.port when location.hostname is used to infer HMR socket URL ([#1664](https://github.com/webpack/webpack-dev-server/issues/1664)) ([2f7f052](https://github.com/webpack/webpack-dev-server/commit/2f7f052))
|
|
16
|
-
*
|
|
25
|
+
* don't crash with express.static.mime.types ([#1765](https://github.com/webpack/webpack-dev-server/issues/1765)) ([919ff77](https://github.com/webpack/webpack-dev-server/commit/919ff77))
|
|
17
26
|
|
|
18
27
|
|
|
19
28
|
### Features
|
|
@@ -20,7 +20,6 @@ const webpack = require('webpack');
|
|
|
20
20
|
const options = require('./options');
|
|
21
21
|
const Server = require('../lib/Server');
|
|
22
22
|
|
|
23
|
-
const addEntries = require('../lib/utils/addEntries');
|
|
24
23
|
const colors = require('../lib/utils/colors');
|
|
25
24
|
const createConfig = require('../lib/utils/createConfig');
|
|
26
25
|
const createDomain = require('../lib/utils/createDomain');
|
|
@@ -140,8 +139,6 @@ function processOptions(config) {
|
|
|
140
139
|
function startDevServer(config, options) {
|
|
141
140
|
const log = createLogger(options);
|
|
142
141
|
|
|
143
|
-
addEntries(config, options);
|
|
144
|
-
|
|
145
142
|
let compiler;
|
|
146
143
|
|
|
147
144
|
try {
|
package/lib/Server.js
CHANGED
|
@@ -97,10 +97,8 @@ class Server {
|
|
|
97
97
|
|
|
98
98
|
updateCompiler(compiler, options);
|
|
99
99
|
|
|
100
|
-
this.
|
|
101
|
-
options.stats && Object.keys(options.stats).length
|
|
102
|
-
? options.stats
|
|
103
|
-
: Server.DEFAULT_STATS;
|
|
100
|
+
this.originalStats =
|
|
101
|
+
options.stats && Object.keys(options.stats).length ? options.stats : {};
|
|
104
102
|
|
|
105
103
|
this.hot = options.hot || options.hotOnly;
|
|
106
104
|
this.headers = options.headers;
|
|
@@ -724,7 +722,13 @@ class Server {
|
|
|
724
722
|
}
|
|
725
723
|
|
|
726
724
|
getStats(statsObj) {
|
|
727
|
-
|
|
725
|
+
const stats = Server.DEFAULT_STATS;
|
|
726
|
+
|
|
727
|
+
if (this.originalStats.warningsFilter) {
|
|
728
|
+
stats.warningsFilter = this.originalStats.warningsFilter;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
return statsObj.toJson(stats);
|
|
728
732
|
}
|
|
729
733
|
|
|
730
734
|
use() {
|
package/lib/options.json
CHANGED
|
@@ -17,7 +17,27 @@
|
|
|
17
17
|
"type": "boolean"
|
|
18
18
|
},
|
|
19
19
|
"host": {
|
|
20
|
-
"
|
|
20
|
+
"anyOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "null"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"port": {
|
|
30
|
+
"anyOf": [
|
|
31
|
+
{
|
|
32
|
+
"type": "number"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
21
41
|
},
|
|
22
42
|
"allowedHosts": {
|
|
23
43
|
"type": "array",
|
|
@@ -41,16 +61,6 @@
|
|
|
41
61
|
"publicPath": {
|
|
42
62
|
"type": "string"
|
|
43
63
|
},
|
|
44
|
-
"port": {
|
|
45
|
-
"anyOf": [
|
|
46
|
-
{
|
|
47
|
-
"type": "number"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "string"
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
64
|
"socket": {
|
|
55
65
|
"type": "string"
|
|
56
66
|
},
|