webpack-dev-server 4.6.0 → 4.7.3
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 +56 -66
- package/bin/cli-flags.js +265 -267
- package/bin/process-arguments.js +87 -7
- package/bin/webpack-dev-server.js +3 -0
- package/client/clients/SockJSClient.js +26 -3
- package/client/clients/WebSocketClient.js +16 -1
- package/client/index.js +71 -2
- package/client/modules/logger/index.js +3 -0
- package/client/modules/sockjs-client/index.js +15 -4
- package/client/overlay.js +38 -3
- package/client/socket.js +17 -6
- package/client/utils/createSocketURL.js +71 -4
- package/client/utils/getCurrentScriptSource.js +3 -0
- package/client/utils/log.js +6 -1
- package/client/utils/parseURL.js +17 -19
- package/client/utils/reloadApp.js +15 -2
- package/client/utils/sendMessage.js +5 -0
- package/lib/Server.js +1673 -759
- package/lib/options.json +37 -18
- package/lib/servers/BaseServer.js +8 -0
- package/lib/servers/SockJSServer.js +42 -9
- package/lib/servers/WebsocketServer.js +66 -35
- package/package.json +24 -14
- package/types/bin/cli-flags.d.ts +934 -0
- package/types/bin/process-arguments.d.ts +50 -0
- package/types/bin/webpack-dev-server.d.ts +27 -0
- package/types/lib/Server.d.ts +3388 -0
- package/types/lib/servers/BaseServer.d.ts +15 -0
- package/types/lib/servers/SockJSServer.d.ts +12 -0
- package/types/lib/servers/WebsocketServer.d.ts +13 -0
package/README.md
CHANGED
|
@@ -86,73 +86,63 @@ Options:
|
|
|
86
86
|
--watch-options-stdin Stop watching when stdin stream has ended.
|
|
87
87
|
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
|
|
88
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').
|
|
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
|
|
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').
|
|
90
91
|
--bonjour Allows to broadcasts dev server via ZeroConf networking on start.
|
|
91
92
|
--no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start.
|
|
92
|
-
--client-web-socket-transport <value> Allows to set custom web socket transport to communicate with dev server.
|
|
93
93
|
--no-client Negative 'client' option.
|
|
94
|
-
--client-logging <value> Allows to
|
|
95
|
-
--client-progress Prints compilation progress in percentage in the browser.
|
|
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.
|
|
94
|
+
--client-logging <value> Allows to set log level in the browser.
|
|
99
95
|
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
|
|
100
96
|
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
|
|
101
97
|
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
|
|
102
98
|
--no-client-overlay-errors Negative 'client-overlay-errors' option.
|
|
103
99
|
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
|
|
104
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.
|
|
105
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).
|
|
106
107
|
--client-web-socket-url-hostname <value> Tells clients connected to devServer to use the provided hostname.
|
|
107
|
-
--client-web-socket-url-
|
|
108
|
+
--client-web-socket-url-password <value> Tells clients connected to devServer to use the provided password to authenticate.
|
|
108
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.
|
|
109
111
|
--client-web-socket-url-protocol <value> Tells clients connected to devServer to use the provided protocol.
|
|
110
112
|
--client-web-socket-url-username <value> Tells clients connected to devServer to use the provided username to authenticate.
|
|
111
|
-
--client-web-socket-url-password <value> Tells clients connected to devServer to use the provided password to authenticate.
|
|
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').
|
|
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').
|
|
115
113
|
--compress Enables gzip compression for everything served.
|
|
116
114
|
--no-compress Disables gzip compression for everything served.
|
|
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
|
|
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.
|
|
118
117
|
--no-history-api-fallback Negative 'history-api-fallback' option.
|
|
119
118
|
--host <value> Allows to specify a hostname to use.
|
|
120
119
|
--hot [value] Enables Hot Module Replacement.
|
|
121
120
|
--no-hot Disables Hot Module Replacement.
|
|
122
|
-
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated,
|
|
121
|
+
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.
|
|
123
122
|
--no-http2 Does not serve over HTTP/2 using SPDY.
|
|
124
|
-
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated,
|
|
125
|
-
of the `server` option.
|
|
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.
|
|
126
124
|
--no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
|
|
127
|
-
--https-
|
|
128
|
-
--https-
|
|
129
|
-
option.
|
|
130
|
-
--
|
|
131
|
-
--https-
|
|
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
|
|
132
130
|
`server.options.ca` option.
|
|
133
|
-
--https-
|
|
134
|
-
|
|
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
|
|
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
|
|
140
133
|
`server.options.cert` option.
|
|
141
|
-
--https-
|
|
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
|
|
134
|
+
--https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the
|
|
147
135
|
`server.options.crl` option.
|
|
148
|
-
--https-
|
|
149
|
-
option.
|
|
150
|
-
--https-key
|
|
151
|
-
|
|
152
|
-
--https-
|
|
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
|
|
153
143
|
`server.options.pfx` option.
|
|
154
|
-
--https-
|
|
155
|
-
|
|
144
|
+
--https-request-cert Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.
|
|
145
|
+
--no-https-request-cert Does not request for an SSL certificate.
|
|
156
146
|
--ipc [value] Listen to a unix socket.
|
|
157
147
|
--live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default).
|
|
158
148
|
--no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default)
|
|
@@ -160,48 +150,48 @@ Options:
|
|
|
160
150
|
--no-magic-html Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
|
|
161
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).
|
|
162
152
|
--no-open Does not open the default browser.
|
|
163
|
-
--open-
|
|
153
|
+
--open-app <value...> Open specified browser. Deprecated: please use '--open-app-name'.
|
|
164
154
|
--open-app-name <value...> Open specified browser.
|
|
165
|
-
--open-app <value...> Open specified browser.
|
|
166
|
-
--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).
|
|
167
|
-
--open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.
|
|
168
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.
|
|
169
160
|
--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
161
|
--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
|
-
|
|
177
|
-
--server-options-cacert
|
|
178
|
-
|
|
179
|
-
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.
|
|
180
166
|
--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
|
-
|
|
183
|
-
--server-options-crl
|
|
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).
|
|
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).
|
|
187
171
|
--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
|
-
|
|
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.
|
|
190
174
|
--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
|
-
|
|
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').
|
|
193
179
|
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
|
|
194
180
|
--no-static Negative 'static' option.
|
|
195
181
|
--static-directory <value...> Directory for static contents.
|
|
196
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).
|
|
197
186
|
--static-serve-index Tells dev server to use serveIndex middleware when enabled.
|
|
198
187
|
--no-static-serve-index Does not tell dev server to use serveIndex middleware.
|
|
199
188
|
--static-watch Watches for files in static content directory.
|
|
200
189
|
--no-static-watch Does not watch for files in static content directory.
|
|
201
|
-
--static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).
|
|
202
|
-
--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.
|
|
203
190
|
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
|
|
204
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').
|
|
205
195
|
|
|
206
196
|
Global options:
|
|
207
197
|
--color Enable colors on console.
|