webpack 4.36.1 → 4.39.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.
@@ -75,6 +75,16 @@ export type ExternalItem =
75
75
  * via the `definition` "ArrayOfStringValues".
76
76
  */
77
77
  export type ArrayOfStringValues = string[];
78
+ /**
79
+ * This interface was referenced by `WebpackOptions`'s JSON-Schema
80
+ * via the `definition` "FilterTypes".
81
+ */
82
+ export type FilterTypes = FilterItemTypes | FilterItemTypes[];
83
+ /**
84
+ * This interface was referenced by `WebpackOptions`'s JSON-Schema
85
+ * via the `definition` "FilterItemTypes".
86
+ */
87
+ export type FilterItemTypes = RegExp | string | ((value: string) => boolean);
78
88
  /**
79
89
  * One or multiple rule conditions
80
90
  *
@@ -235,16 +245,6 @@ export type WebpackPluginFunction = (
235
245
  * via the `definition` "RuleSetRules".
236
246
  */
237
247
  export type RuleSetRules = RuleSetRule[];
238
- /**
239
- * This interface was referenced by `WebpackOptions`'s JSON-Schema
240
- * via the `definition` "FilterTypes".
241
- */
242
- export type FilterTypes = FilterItemTypes | FilterItemTypes[];
243
- /**
244
- * This interface was referenced by `WebpackOptions`'s JSON-Schema
245
- * via the `definition` "FilterItemTypes".
246
- */
247
- export type FilterItemTypes = RegExp | string | Function;
248
248
 
249
249
  export interface WebpackOptions {
250
250
  /**
@@ -293,6 +293,19 @@ export interface WebpackOptions {
293
293
  * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
294
294
  */
295
295
  externals?: Externals;
296
+ /**
297
+ * Options for infrastructure level logging
298
+ */
299
+ infrastructureLogging?: {
300
+ /**
301
+ * Enable debug logging for specific loggers
302
+ */
303
+ debug?: FilterTypes | boolean;
304
+ /**
305
+ * Log level
306
+ */
307
+ level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
308
+ };
296
309
  /**
297
310
  * Custom values available in the loader context.
298
311
  */
@@ -1343,6 +1356,18 @@ export interface StatsOptions {
1343
1356
  * add the hash of the compilation
1344
1357
  */
1345
1358
  hash?: boolean;
1359
+ /**
1360
+ * add logging output
1361
+ */
1362
+ logging?: boolean | ("none" | "error" | "warn" | "info" | "log" | "verbose");
1363
+ /**
1364
+ * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions
1365
+ */
1366
+ loggingDebug?: FilterTypes | boolean;
1367
+ /**
1368
+ * add stack traces to logging output
1369
+ */
1370
+ loggingTrace?: boolean;
1346
1371
  /**
1347
1372
  * Set the maximum number of modules to be shown
1348
1373
  */
package/lib/Chunk.js CHANGED
@@ -355,7 +355,11 @@ class Chunk {
355
355
  return this._modules.getFromUnorderedCache(getModulesIdent);
356
356
  }
357
357
 
358
- remove() {
358
+ /**
359
+ * @param {string=} reason reason why chunk is removed
360
+ * @returns {void}
361
+ */
362
+ remove(reason) {
359
363
  // cleanup modules
360
364
  // Array.from is used here to create a clone, because removeChunk modifies this._modules
361
365
  for (const module of Array.from(this._modules)) {
package/lib/ChunkGroup.js CHANGED
@@ -345,7 +345,7 @@ class ChunkGroup {
345
345
  }
346
346
 
347
347
  /**
348
- * @param {ModuleReason} reason reason for removing ChunkGroup
348
+ * @param {string=} reason reason for removing ChunkGroup
349
349
  * @returns {void}
350
350
  */
351
351
  remove(reason) {