webpack-dev-server 3.8.1 → 3.10.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 +42 -0
- package/bin/cli-flags.js +195 -0
- package/client/index.bundle.js +2 -1
- package/client/index.bundle.js.LICENSE +1 -0
- package/client/live.bundle.js +2 -25
- package/client/live.bundle.js.LICENSE +24 -0
- package/client/sockjs.bundle.js +2 -1
- package/client/sockjs.bundle.js.LICENSE +1 -0
- package/client/utils/createSocketUrl.js +41 -39
- package/lib/Server.js +7 -5
- package/lib/options.json +17 -2
- package/lib/servers/WebsocketServer.js +11 -1
- package/lib/utils/createCertificate.js +11 -4
- package/lib/utils/createConfig.js +1 -1
- package/lib/utils/normalizeOptions.js +3 -0
- package/lib/utils/runBonjour.js +2 -1
- package/lib/utils/runOpen.js +17 -11
- package/package.json +32 -32
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
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.10.1](https://github.com/webpack/webpack-dev-server/compare/v3.10.0...v3.10.1) (2019-12-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* ie11 compatibility ([1306abe](https://github.com/webpack/webpack-dev-server/commit/1306abeb8c5fd125952cdc177fdf38c2c31b3c4f))
|
|
11
|
+
|
|
12
|
+
## [3.10.0](https://github.com/webpack/webpack-dev-server/compare/v3.9.0...v3.10.0) (2019-12-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **client:** allow sock port to use location's port (`sockPort: 'location'`) ([#2341](https://github.com/webpack/webpack-dev-server/issues/2341)) ([dc10d06](https://github.com/webpack/webpack-dev-server/commit/dc10d0647413ad57814b684b5f6ef3659531f0f6))
|
|
18
|
+
* **server:** add `contentBasePublicPath` option ([#2150](https://github.com/webpack/webpack-dev-server/issues/2150)) ([cee700d](https://github.com/webpack/webpack-dev-server/commit/cee700d59aff644a499ee310c4a32d5c5693e559))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **client:** don't override protocol for socket connection to 127.0.0.1 ([#2303](https://github.com/webpack/webpack-dev-server/issues/2303)) ([3a31917](https://github.com/webpack/webpack-dev-server/commit/3a31917a02818dabb3dc549e3e4994618475d131)), closes [#2302](https://github.com/webpack/webpack-dev-server/issues/2302)
|
|
24
|
+
* **server:** respect sockPath on transportMode: 'ws' ([#2310](https://github.com/webpack/webpack-dev-server/issues/2310)) ([#2311](https://github.com/webpack/webpack-dev-server/issues/2311)) ([e188542](https://github.com/webpack/webpack-dev-server/commit/e188542d888dbb55be64c9da2f747343b73c319f))
|
|
25
|
+
* https on chrome linux ([#2330](https://github.com/webpack/webpack-dev-server/issues/2330)) ([dc8b475](https://github.com/webpack/webpack-dev-server/commit/dc8b47510e24649edb38e5a07579be389898189e))
|
|
26
|
+
* support webpack@5 ([#2359](https://github.com/webpack/webpack-dev-server/issues/2359)) ([8f89c01](https://github.com/webpack/webpack-dev-server/commit/8f89c0188579a419dc68021f8bc0fbeae70cbe5d))
|
|
27
|
+
|
|
28
|
+
## [3.9.0](https://github.com/webpack/webpack-dev-server/compare/v3.8.2...v3.9.0) (2019-10-22)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* add `hostname` and `port` to bonjour name to prevent name collisions ([#2276](https://github.com/webpack/webpack-dev-server/issues/2276)) ([d8af2d9](https://github.com/webpack/webpack-dev-server/commit/d8af2d9))
|
|
34
|
+
* add `extKeyUsage` to self-signed cert ([#2274](https://github.com/webpack/webpack-dev-server/issues/2274)) ([a4dbc3b](https://github.com/webpack/webpack-dev-server/commit/a4dbc3b))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* add multiple `openPage` support ([#2266](https://github.com/webpack/webpack-dev-server/issues/2266)) ([c9e9178](https://github.com/webpack/webpack-dev-server/commit/c9e9178))
|
|
40
|
+
|
|
41
|
+
### [3.8.2](https://github.com/webpack/webpack-dev-server/compare/v3.8.1...v3.8.2) (2019-10-02)
|
|
42
|
+
|
|
43
|
+
### Security
|
|
44
|
+
|
|
45
|
+
* update `selfsigned` package
|
|
46
|
+
|
|
5
47
|
### [3.8.1](https://github.com/webpack/webpack-dev-server/compare/v3.8.0...v3.8.1) (2019-09-16)
|
|
6
48
|
|
|
7
49
|
|
package/bin/cli-flags.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ADVANCED_GROUP = 'Advanced options:';
|
|
4
|
+
const DISPLAY_GROUP = 'Stats options:';
|
|
5
|
+
const SSL_GROUP = 'SSL options:';
|
|
6
|
+
const CONNECTION_GROUP = 'Connection options:';
|
|
7
|
+
const RESPONSE_GROUP = 'Response options:';
|
|
8
|
+
const BASIC_GROUP = 'Basic options:';
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
devServer: [
|
|
12
|
+
{
|
|
13
|
+
name: 'bonjour',
|
|
14
|
+
type: Boolean,
|
|
15
|
+
describe: 'Broadcasts the server via ZeroConf networking on start',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'lazy',
|
|
19
|
+
type: Boolean,
|
|
20
|
+
describe: 'Lazy',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'liveReload',
|
|
24
|
+
type: Boolean,
|
|
25
|
+
defaultValue: true,
|
|
26
|
+
describe: 'Enables/Disables live reloading on changing files',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'serveIndex',
|
|
30
|
+
type: Boolean,
|
|
31
|
+
describe: 'Enables/Disables serveIndex middleware',
|
|
32
|
+
defaultValue: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'inline',
|
|
36
|
+
type: Boolean,
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
describe:
|
|
39
|
+
'Inline mode (set to false to disable including client scripts like livereload)',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'profile',
|
|
43
|
+
type: Boolean,
|
|
44
|
+
describe: 'Print compilation profile data for progress steps',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'progress',
|
|
48
|
+
type: Boolean,
|
|
49
|
+
describe: 'Print compilation progress in percentage',
|
|
50
|
+
group: BASIC_GROUP,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'hot-only',
|
|
54
|
+
type: Boolean,
|
|
55
|
+
describe: 'Do not refresh page if HMR fails',
|
|
56
|
+
group: ADVANCED_GROUP,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'stdin',
|
|
60
|
+
type: Boolean,
|
|
61
|
+
describe: 'close when stdin ends',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'open',
|
|
65
|
+
type: String,
|
|
66
|
+
describe:
|
|
67
|
+
'Open the default browser, or optionally specify a browser name',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'useLocalIp',
|
|
71
|
+
type: Boolean,
|
|
72
|
+
describe: 'Open default browser with local IP',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'open-page',
|
|
76
|
+
type: String,
|
|
77
|
+
describe: 'Open default browser with the specified page',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'client-log-level',
|
|
81
|
+
type: String,
|
|
82
|
+
group: DISPLAY_GROUP,
|
|
83
|
+
defaultValue: 'info',
|
|
84
|
+
describe:
|
|
85
|
+
'Log level in the browser (trace, debug, info, warn, error or silent)',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'https',
|
|
89
|
+
type: Boolean,
|
|
90
|
+
group: SSL_GROUP,
|
|
91
|
+
describe: 'HTTPS',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'http2',
|
|
95
|
+
type: Boolean,
|
|
96
|
+
group: SSL_GROUP,
|
|
97
|
+
describe: 'HTTP/2, must be used with HTTPS',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'key',
|
|
101
|
+
type: String,
|
|
102
|
+
describe: 'Path to a SSL key.',
|
|
103
|
+
group: SSL_GROUP,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'cert',
|
|
107
|
+
type: String,
|
|
108
|
+
describe: 'Path to a SSL certificate.',
|
|
109
|
+
group: SSL_GROUP,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'cacert',
|
|
113
|
+
type: String,
|
|
114
|
+
describe: 'Path to a SSL CA certificate.',
|
|
115
|
+
group: SSL_GROUP,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'pfx',
|
|
119
|
+
type: String,
|
|
120
|
+
describe: 'Path to a SSL pfx file.',
|
|
121
|
+
group: SSL_GROUP,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'pfx-passphrase',
|
|
125
|
+
type: String,
|
|
126
|
+
describe: 'Passphrase for pfx file.',
|
|
127
|
+
group: SSL_GROUP,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'content-base',
|
|
131
|
+
type: String,
|
|
132
|
+
describe: 'A directory or URL to serve HTML content from.',
|
|
133
|
+
group: RESPONSE_GROUP,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'watch-content-base',
|
|
137
|
+
type: Boolean,
|
|
138
|
+
describe: 'Enable live-reloading of the content-base.',
|
|
139
|
+
group: RESPONSE_GROUP,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'history-api-fallback',
|
|
143
|
+
type: Boolean,
|
|
144
|
+
describe: 'Fallback to /index.html for Single Page Applications.',
|
|
145
|
+
group: RESPONSE_GROUP,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'compress',
|
|
149
|
+
type: Boolean,
|
|
150
|
+
describe: 'Enable gzip compression',
|
|
151
|
+
group: RESPONSE_GROUP,
|
|
152
|
+
},
|
|
153
|
+
// findPort is currently not set up
|
|
154
|
+
{
|
|
155
|
+
name: 'port',
|
|
156
|
+
type: Number,
|
|
157
|
+
describe: 'The port',
|
|
158
|
+
group: CONNECTION_GROUP,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'disable-host-check',
|
|
162
|
+
type: Boolean,
|
|
163
|
+
describe: 'Will not check the host',
|
|
164
|
+
group: CONNECTION_GROUP,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'socket',
|
|
168
|
+
type: String,
|
|
169
|
+
describe: 'Socket to listen',
|
|
170
|
+
group: CONNECTION_GROUP,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'public',
|
|
174
|
+
type: String,
|
|
175
|
+
describe: 'The public hostname/ip address of the server',
|
|
176
|
+
group: CONNECTION_GROUP,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'host',
|
|
180
|
+
type: String,
|
|
181
|
+
describe: 'The hostname/ip address the server will bind to',
|
|
182
|
+
group: CONNECTION_GROUP,
|
|
183
|
+
},
|
|
184
|
+
// use command-line-args "multiple" option, allowing the usage: --allowed-hosts host1 host2 host3
|
|
185
|
+
// instead of the old, comma-separated syntax: --allowed-hosts host1,host2,host3
|
|
186
|
+
{
|
|
187
|
+
name: 'allowed-hosts',
|
|
188
|
+
type: String,
|
|
189
|
+
describe:
|
|
190
|
+
'A list of hosts that are allowed to access the dev server, separated by spaces',
|
|
191
|
+
group: CONNECTION_GROUP,
|
|
192
|
+
multiple: true,
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
};
|