webpack-dev-server 4.2.1 → 4.5.0

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
@@ -26,6 +26,7 @@ fast in-memory access to the webpack assets.
26
26
  - [Usage](#usage)
27
27
  - [With the CLI](#with-the-cli)
28
28
  - [With NPM Scripts](#with-npm-scripts)
29
+ - [With the API](#with-the-api)
29
30
  - [The Result](#the-result)
30
31
  - [Browser Support](#browser-support)
31
32
  - [Support](#support)
@@ -93,6 +94,8 @@ Options:
93
94
  --client-logging <value> Allows to specify options for client script in the browser or disable client script.
94
95
  --client-progress Prints compilation progress in percentage in the browser.
95
96
  --no-client-progress Does not print compilation progress in percentage in the browser.
97
+ --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
98
+ --no-client-reconnect Tells dev-server to not to try to connect the client.
96
99
  --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
97
100
  --no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
98
101
  --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
@@ -106,8 +109,9 @@ Options:
106
109
  --client-web-socket-url-protocol <value> Tells clients connected to devServer to use the provided protocol.
107
110
  --client-web-socket-url-username <value> Tells clients connected to devServer to use the provided username to authenticate.
108
111
  --client-web-socket-url-password <value> Tells clients connected to devServer to use the provided password to authenticate.
109
- --web-socket-server <value> Allows to set web socket server and options (by default 'ws').
112
+ --web-socket-server <value> Deprecated: please use 'webSocketServer.type'/'--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
110
113
  --no-web-socket-server Negative 'web-socket-server' option.
114
+ --web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
111
115
  --compress Enables gzip compression for everything served.
112
116
  --no-compress Disables gzip compression for everything served.
113
117
  --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
@@ -115,25 +119,40 @@ Options:
115
119
  --host <value> Allows to specify a hostname to use.
116
120
  --hot [value] Enables Hot Module Replacement.
117
121
  --no-hot Disables Hot Module Replacement.
118
- --http2 Allows to serve over HTTP/2 using SPDY.
122
+ --http2 Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.
119
123
  --no-http2 Does not serve over HTTP/2 using SPDY.
120
- --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
124
+ --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor
125
+ of the `server` option.
121
126
  --no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
122
- --https-passphrase <value> Passphrase for a pfx file.
123
- --https-request-cert Request for an SSL certificate.
124
- --no-https-request-cert Does not request for an SSL certificate.
125
- --https-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
126
- --https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
127
- --https-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
128
- --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
129
- --https-key <value...> Path to an SSL key or content of an SSL key.
130
- --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key.
131
- --https-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
127
+ --https-passphrase <value> Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.
128
+ --https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert`
129
+ option.
130
+ --no-https-request-cert Negative 'https-request-cert' option.
131
+ --https-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, it will be removed in favor of the
132
+ `server.options.ca` option.
133
+ --https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA
134
+ certificate. Deprecated, it will be removed in favor of the `server.options.ca` option.
135
+ --https-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, it will be removed in favor of the
136
+ `server.options.cacert` option.
137
+ --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA
138
+ certificate. Deprecated, it will be removed in favor of the `server.options.cacert` option.
139
+ --https-cert <value...> Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the
140
+ `server.options.cert` option.
141
+ --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL
142
+ certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.
143
+ --https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate
144
+ Revocation Lists). Deprecated, it will be removed in favor of the `server.options.crl` option.
145
+ --https-crl-reset Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists)
146
+ or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, it will be removed in favor of the
147
+ `server.options.crl` option.
148
+ --https-key <value...> Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key`
149
+ option.
150
+ --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated,
151
+ it will be removed in favor of the `server.options.key` option.
152
+ --https-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file. Deprecated, it will be removed in favor of the
153
+ `server.options.pfx` option.
132
154
  --https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
133
- --https-cert <value...> Path to an SSL certificate or content of an SSL certificate.
134
- --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate.
135
- --https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
136
- --https-crl-reset Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
155
+ Deprecated, it will be removed in favor of the `server.options.pfx` option.
137
156
  --ipc [value] Listen to a unix socket.
138
157
  --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default).
139
158
  --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default)
@@ -148,6 +167,29 @@ Options:
148
167
  --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.
149
168
  --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser.
150
169
  --port <value> Allows to specify a port to use.
170
+ --server-type <value> Allows to set server and options (by default 'http').
171
+ --server-options-passphrase <value> Passphrase for a pfx file.
172
+ --server-options-request-cert Request for an SSL certificate.
173
+ --no-server-options-request-cert Negative 'server-options-request-cert' option.
174
+ --server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
175
+ --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content
176
+ of an SSL CA certificate.
177
+ --server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
178
+ --server-options-cacert-reset Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or
179
+ content of an SSL CA certificate.
180
+ --server-options-cert <value...> Path to an SSL certificate or content of an SSL certificate.
181
+ --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content
182
+ of an SSL certificate.
183
+ --server-options-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate
184
+ Revocation Lists).
185
+ --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate
186
+ Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
187
+ --server-options-key <value...> Path to an SSL key or content of an SSL key.
188
+ --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL
189
+ key.
190
+ --server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
191
+ --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of
192
+ an SSL pfx file.
151
193
  --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
152
194
  --no-static Negative 'static' option.
153
195
  --static-directory <value...> Directory for static contents.
@@ -199,6 +241,12 @@ npm run serve
199
241
  NPM will automagically reference the binary in `node_modules` for you, and
200
242
  execute the file or command.
201
243
 
244
+ ### With the API
245
+
246
+ While it's recommended to run webpack-dev-server via the CLI, you may also choose to start a server via the API.
247
+
248
+ See the related [API documentation for `webpack-dev-server`](https://webpack.js.org/api/webpack-dev-server/).
249
+
202
250
  ### The Result
203
251
 
204
252
  Either method will start a server instance and begin listening for connections