webpack-dev-server 4.15.1 → 5.0.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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![node][node]][node-url]
9
9
  [![tests][tests]][tests-url]
10
10
  [![coverage][cover]][cover-url]
11
- [![chat][chat]][chat-url]
11
+ [![discussion][discussion]][discussion-url]
12
12
  [![downloads][downloads]][npm-url]
13
13
  [![contributors][contributors]][contributors-url]
14
14
 
@@ -83,22 +83,26 @@ Options:
83
83
  -c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
84
84
  --config-name <value...> Name of the configuration to use.
85
85
  -m, --merge Merge two or more configurations using 'webpack-merge'.
86
+ --disable-interpret Disable interpret for loading the config file.
86
87
  --env <value...> Environment passed to the configuration when it is a function.
87
88
  --node-env <value> Sets process.env.NODE_ENV to the specified value.
89
+ --define-process-env-node-env <value> Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`)
90
+ --analyze It invokes webpack-bundle-analyzer plugin to get bundle information.
88
91
  --progress [value] Print compilation progress during build.
89
92
  -j, --json [value] Prints result as JSON or store it in a file.
90
- -d, --devtool <value> Determine source maps to use.
91
- --no-devtool Do not generate source maps.
92
- --entry <value...> The entry point(s) of your application e.g. ./src/main.js.
93
- --mode <value> Defines the mode to pass to webpack.
93
+ --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack
94
+ -d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
95
+ --no-devtool Negative 'devtool' option.
96
+ --entry <value...> A module that is loaded upon startup. Only the last one is exported.
97
+ --mode <value> Enable production optimizations or development hints.
94
98
  --name <value> Name of the configuration. Used when loading multiple configurations.
95
- -o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
96
- --stats [value] It instructs webpack on how to treat the stats e.g. verbose.
97
- --no-stats Disable stats output.
98
- -t, --target <value...> Sets the build target e.g. node.
99
+ -o, --output-path <value> The output directory as **absolute path** (required).
100
+ --stats [value] Stats options object or preset name.
101
+ --no-stats Negative 'stats' option.
102
+ -t, --target <value...> Environment to build for. Environment to build for. An array of environments to build for all of them when possible.
99
103
  --no-target Negative 'target' option.
100
104
  --watch-options-stdin Stop watching when stdin stream has ended.
101
- --no-watch-options-stdin Do not stop watching when stdin stream has ended.
105
+ --no-watch-options-stdin Negative 'watch-options-stdin' option.
102
106
  --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').
103
107
  --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').
104
108
  --bonjour Allows to broadcasts dev server via ZeroConf networking on start.
@@ -111,6 +115,8 @@ Options:
111
115
  --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
112
116
  --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
113
117
  --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
118
+ --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors.
119
+ --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors.
114
120
  --client-overlay-trusted-types-policy-name <value> The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.
115
121
  --client-progress Prints compilation progress in percentage in the browser.
116
122
  --no-client-progress Does not print compilation progress in percentage in the browser.
@@ -131,35 +137,13 @@ Options:
131
137
  --host <value> Allows to specify a hostname to use.
132
138
  --hot [value] Enables Hot Module Replacement.
133
139
  --no-hot Disables Hot Module Replacement.
134
- --http2 Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.
135
- --no-http2 Does not serve over HTTP/2 using SPDY.
136
- --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.
137
- --no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
138
- --https-passphrase <value> Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.
139
- --https-request-cert Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.
140
- --no-https-request-cert Does not request for an SSL certificate.
141
- --https-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
142
- --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 `server.options.ca` option.
143
- --https-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
144
- --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 `server.options.ca` option.
145
- --https-cert <value...> Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.
146
- --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 `server.options.cert` option.
147
- --https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.
148
- --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). Deprecated, use the `server.options.crl` option.
149
- --https-key <value...> Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` 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, use the `server.options.key` option.
151
- --https-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.
152
- --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 `server.options.pfx` option.
153
140
  --ipc [value] Listen to a unix socket.
154
141
  --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default).
155
142
  --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default).
156
- --magic-html Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
157
- --no-magic-html Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
158
143
  --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).
159
144
  --no-open Does not open the default browser.
160
145
  --open-target <value...> Opens specified page in browser.
161
146
  --open-app-name <value...> Open specified browser.
162
- --open-app <value...> Open specified browser. Deprecated: please use '--open-app-name'.
163
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).
164
148
  --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.
165
149
  --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser.
@@ -170,8 +154,6 @@ Options:
170
154
  --no-server-options-request-cert Does not request for an SSL certificate.
171
155
  --server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
172
156
  --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.
173
- --server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
174
- --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, use the `server.options.ca` option.
175
157
  --server-options-cert <value...> Path to an SSL certificate or content of an SSL certificate.
176
158
  --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.
177
159
  --server-options-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
@@ -192,7 +174,6 @@ Options:
192
174
  --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.
193
175
  --watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
194
176
  --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
195
- --web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
196
177
  --no-web-socket-server Disallows to set web socket server and options.
197
178
  --web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
198
179
 
@@ -298,7 +279,7 @@ Your first-stop-shop for support for webpack-dev-server should be the excellent
298
279
  of those docs, please head over to the [webpack.js.org repo][wjo-url] and open a
299
280
  pull request.
300
281
 
301
- From there, we encourage users to visit the [webpack Gitter chat][chat-url] and
282
+ From there, we encourage users to visit the [webpack discussions][discussion-url] and
302
283
  talk to the fine folks there. If your quest for answers comes up dry in chat,
303
284
  head over to [StackOverflow][stack-url] and do a quick search or open a new
304
285
  question. Remember; It's always much easier to answer questions that include your
@@ -332,8 +313,8 @@ This project is heavily inspired by [peerigon/nof5](https://github.com/peerigon/
332
313
  [tests-url]: https://github.com/webpack/webpack-dev-server/actions?query=workflow%3Awebpack-dev-server
333
314
  [cover]: https://codecov.io/gh/webpack/webpack-dev-server/branch/master/graph/badge.svg
334
315
  [cover-url]: https://codecov.io/gh/webpack/webpack-dev-server
335
- [chat]: https://badges.gitter.im/webpack/webpack.svg
336
- [chat-url]: https://gitter.im/webpack/webpack
316
+ [discussion]: https://img.shields.io/github/discussions/webpack/webpack
317
+ [discussion-url]: https://github.com/webpack/webpack/discussions
337
318
  [docs-url]: https://webpack.js.org/configuration/dev-server/#devserver
338
319
  [hash-url]: https://twitter.com/search?q=webpack
339
320
  [middleware-url]: https://github.com/webpack/webpack-dev-middleware
@@ -91,7 +91,7 @@ const runCli = (cli) => {
91
91
  (error) => {
92
92
  console.error(error);
93
93
  process.exitCode = 1;
94
- }
94
+ },
95
95
  );
96
96
  } else {
97
97
  // eslint-disable-next-line import/no-dynamic-require
@@ -147,8 +147,8 @@ if (!cli.installed) {
147
147
 
148
148
  console.error(
149
149
  `We will use "${packageManager}" to install the CLI via "${packageManager} ${installOptions.join(
150
- " "
151
- )} ${cli.package}".`
150
+ " ",
151
+ )} ${cli.package}".`,
152
152
  );
153
153
 
154
154
  const question = `Do you want to install 'webpack-cli' (yes/no): `;
@@ -170,7 +170,7 @@ if (!cli.installed) {
170
170
  if (!normalizedAnswer) {
171
171
  console.error(
172
172
  "You need to install 'webpack-cli' to use webpack via CLI.\n" +
173
- "You can also install the CLI manually."
173
+ "You can also install the CLI manually.",
174
174
  );
175
175
 
176
176
  return;
@@ -182,7 +182,7 @@ if (!cli.installed) {
182
182
  cli.package
183
183
  }' (running '${packageManager} ${installOptions.join(" ")} ${
184
184
  cli.package
185
- }')...`
185
+ }')...`,
186
186
  );
187
187
 
188
188
  runCommand(packageManager, installOptions.concat(cli.package))
@@ -1,8 +1,8 @@
1
1
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
2
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
3
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import SockJS from "../modules/sockjs-client/index.js";
7
7
  import { log } from "../utils/log.js";
8
8
  var SockJSClient = /*#__PURE__*/function () {
@@ -1,8 +1,8 @@
1
1
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
2
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
3
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { log } from "../utils/log.js";
7
7
  var WebSocketClient = /*#__PURE__*/function () {
8
8
  /**
package/client/index.js CHANGED
@@ -1,8 +1,8 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  /* global __resourceQuery, __webpack_hash__ */
7
7
  /// <reference types="webpack/module" />
8
8
  import webpackHotLog from "webpack/hot/log.js";
@@ -62,9 +62,8 @@ var decodeOverlayOptions = function decodeOverlayOptions(overlayOptions) {
62
62
  */
63
63
  var status = {
64
64
  isUnloading: false,
65
- // TODO Workaround for webpack v4, `__webpack_hash__` is not replaced without HotModuleReplacement
66
65
  // eslint-disable-next-line camelcase
67
- currentHash: typeof __webpack_hash__ !== "undefined" ? __webpack_hash__ : ""
66
+ currentHash: __webpack_hash__
68
67
  };
69
68
 
70
69
  /** @type {Options} */
@@ -226,14 +225,6 @@ var onSocketMessage = {
226
225
  }
227
226
  reloadApp(options, status);
228
227
  },
229
- // TODO: remove in v5 in favor of 'static-changed'
230
- /**
231
- * @param {string} file
232
- */
233
- "content-changed": function contentChanged(file) {
234
- log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
235
- self.location.reload();
236
- },
237
228
  /**
238
229
  * @param {string} file
239
230
  */
@@ -2,22 +2,27 @@
2
2
  /******/ "use strict";
3
3
  /******/ var __webpack_modules__ = ({
4
4
 
5
- /***/ "./client-src/modules/logger/SyncBailHookFake.js":
6
- /*!*******************************************************!*\
7
- !*** ./client-src/modules/logger/SyncBailHookFake.js ***!
8
- \*******************************************************/
9
- /***/ (function(module) {
10
-
5
+ /***/ "./client-src/modules/logger/tapable.js":
6
+ /*!**********************************************!*\
7
+ !*** ./client-src/modules/logger/tapable.js ***!
8
+ \**********************************************/
9
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11
10
 
11
+ __webpack_require__.r(__webpack_exports__);
12
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13
+ /* harmony export */ SyncBailHook: function() { return /* binding */ SyncBailHook; }
14
+ /* harmony export */ });
15
+ function SyncBailHook() {
16
+ return {
17
+ call: function call() {}
18
+ };
19
+ }
12
20
 
13
21
  /**
14
22
  * Client stub for tapable SyncBailHook
15
23
  */
16
- module.exports = function clientTapableSyncBailHook() {
17
- return {
18
- call: function call() {}
19
- };
20
- };
24
+ // eslint-disable-next-line import/prefer-default-export
25
+
21
26
 
22
27
  /***/ }),
23
28
 
@@ -81,55 +86,54 @@ function _createClass(Constructor, protoProps, staticProps) {
81
86
  });
82
87
  return Constructor;
83
88
  }
84
- function _toPropertyKey(arg) {
85
- var key = _toPrimitive(arg, "string");
86
- return typeof key === "symbol" ? key : String(key);
89
+ function _toPropertyKey(t) {
90
+ var i = _toPrimitive(t, "string");
91
+ return "symbol" == typeof i ? i : String(i);
87
92
  }
88
- function _toPrimitive(input, hint) {
89
- if (typeof input !== "object" || input === null) return input;
90
- var prim = input[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
91
- if (prim !== undefined) {
92
- var res = prim.call(input, hint || "default");
93
- if (typeof res !== "object") return res;
93
+ function _toPrimitive(t, r) {
94
+ if ("object" != typeof t || !t) return t;
95
+ var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
96
+ if (void 0 !== e) {
97
+ var i = e.call(t, r || "default");
98
+ if ("object" != typeof i) return i;
94
99
  throw new TypeError("@@toPrimitive must return a primitive value.");
95
100
  }
96
- return (hint === "string" ? String : Number)(input);
101
+ return ("string" === r ? String : Number)(t);
97
102
  }
98
103
  var LogType = Object.freeze({
99
- error: /** @type {"error"} */"error",
104
+ error: ( /** @type {"error"} */"error"),
100
105
  // message, c style arguments
101
- warn: /** @type {"warn"} */"warn",
106
+ warn: ( /** @type {"warn"} */"warn"),
102
107
  // message, c style arguments
103
- info: /** @type {"info"} */"info",
108
+ info: ( /** @type {"info"} */"info"),
104
109
  // message, c style arguments
105
- log: /** @type {"log"} */"log",
110
+ log: ( /** @type {"log"} */"log"),
106
111
  // message, c style arguments
107
- debug: /** @type {"debug"} */"debug",
112
+ debug: ( /** @type {"debug"} */"debug"),
108
113
  // message, c style arguments
109
114
 
110
- trace: /** @type {"trace"} */"trace",
115
+ trace: ( /** @type {"trace"} */"trace"),
111
116
  // no arguments
112
117
 
113
- group: /** @type {"group"} */"group",
118
+ group: ( /** @type {"group"} */"group"),
114
119
  // [label]
115
- groupCollapsed: /** @type {"groupCollapsed"} */"groupCollapsed",
120
+ groupCollapsed: ( /** @type {"groupCollapsed"} */"groupCollapsed"),
116
121
  // [label]
117
- groupEnd: /** @type {"groupEnd"} */"groupEnd",
122
+ groupEnd: ( /** @type {"groupEnd"} */"groupEnd"),
118
123
  // [label]
119
124
 
120
- profile: /** @type {"profile"} */"profile",
125
+ profile: ( /** @type {"profile"} */"profile"),
121
126
  // [profileName]
122
- profileEnd: /** @type {"profileEnd"} */"profileEnd",
127
+ profileEnd: ( /** @type {"profileEnd"} */"profileEnd"),
123
128
  // [profileName]
124
129
 
125
- time: /** @type {"time"} */"time",
130
+ time: ( /** @type {"time"} */"time"),
126
131
  // name, time as [seconds, nanoseconds]
127
132
 
128
- clear: /** @type {"clear"} */"clear",
133
+ clear: ( /** @type {"clear"} */"clear"),
129
134
  // no arguments
130
- status: /** @type {"status"} */"status" // message, arguments
135
+ status: ( /** @type {"status"} */"status") // message, arguments
131
136
  });
132
-
133
137
  exports.LogType = LogType;
134
138
 
135
139
  /** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
@@ -392,9 +396,7 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
392
396
  */
393
397
  var filterToFunction = function filterToFunction(item) {
394
398
  if (typeof item === "string") {
395
- var regExp = new RegExp("[\\\\/]".concat(item.replace(
396
- // eslint-disable-next-line no-useless-escape
397
- /[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
399
+ var regExp = new RegExp("[\\\\/]".concat(item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
398
400
  return function (ident) {
399
401
  return regExp.test(ident);
400
402
  };
@@ -468,9 +470,7 @@ module.exports = function (_ref) {
468
470
  switch (type) {
469
471
  case LogType.debug:
470
472
  if (!debug) return;
471
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
472
473
  if (typeof console.debug === "function") {
473
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
474
474
  console.debug.apply(console, _toConsumableArray(labeledArgs()));
475
475
  } else {
476
476
  console.log.apply(console, _toConsumableArray(labeledArgs()));
@@ -499,9 +499,7 @@ module.exports = function (_ref) {
499
499
  case LogType.groupCollapsed:
500
500
  if (!debug && loglevel > LogLevel.log) return;
501
501
  if (!debug && loglevel > LogLevel.verbose) {
502
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
503
502
  if (typeof console.groupCollapsed === "function") {
504
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
505
503
  console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
506
504
  } else {
507
505
  console.log.apply(console, _toConsumableArray(labeledArgs()));
@@ -511,9 +509,7 @@ module.exports = function (_ref) {
511
509
  // falls through
512
510
  case LogType.group:
513
511
  if (!debug && loglevel > LogLevel.log) return;
514
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
515
512
  if (typeof console.group === "function") {
516
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
517
513
  console.group.apply(console, _toConsumableArray(labeledArgs()));
518
514
  } else {
519
515
  console.log.apply(console, _toConsumableArray(labeledArgs()));
@@ -521,9 +517,7 @@ module.exports = function (_ref) {
521
517
  break;
522
518
  case LogType.groupEnd:
523
519
  if (!debug && loglevel > LogLevel.log) return;
524
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
525
520
  if (typeof console.groupEnd === "function") {
526
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
527
521
  console.groupEnd();
528
522
  }
529
523
  break;
@@ -540,24 +534,18 @@ module.exports = function (_ref) {
540
534
  break;
541
535
  }
542
536
  case LogType.profile:
543
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
544
537
  if (typeof console.profile === "function") {
545
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
546
538
  console.profile.apply(console, _toConsumableArray(labeledArgs()));
547
539
  }
548
540
  break;
549
541
  case LogType.profileEnd:
550
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
551
542
  if (typeof console.profileEnd === "function") {
552
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
553
543
  console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
554
544
  }
555
545
  break;
556
546
  case LogType.clear:
557
547
  if (!debug && loglevel > LogLevel.log) return;
558
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
559
548
  if (typeof console.clear === "function") {
560
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
561
549
  console.clear();
562
550
  }
563
551
  break;
@@ -611,9 +599,10 @@ function _extends() {
611
599
  };
612
600
  return _extends.apply(this, arguments);
613
601
  }
614
- var SyncBailHook = __webpack_require__(/*! tapable/lib/SyncBailHook */ "./client-src/modules/logger/SyncBailHookFake.js");
615
- var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
616
- Logger = _require.Logger;
602
+ var _require = __webpack_require__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
603
+ SyncBailHook = _require.SyncBailHook;
604
+ var _require2 = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
605
+ Logger = _require2.Logger;
617
606
  var createConsoleLogger = __webpack_require__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
618
607
 
619
608
  /** @type {createConsoleLogger.LoggerOptions} */
@@ -1325,10 +1325,8 @@ SockJS.prototype.countRTO = function (rtt) {
1325
1325
  if (rtt > 100) {
1326
1326
  return 4 * rtt; // rto > 400msec
1327
1327
  }
1328
-
1329
1328
  return 300 + rtt; // 300msec < rto <= 400msec
1330
1329
  };
1331
-
1332
1330
  module.exports = function (availableTransports) {
1333
1331
  transports = transport(availableTransports);
1334
1332
  __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
@@ -1610,7 +1608,6 @@ defineProperties(ArrayPrototype, {
1610
1608
  if (!isFunction(fun)) {
1611
1609
  throw new TypeError(); // TODO message
1612
1610
  }
1613
-
1614
1611
  while (++i < length) {
1615
1612
  if (i in self) {
1616
1613
  // Invoke the callback function with call, passing arguments:
@@ -1740,7 +1737,6 @@ if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 ||
1740
1737
  separator.lastIndex++; // Avoid an infinite loop
1741
1738
  }
1742
1739
  }
1743
-
1744
1740
  if (lastLastIndex === string.length) {
1745
1741
  if (lastLength || !separator.test('')) {
1746
1742
  output.push('');
@@ -4248,7 +4244,6 @@ function setup(env) {
4248
4244
  hash = (hash << 5) - hash + namespace.charCodeAt(i);
4249
4245
  hash |= 0; // Convert to 32bit integer
4250
4246
  }
4251
-
4252
4247
  return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
4253
4248
  }
4254
4249
  createDebug.selectColor = selectColor;
@@ -1,8 +1,8 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  /**
7
7
  * @typedef {Object} StateDefinitions
8
8
  * @property {{[event: string]: { target: string; actions?: Array<string> }}} [on]
package/client/overlay.js CHANGED
@@ -1,8 +1,8 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  // The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)
7
7
  // They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).
8
8
 
@@ -107,11 +107,11 @@ var createOverlay = function createOverlay(options) {
107
107
  applyStyle(iframeContainerElement, iframeStyle);
108
108
  iframeContainerElement.onload = function () {
109
109
  var contentElement = /** @type {Document} */
110
- /** @type {HTMLIFrameElement} */
111
- iframeContainerElement.contentDocument.createElement("div");
110
+ ( /** @type {HTMLIFrameElement} */
111
+ iframeContainerElement.contentDocument).createElement("div");
112
112
  containerElement = /** @type {Document} */
113
- /** @type {HTMLIFrameElement} */
114
- iframeContainerElement.contentDocument.createElement("div");
113
+ ( /** @type {HTMLIFrameElement} */
114
+ iframeContainerElement.contentDocument).createElement("div");
115
115
  contentElement.id = "webpack-dev-server-client-overlay-div";
116
116
  applyStyle(contentElement, containerStyle);
117
117
  headerElement = document.createElement("div");
@@ -132,8 +132,8 @@ var createOverlay = function createOverlay(options) {
132
132
  contentElement.appendChild(containerElement);
133
133
 
134
134
  /** @type {Document} */
135
- /** @type {HTMLIFrameElement} */
136
- iframeContainerElement.contentDocument.body.appendChild(contentElement);
135
+ ( /** @type {HTMLIFrameElement} */
136
+ iframeContainerElement.contentDocument).body.appendChild(contentElement);
137
137
  onLoadQueue.forEach(function (onLoad) {
138
138
  onLoad( /** @type {HTMLDivElement} */contentElement);
139
139
  });
@@ -151,7 +151,7 @@ var createOverlay = function createOverlay(options) {
151
151
  */
152
152
  function ensureOverlayExists(callback, trustedTypesPolicyName) {
153
153
  if (containerElement) {
154
- containerElement.innerHTML = "";
154
+ containerElement.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML("") : "";
155
155
  // Everything is ready, call the callback right away.
156
156
  callback(containerElement);
157
157
  return;