webpack-dev-server 4.3.1 → 4.7.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)
@@ -85,55 +86,63 @@ Options:
85
86
  --watch-options-stdin Stop watching when stdin stream has ended.
86
87
  --no-watch-options-stdin Do not stop watching when stdin stream has ended.
87
88
  --allowed-hosts <value...> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').
88
- --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').
89
+ --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when
90
+ you are proxying dev server, by default is 'auto').
89
91
  --bonjour Allows to broadcasts dev server via ZeroConf networking on start.
90
92
  --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start.
91
- --client-web-socket-transport <value> Allows to set custom web socket transport to communicate with dev server.
92
93
  --no-client Negative 'client' option.
93
- --client-logging <value> Allows to specify options for client script in the browser or disable client script.
94
- --client-progress Prints compilation progress in percentage in the browser.
95
- --no-client-progress Does not print compilation progress in percentage in the browser.
94
+ --client-logging <value> Allows to set log level in the browser.
96
95
  --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
97
96
  --no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
98
97
  --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
99
98
  --no-client-overlay-errors Negative 'client-overlay-errors' option.
100
99
  --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
101
100
  --no-client-overlay-warnings Negative 'client-overlay-warnings' option.
101
+ --client-progress Prints compilation progress in percentage in the browser.
102
+ --no-client-progress Does not print compilation progress in percentage in the browser.
103
+ --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
104
+ --no-client-reconnect Tells dev-server to not to try to connect the client.
105
+ --client-web-socket-transport <value> Allows to set custom web socket transport to communicate with dev server.
102
106
  --client-web-socket-url <value> Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).
103
107
  --client-web-socket-url-hostname <value> Tells clients connected to devServer to use the provided hostname.
104
- --client-web-socket-url-port <value> Tells clients connected to devServer to use the provided port.
108
+ --client-web-socket-url-password <value> Tells clients connected to devServer to use the provided password to authenticate.
105
109
  --client-web-socket-url-pathname <value> Tells clients connected to devServer to use the provided path to connect.
110
+ --client-web-socket-url-port <value> Tells clients connected to devServer to use the provided port.
106
111
  --client-web-socket-url-protocol <value> Tells clients connected to devServer to use the provided protocol.
107
112
  --client-web-socket-url-username <value> Tells clients connected to devServer to use the provided username to authenticate.
108
- --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').
110
- --no-web-socket-server Negative 'web-socket-server' option.
111
113
  --compress Enables gzip compression for everything served.
112
114
  --no-compress Disables gzip compression for everything served.
113
- --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
+ --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
116
+ History API.
114
117
  --no-history-api-fallback Negative 'history-api-fallback' option.
115
118
  --host <value> Allows to specify a hostname to use.
116
119
  --hot [value] Enables Hot Module Replacement.
117
120
  --no-hot Disables Hot Module Replacement.
118
- --http2 Allows to serve over HTTP/2 using SPDY.
121
+ --http2 Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.
119
122
  --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).
123
+ --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.
121
124
  --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.
125
+ --https-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
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. Deprecated, use the
127
+ `server.options.ca` option.
128
+ --https-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
129
+ --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the
130
+ `server.options.ca` option.
131
+ --https-cert <value...> Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.
132
+ --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the
133
+ `server.options.cert` option.
134
+ --https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the
135
+ `server.options.crl` option.
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
137
+ (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.
138
+ --https-key <value...> Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.
139
+ --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.
140
+ --https-passphrase <value> Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.
141
+ --https-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.
142
+ --https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the
143
+ `server.options.pfx` option.
144
+ --https-request-cert Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.
124
145
  --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.
132
- --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).
137
146
  --ipc [value] Listen to a unix socket.
138
147
  --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default).
139
148
  --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default)
@@ -141,25 +150,48 @@ Options:
141
150
  --no-magic-html Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
142
151
  --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).
143
152
  --no-open Does not open the default browser.
144
- --open-target <value...> Opens specified page in browser.
153
+ --open-app <value...> Open specified browser. Deprecated: please use '--open-app-name'.
145
154
  --open-app-name <value...> Open specified browser.
146
- --open-app <value...> Open specified browser.
147
- --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).
148
- --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.
149
155
  --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser.
156
+ --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started
157
+ (set it to true to open your default browser).
158
+ --open-target <value...> Opens specified page in browser.
159
+ --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.
150
160
  --port <value> Allows to specify a port to use.
161
+ --server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
162
+ --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
163
+ --server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
164
+ --server-options-cacert-reset Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated,
165
+ use the `server.options.ca` option.
166
+ --server-options-cert <value...> Path to an SSL certificate or content of an SSL certificate.
167
+ --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.
168
+ --server-options-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
169
+ --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM
170
+ formatted CRLs (Certificate Revocation Lists).
171
+ --server-options-key <value...> Path to an SSL key or content of an SSL key.
172
+ --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.
173
+ --server-options-passphrase <value> Passphrase for a pfx file.
174
+ --server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
175
+ --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
176
+ --server-options-request-cert Request for an SSL certificate.
177
+ --no-server-options-request-cert Negative 'server-options-request-cert' option.
178
+ --server-type <value> Allows to set server and options (by default 'http').
151
179
  --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
152
180
  --no-static Negative 'static' option.
153
181
  --static-directory <value...> Directory for static contents.
154
182
  --static-public-path <value...> The static files will be available in the browser under this public path.
183
+ --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.
184
+ --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public'
185
+ directory).
155
186
  --static-serve-index Tells dev server to use serveIndex middleware when enabled.
156
187
  --no-static-serve-index Does not tell dev server to use serveIndex middleware.
157
188
  --static-watch Watches for files in static content directory.
158
189
  --no-static-watch Does not watch for files in static content directory.
159
- --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).
160
- --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.
161
190
  --watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
162
191
  --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
192
+ --web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
193
+ --no-web-socket-server Negative 'web-socket-server' option.
194
+ --web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
163
195
 
164
196
  Global options:
165
197
  --color Enable colors on console.
@@ -199,6 +231,12 @@ npm run serve
199
231
  NPM will automagically reference the binary in `node_modules` for you, and
200
232
  execute the file or command.
201
233
 
234
+ ### With the API
235
+
236
+ While it's recommended to run webpack-dev-server via the CLI, you may also choose to start a server via the API.
237
+
238
+ See the related [API documentation for `webpack-dev-server`](https://webpack.js.org/api/webpack-dev-server/).
239
+
202
240
  ### The Result
203
241
 
204
242
  Either method will start a server instance and begin listening for connections
@@ -221,7 +259,7 @@ Pull Request to resolve the bug.
221
259
 
222
260
  ## Support
223
261
 
224
- We do our best to keep Issues in the repository focused on bugs, features, and
262
+ We do our best to keep issues in the repository focused on bugs, features, and
225
263
  needed modifications to the code for the module. Because of that, we ask users
226
264
  with general support, "how-to", or "why isn't this working" questions to try one
227
265
  of the other support channels that are available.