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.
- package/declarations/WebpackOptions.d.ts +35 -10
- package/lib/Chunk.js +5 -1
- package/lib/ChunkGroup.js +1 -1
- package/lib/Compilation.js +83 -477
- package/lib/Compiler.js +42 -2
- package/lib/MultiCompiler.js +8 -1
- package/lib/NormalModule.js +15 -4
- package/lib/ProgressPlugin.js +21 -63
- package/lib/ResolverFactory.js +6 -10
- package/lib/SourceMapDevToolPlugin.js +25 -17
- package/lib/Stats.js +227 -3
- package/lib/SystemMainTemplatePlugin.js +5 -1
- package/lib/TemplatedPathPlugin.js +8 -1
- package/lib/WebpackOptionsDefaulter.js +12 -1
- package/lib/buildChunkGraph.js +689 -0
- package/lib/logging/Logger.js +131 -0
- package/lib/logging/createConsoleLogger.js +209 -0
- package/lib/logging/runtime.js +36 -0
- package/lib/logging/truncateArgs.js +76 -0
- package/lib/node/NodeEnvironmentPlugin.js +16 -0
- package/lib/node/nodeConsole.js +135 -0
- package/lib/web/JsonpMainTemplatePlugin.js +1 -1
- package/lib/webpack.js +3 -1
- package/package.json +18 -20
- package/schemas/WebpackOptions.json +53 -1
@@ -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
|
-
|
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)) {
|