webpack 5.10.0 → 5.11.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.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

Files changed (40) hide show
  1. package/bin/webpack.js +0 -0
  2. package/lib/Compilation.js +5 -21
  3. package/lib/Compiler.js +58 -13
  4. package/lib/FlagAllModulesAsUsedPlugin.js +4 -0
  5. package/lib/MainTemplate.js +2 -2
  6. package/lib/Module.js +1 -1
  7. package/lib/ModuleInfoHeaderPlugin.js +1 -1
  8. package/lib/NormalModule.js +4 -2
  9. package/lib/RuntimeGlobals.js +11 -1
  10. package/lib/RuntimeModule.js +20 -0
  11. package/lib/RuntimeTemplate.js +4 -0
  12. package/lib/cache/PackFileCacheStrategy.js +4 -2
  13. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  14. package/lib/index.js +5 -0
  15. package/lib/javascript/JavascriptModulesPlugin.js +82 -26
  16. package/lib/node/NodeTargetPlugin.js +4 -0
  17. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +1 -1
  18. package/lib/node/RequireChunkLoadingRuntimeModule.js +1 -1
  19. package/lib/optimize/SideEffectsFlagPlugin.js +9 -13
  20. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +1 -1
  21. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +1 -1
  22. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +1 -1
  23. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -1
  24. package/lib/rules/RuleSetCompiler.js +4 -2
  25. package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -1
  26. package/lib/runtime/CompatRuntimeModule.js +1 -1
  27. package/lib/runtime/PublicPathRuntimeModule.js +1 -1
  28. package/lib/serialization/BinaryMiddleware.js +467 -136
  29. package/lib/serialization/FileMiddleware.js +227 -37
  30. package/lib/serialization/ObjectMiddleware.js +89 -5
  31. package/lib/sharing/ConsumeSharedRuntimeModule.js +1 -1
  32. package/lib/util/fs.js +4 -0
  33. package/lib/util/source.js +61 -0
  34. package/lib/validateSchema.js +84 -73
  35. package/lib/wasm-async/AsyncWasmChunkLoadingRuntimeModule.js +1 -1
  36. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +1 -1
  37. package/lib/web/JsonpChunkLoadingRuntimeModule.js +54 -55
  38. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
  39. package/package.json +8 -8
  40. package/types.d.ts +1170 -578
package/types.d.ts CHANGED
@@ -78,7 +78,12 @@ import {
78
78
  YieldExpression
79
79
  } from "estree";
80
80
  import { Stats as FsStats, WriteStream } from "fs";
81
+ import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
81
82
  import { default as ValidationError } from "schema-utils/declarations/ValidationError";
83
+ import {
84
+ Extend,
85
+ ValidationErrorConfiguration
86
+ } from "schema-utils/declarations/validate";
82
87
  import {
83
88
  AsArray,
84
89
  AsyncParallelHook,
@@ -171,7 +176,6 @@ declare interface AggressiveSplittingPluginOptions {
171
176
  */
172
177
  minSize?: number;
173
178
  }
174
- type Amd = false | { [index: string]: any };
175
179
  declare interface Argument {
176
180
  description: string;
177
181
  simpleType: "string" | "number" | "boolean";
@@ -208,70 +212,7 @@ declare interface AssetEmittedInfo {
208
212
  outputPath: string;
209
213
  targetPath: string;
210
214
  }
211
- declare interface AssetInfo {
212
- /**
213
- * true, if the asset can be long term cached forever (contains a hash)
214
- */
215
- immutable?: boolean;
216
-
217
- /**
218
- * whether the asset is minimized
219
- */
220
- minimized?: boolean;
221
-
222
- /**
223
- * the value(s) of the full hash used for this asset
224
- */
225
- fullhash?: EntryItem;
226
-
227
- /**
228
- * the value(s) of the chunk hash used for this asset
229
- */
230
- chunkhash?: EntryItem;
231
-
232
- /**
233
- * the value(s) of the module hash used for this asset
234
- */
235
- modulehash?: EntryItem;
236
-
237
- /**
238
- * the value(s) of the content hash used for this asset
239
- */
240
- contenthash?: EntryItem;
241
-
242
- /**
243
- * when asset was created from a source file (potentially transformed), the original filename relative to compilation context
244
- */
245
- sourceFilename?: string;
246
-
247
- /**
248
- * size in bytes, only set after asset has been emitted
249
- */
250
- size?: number;
251
-
252
- /**
253
- * true, when asset is only used for development and doesn't count towards user-facing assets
254
- */
255
- development?: boolean;
256
-
257
- /**
258
- * true, when asset ships data for updating an existing application (HMR)
259
- */
260
- hotModuleReplacement?: boolean;
261
-
262
- /**
263
- * true, when asset is javascript and an ESM
264
- */
265
- javascriptModule?: boolean;
266
-
267
- /**
268
- * object of pointers to other assets, keyed by type of relation (only points from parent to child)
269
- */
270
- related?: Record<string, EntryItem>;
271
- }
272
- type AssetModuleFilename =
273
- | string
274
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
215
+ type AssetInfo = KnownAssetInfo & Record<string, any>;
275
216
  declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
276
217
  groupOptions: {
277
218
  preloadOrder?: number;
@@ -279,8 +220,8 @@ declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
279
220
  name?: string;
280
221
  entryOptions?: EntryOptions;
281
222
  };
282
- loc: DependencyLocation;
283
- request: string;
223
+ loc?: SyntheticDependencyLocation | RealDependencyLocation;
224
+ request?: string;
284
225
  parent: DependenciesBlock;
285
226
  chunkName: string;
286
227
  module: any;
@@ -354,12 +295,12 @@ declare interface BannerPluginOptions {
354
295
  /**
355
296
  * Exclude all modules matching any of these conditions.
356
297
  */
357
- exclude?: Rules;
298
+ exclude?: string | RegExp | (string | RegExp)[];
358
299
 
359
300
  /**
360
301
  * Include all modules matching any of these conditions.
361
302
  */
362
- include?: Rules;
303
+ include?: string | RegExp | (string | RegExp)[];
363
304
 
364
305
  /**
365
306
  * If true, banner will not be wrapped in a comment.
@@ -369,7 +310,7 @@ declare interface BannerPluginOptions {
369
310
  /**
370
311
  * Include all modules that pass test assertion.
371
312
  */
372
- test?: Rules;
313
+ test?: string | RegExp | (string | RegExp)[];
373
314
  }
374
315
  declare interface BaseResolveRequest {
375
316
  path: DevTool;
@@ -385,22 +326,22 @@ declare abstract class BasicEvaluatedExpression {
385
326
  range: [number, number];
386
327
  falsy: boolean;
387
328
  truthy: boolean;
388
- nullish: boolean;
329
+ nullish?: boolean;
389
330
  sideEffects: boolean;
390
- bool: boolean;
391
- number: number;
392
- bigint: bigint;
393
- regExp: RegExp;
394
- string: string;
395
- quasis: BasicEvaluatedExpression[];
396
- parts: BasicEvaluatedExpression[];
397
- array: any[];
398
- items: BasicEvaluatedExpression[];
399
- options: BasicEvaluatedExpression[];
400
- prefix: BasicEvaluatedExpression;
401
- postfix: BasicEvaluatedExpression;
331
+ bool?: boolean;
332
+ number?: number;
333
+ bigint?: bigint;
334
+ regExp?: RegExp;
335
+ string?: string;
336
+ quasis?: BasicEvaluatedExpression[];
337
+ parts?: BasicEvaluatedExpression[];
338
+ array?: any[];
339
+ items?: BasicEvaluatedExpression[];
340
+ options?: BasicEvaluatedExpression[];
341
+ prefix?: BasicEvaluatedExpression;
342
+ postfix?: BasicEvaluatedExpression;
402
343
  wrappedInnerExpressions: any;
403
- identifier: string;
344
+ identifier?: string;
404
345
  rootInfo: VariableInfoInterface;
405
346
  getMembers: () => string[];
406
347
  expression: NodeEstreeIndex;
@@ -422,7 +363,7 @@ declare abstract class BasicEvaluatedExpression {
422
363
  /**
423
364
  * Is expression a primitive or an object type value?
424
365
  */
425
- isPrimitiveType(): boolean;
366
+ isPrimitiveType(): undefined | boolean;
426
367
 
427
368
  /**
428
369
  * Is expression a runtime or compile-time value?
@@ -435,14 +376,14 @@ declare abstract class BasicEvaluatedExpression {
435
376
  asCompileTimeValue(): any;
436
377
  isTruthy(): boolean;
437
378
  isFalsy(): boolean;
438
- isNullish(): boolean;
379
+ isNullish(): undefined | boolean;
439
380
 
440
381
  /**
441
382
  * Can this expression have side effects?
442
383
  */
443
384
  couldHaveSideEffects(): boolean;
444
385
  asBool(): any;
445
- asNullish(): boolean;
386
+ asNullish(): undefined | boolean;
446
387
  asString(): any;
447
388
  setString(string?: any): BasicEvaluatedExpression;
448
389
  setUndefined(): BasicEvaluatedExpression;
@@ -489,21 +430,25 @@ declare class Cache {
489
430
  get: AsyncSeriesBailHook<
490
431
  [
491
432
  string,
492
- Etag,
493
- ((result: any, callback: (arg0: Error) => void) => void)[]
433
+ null | Etag,
434
+ ((result: any, callback: (arg0?: Error) => void) => void)[]
494
435
  ],
495
436
  any
496
437
  >;
497
- store: AsyncParallelHook<[string, Etag, any]>;
438
+ store: AsyncParallelHook<[string, null | Etag, any]>;
498
439
  storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
499
440
  beginIdle: SyncHook<[]>;
500
441
  endIdle: AsyncParallelHook<[]>;
501
442
  shutdown: AsyncParallelHook<[]>;
502
443
  };
503
- get<T>(identifier: string, etag: Etag, callback: CallbackCache<T>): void;
444
+ get<T>(
445
+ identifier: string,
446
+ etag: null | Etag,
447
+ callback: CallbackCache<T>
448
+ ): void;
504
449
  store<T>(
505
450
  identifier: string,
506
- etag: Etag,
451
+ etag: null | Etag,
507
452
  data: T,
508
453
  callback: CallbackCache<void>
509
454
  ): void;
@@ -525,34 +470,46 @@ declare class Cache {
525
470
  }
526
471
  declare abstract class CacheFacade {
527
472
  getChildCache(name: string): CacheFacade;
528
- getItemCache(identifier: string, etag: Etag): ItemCacheFacade;
473
+ getItemCache(identifier: string, etag: null | Etag): ItemCacheFacade;
529
474
  getLazyHashedEtag(obj: HashableObject): Etag;
530
475
  mergeEtags(a: Etag, b: Etag): Etag;
531
- get<T>(identifier: string, etag: Etag, callback: CallbackCache<T>): void;
532
- getPromise<T>(identifier: string, etag: Etag): Promise<T>;
476
+ get<T>(
477
+ identifier: string,
478
+ etag: null | Etag,
479
+ callback: CallbackCache<T>
480
+ ): void;
481
+ getPromise<T>(identifier: string, etag: null | Etag): Promise<T>;
533
482
  store<T>(
534
483
  identifier: string,
535
- etag: Etag,
484
+ etag: null | Etag,
536
485
  data: T,
537
486
  callback: CallbackCache<void>
538
487
  ): void;
539
- storePromise<T>(identifier: string, etag: Etag, data: T): Promise<void>;
488
+ storePromise<T>(
489
+ identifier: string,
490
+ etag: null | Etag,
491
+ data: T
492
+ ): Promise<void>;
540
493
  provide<T>(
541
494
  identifier: string,
542
- etag: Etag,
495
+ etag: null | Etag,
543
496
  computer: (arg0: CallbackNormalErrorCache<T>) => void,
544
497
  callback: CallbackNormalErrorCache<T>
545
498
  ): void;
546
499
  providePromise<T>(
547
500
  identifier: string,
548
- etag: Etag,
501
+ etag: null | Etag,
549
502
  computer: () => T | Promise<T>
550
503
  ): Promise<T>;
551
504
  }
552
505
  declare interface CacheGroupSource {
553
506
  key?: string;
554
507
  priority?: number;
555
- getName?: (module?: Module, chunks?: Chunk[], key?: string) => string;
508
+ getName?: (
509
+ module?: Module,
510
+ chunks?: Chunk[],
511
+ key?: string
512
+ ) => undefined | string;
556
513
  chunksFilter?: (chunk: Chunk) => boolean;
557
514
  enforce?: boolean;
558
515
  minSize: Record<string, number>;
@@ -563,7 +520,7 @@ declare interface CacheGroupSource {
563
520
  minChunks?: number;
564
521
  maxAsyncRequests?: number;
565
522
  maxInitialRequests?: number;
566
- filename?: string | ((arg0: PathData, arg1: AssetInfo) => string);
523
+ filename?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
567
524
  idHint?: string;
568
525
  automaticNameDelimiter: string;
569
526
  reuseExistingChunk?: boolean;
@@ -573,7 +530,6 @@ declare interface CacheGroupsContext {
573
530
  moduleGraph: ModuleGraph;
574
531
  chunkGraph: ChunkGraph;
575
532
  }
576
- type CacheOptions = boolean | MemoryCacheOptions | FileCacheOptions;
577
533
  type CacheOptionsNormalized = false | MemoryCacheOptions | FileCacheOptions;
578
534
  declare class CachedSource extends Source {
579
535
  constructor(source: Source);
@@ -604,25 +560,29 @@ declare interface CallbackNormalErrorCache<T> {
604
560
  declare interface CallbackWebpack<T> {
605
561
  (err?: Error, stats?: T): void;
606
562
  }
563
+ type Cell<T> = undefined | T;
607
564
  declare class Chunk {
608
565
  constructor(name?: string);
609
- id: string | number;
610
- ids: (string | number)[];
566
+ id: null | string | number;
567
+ ids: null | (string | number)[];
611
568
  debugId: number;
612
569
  name: string;
613
570
  idNameHints: SortableSet<string>;
614
571
  preventIntegration: boolean;
615
- filenameTemplate: string | ((arg0: PathData, arg1: AssetInfo) => string);
572
+ filenameTemplate:
573
+ | null
574
+ | string
575
+ | ((arg0: PathData, arg1?: AssetInfo) => string);
616
576
  runtime: RuntimeSpec;
617
577
  files: Set<string>;
618
578
  auxiliaryFiles: Set<string>;
619
579
  rendered: boolean;
620
- hash: string;
580
+ hash?: string;
621
581
  contentHash: Record<string, string>;
622
- renderedHash: string;
623
- chunkReason: string;
582
+ renderedHash?: string;
583
+ chunkReason?: string;
624
584
  extraAsync: boolean;
625
- readonly entryModule: Module;
585
+ readonly entryModule?: Module;
626
586
  hasEntryModule(): boolean;
627
587
  addModule(module: Module): boolean;
628
588
  removeModule(module: Module): void;
@@ -648,7 +608,7 @@ declare class Chunk {
648
608
  hasRuntime(): boolean;
649
609
  canBeInitial(): boolean;
650
610
  isOnlyInitial(): boolean;
651
- getEntryOptions(): EntryOptions;
611
+ getEntryOptions(): undefined | EntryOptions;
652
612
  addGroup(chunkGroup: ChunkGroup): void;
653
613
  removeGroup(chunkGroup: ChunkGroup): void;
654
614
  isInGroup(chunkGroup: ChunkGroup): boolean;
@@ -672,9 +632,6 @@ declare class Chunk {
672
632
  filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
673
633
  ): Record<string | number, Record<string, (string | number)[]>>;
674
634
  }
675
- type ChunkFilename =
676
- | string
677
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
678
635
  declare class ChunkGraph {
679
636
  constructor(moduleGraph: ModuleGraph);
680
637
  moduleGraph: ModuleGraph;
@@ -701,7 +658,7 @@ declare class ChunkGraph {
701
658
  getChunkModulesIterableBySourceType(
702
659
  chunk: Chunk,
703
660
  sourceType: string
704
- ): Iterable<Module>;
661
+ ): undefined | Iterable<Module>;
705
662
  getOrderedChunkModulesIterable(
706
663
  chunk: Chunk,
707
664
  comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
@@ -710,7 +667,7 @@ declare class ChunkGraph {
710
667
  chunk: Chunk,
711
668
  sourceType: string,
712
669
  comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
713
- ): Iterable<Module>;
670
+ ): undefined | Iterable<Module>;
714
671
  getChunkModules(chunk: Chunk): Module[];
715
672
  getOrderedChunkModules(
716
673
  chunk: Chunk,
@@ -767,10 +724,12 @@ declare class ChunkGraph {
767
724
  hasChunkEntryDependentChunks(chunk: Chunk): boolean;
768
725
  getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
769
726
  getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
770
- getChunkFullHashModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
727
+ getChunkFullHashModulesIterable(
728
+ chunk: Chunk
729
+ ): undefined | Iterable<RuntimeModule>;
771
730
  getChunkEntryModulesWithChunkGroupIterable(
772
731
  chunk: Chunk
773
- ): Iterable<[Module, Entrypoint]>;
732
+ ): Iterable<[Module, undefined | Entrypoint]>;
774
733
  getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
775
734
  connectBlockAndChunkGroup(
776
735
  depBlock: AsyncDependenciesBlock,
@@ -832,7 +791,7 @@ declare abstract class ChunkGroup {
832
791
  * returns the name of current ChunkGroup
833
792
  * sets a new name for current ChunkGroup
834
793
  */
835
- name: string;
794
+ name?: string;
836
795
 
837
796
  /**
838
797
  * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
@@ -1171,19 +1130,19 @@ declare class Compilation {
1171
1130
  chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
1172
1131
  moduleAsset: SyncHook<[Module, string]>;
1173
1132
  chunkAsset: SyncHook<[Chunk, string]>;
1174
- assetPath: SyncWaterfallHook<[string, any, AssetInfo]>;
1133
+ assetPath: SyncWaterfallHook<[string, {}, AssetInfo]>;
1175
1134
  needAdditionalPass: SyncBailHook<[], boolean>;
1176
1135
  childCompiler: SyncHook<[Compiler, string, number]>;
1177
1136
  log: SyncBailHook<[string, LogEntry], true>;
1178
1137
  processWarnings: SyncWaterfallHook<[WebpackError[]]>;
1179
1138
  processErrors: SyncWaterfallHook<[WebpackError[]]>;
1180
- statsPreset: HookMap<SyncHook<[any, any]>>;
1181
- statsNormalize: SyncHook<[any, any]>;
1182
- statsFactory: SyncHook<[StatsFactory, any]>;
1183
- statsPrinter: SyncHook<[StatsPrinter, any]>;
1184
- readonly normalModuleLoader: SyncHook<[any, NormalModule]>;
1139
+ statsPreset: HookMap<SyncHook<[Object, Object]>>;
1140
+ statsNormalize: SyncHook<[Object, Object]>;
1141
+ statsFactory: SyncHook<[StatsFactory, Object]>;
1142
+ statsPrinter: SyncHook<[StatsPrinter, Object]>;
1143
+ readonly normalModuleLoader: SyncHook<[{}, NormalModule]>;
1185
1144
  }>;
1186
- name: string;
1145
+ name?: string;
1187
1146
  startTime: any;
1188
1147
  endTime: any;
1189
1148
  compiler: Compiler;
@@ -1202,7 +1161,7 @@ declare class Compilation {
1202
1161
  runtimeTemplate: RuntimeTemplate;
1203
1162
  moduleTemplates: { javascript: ModuleTemplate };
1204
1163
  moduleGraph: ModuleGraph;
1205
- chunkGraph: ChunkGraph;
1164
+ chunkGraph?: ChunkGraph;
1206
1165
  codeGenerationResults: CodeGenerationResults;
1207
1166
  factorizeQueue: AsyncQueue<FactorizeModuleOptions, string, Module>;
1208
1167
  addModuleQueue: AsyncQueue<Module, string, Module>;
@@ -1267,7 +1226,7 @@ declare class Compilation {
1267
1226
  /**
1268
1227
  * Attempts to search for a module by its identifier
1269
1228
  */
1270
- findModule(identifier: string): Module;
1229
+ findModule(identifier: string): undefined | Module;
1271
1230
 
1272
1231
  /**
1273
1232
  * Schedules a build of the module object
@@ -1354,36 +1313,36 @@ declare class Compilation {
1354
1313
  summarizeDependencies(): void;
1355
1314
  createModuleHashes(): void;
1356
1315
  createHash(): void;
1357
- fullHash: string;
1358
- hash: string;
1316
+ fullHash?: string;
1317
+ hash?: string;
1359
1318
  emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
1360
1319
  updateAsset(
1361
1320
  file: string,
1362
1321
  newSourceOrFunction: Source | ((arg0: Source) => Source),
1363
- assetInfoUpdateOrFunction?: AssetInfo | ((arg0: AssetInfo) => AssetInfo)
1322
+ assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
1364
1323
  ): void;
1365
1324
  renameAsset(file?: any, newFile?: any): void;
1366
1325
  deleteAsset(file: string): void;
1367
1326
  getAssets(): Readonly<Asset>[];
1368
- getAsset(name: string): Readonly<Asset>;
1327
+ getAsset(name: string): undefined | Readonly<Asset>;
1369
1328
  clearAssets(): void;
1370
1329
  createModuleAssets(): void;
1371
1330
  getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
1372
1331
  createChunkAssets(callback: (err?: WebpackError) => void): void;
1373
1332
  getPath(
1374
- filename: string | ((arg0: PathData, arg1: AssetInfo) => string),
1333
+ filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1375
1334
  data?: PathData
1376
1335
  ): string;
1377
1336
  getPathWithInfo(
1378
- filename: string | ((arg0: PathData, arg1: AssetInfo) => string),
1337
+ filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1379
1338
  data?: PathData
1380
1339
  ): { path: string; info: AssetInfo };
1381
1340
  getAssetPath(
1382
- filename: string | ((arg0: PathData, arg1: AssetInfo) => string),
1341
+ filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1383
1342
  data: PathData
1384
1343
  ): string;
1385
1344
  getAssetPathWithInfo(
1386
- filename: string | ((arg0: PathData, arg1: AssetInfo) => string),
1345
+ filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1387
1346
  data: PathData
1388
1347
  ): { path: string; info: AssetInfo };
1389
1348
  getWarnings(): WebpackError[];
@@ -1532,7 +1491,7 @@ declare class Compiler {
1532
1491
  afterCompile: AsyncSeriesHook<[Compilation]>;
1533
1492
  watchRun: AsyncSeriesHook<[Compiler]>;
1534
1493
  failed: SyncHook<[Error]>;
1535
- invalid: SyncHook<[string, number]>;
1494
+ invalid: SyncHook<[null | string, number]>;
1536
1495
  watchClose: SyncHook<[]>;
1537
1496
  infrastructureLog: SyncBailHook<[string, string, any[]], true>;
1538
1497
  environment: SyncHook<[]>;
@@ -1542,8 +1501,8 @@ declare class Compiler {
1542
1501
  entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
1543
1502
  }>;
1544
1503
  webpack: typeof exports;
1545
- name: string;
1546
- parentCompilation: Compilation;
1504
+ name?: string;
1505
+ parentCompilation?: Compilation;
1547
1506
  root: Compiler;
1548
1507
  outputPath: string;
1549
1508
  watching: Watching;
@@ -1551,15 +1510,15 @@ declare class Compiler {
1551
1510
  intermediateFileSystem: IntermediateFileSystem;
1552
1511
  inputFileSystem: InputFileSystem;
1553
1512
  watchFileSystem: WatchFileSystem;
1554
- recordsInputPath: string;
1555
- recordsOutputPath: string;
1513
+ recordsInputPath: null | string;
1514
+ recordsOutputPath: null | string;
1556
1515
  records: {};
1557
1516
  managedPaths: Set<string>;
1558
1517
  immutablePaths: Set<string>;
1559
1518
  modifiedFiles: Set<string>;
1560
1519
  removedFiles: Set<string>;
1561
- fileTimestamps: Map<string, FileSystemInfoEntry>;
1562
- contextTimestamps: Map<string, FileSystemInfoEntry>;
1520
+ fileTimestamps: Map<string, null | FileSystemInfoEntry>;
1521
+ contextTimestamps: Map<string, null | FileSystemInfoEntry>;
1563
1522
  resolverFactory: ResolverFactory;
1564
1523
  infrastructureLogger: any;
1565
1524
  options: WebpackOptionsNormalized;
@@ -1664,7 +1623,7 @@ declare class ConcatenationScope {
1664
1623
  /**
1665
1624
  * if the position is ASI safe or unknown
1666
1625
  */
1667
- asiSafe: boolean;
1626
+ asiSafe?: boolean;
1668
1627
  index: number;
1669
1628
  };
1670
1629
  static DEFAULT_EXPORT: string;
@@ -1678,7 +1637,7 @@ declare interface Configuration {
1678
1637
  /**
1679
1638
  * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
1680
1639
  */
1681
- amd?: Amd;
1640
+ amd?: false | { [index: string]: any };
1682
1641
 
1683
1642
  /**
1684
1643
  * Report the first error as a hard error instead of tolerating it.
@@ -1688,7 +1647,7 @@ declare interface Configuration {
1688
1647
  /**
1689
1648
  * Cache generated modules and chunks to improve performance for multiple incremental builds.
1690
1649
  */
1691
- cache?: CacheOptions;
1650
+ cache?: boolean | MemoryCacheOptions | FileCacheOptions;
1692
1651
 
1693
1652
  /**
1694
1653
  * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
@@ -1703,12 +1662,16 @@ declare interface Configuration {
1703
1662
  /**
1704
1663
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
1705
1664
  */
1706
- devtool?: DevTool;
1665
+ devtool?: string | false;
1707
1666
 
1708
1667
  /**
1709
1668
  * The entry point(s) of the compilation.
1710
1669
  */
1711
- entry?: Entry;
1670
+ entry?:
1671
+ | string
1672
+ | (() => string | EntryObject | string[] | Promise<EntryStatic>)
1673
+ | EntryObject
1674
+ | string[];
1712
1675
 
1713
1676
  /**
1714
1677
  * Enables/Disables experiments (experimental features with relax SemVer compatibility).
@@ -1718,7 +1681,17 @@ declare interface Configuration {
1718
1681
  /**
1719
1682
  * 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`.
1720
1683
  */
1721
- externals?: Externals;
1684
+ externals?:
1685
+ | string
1686
+ | RegExp
1687
+ | ExternalItem[]
1688
+ | {
1689
+ [index: string]: string | boolean | string[] | { [index: string]: any };
1690
+ }
1691
+ | ((
1692
+ data: { context: string; request: string },
1693
+ callback: (err?: Error, result?: string) => void
1694
+ ) => void);
1722
1695
 
1723
1696
  /**
1724
1697
  * Enable presets of externals for specific targets.
@@ -1728,7 +1701,26 @@ declare interface Configuration {
1728
1701
  /**
1729
1702
  * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
1730
1703
  */
1731
- externalsType?: ExternalsType;
1704
+ externalsType?:
1705
+ | "var"
1706
+ | "module"
1707
+ | "assign"
1708
+ | "this"
1709
+ | "window"
1710
+ | "self"
1711
+ | "global"
1712
+ | "commonjs"
1713
+ | "commonjs2"
1714
+ | "commonjs-module"
1715
+ | "amd"
1716
+ | "amd-require"
1717
+ | "umd"
1718
+ | "umd2"
1719
+ | "jsonp"
1720
+ | "system"
1721
+ | "promise"
1722
+ | "import"
1723
+ | "script";
1732
1724
 
1733
1725
  /**
1734
1726
  * Ignore specific warnings.
@@ -1765,7 +1757,7 @@ declare interface Configuration {
1765
1757
  /**
1766
1758
  * Enable production optimizations or development hints.
1767
1759
  */
1768
- mode?: Mode;
1760
+ mode?: "development" | "production" | "none";
1769
1761
 
1770
1762
  /**
1771
1763
  * Options affecting the normal modules (`NormalModuleFactory`).
@@ -1780,7 +1772,7 @@ declare interface Configuration {
1780
1772
  /**
1781
1773
  * Include polyfills or mocks for various node stuff.
1782
1774
  */
1783
- node?: NodeWebpackOptions;
1775
+ node?: false | NodeOptions;
1784
1776
 
1785
1777
  /**
1786
1778
  * Enables/Disables integrated optimizations.
@@ -1800,7 +1792,7 @@ declare interface Configuration {
1800
1792
  /**
1801
1793
  * Configuration for web performance recommendations.
1802
1794
  */
1803
- performance?: Performance;
1795
+ performance?: false | PerformanceOptions;
1804
1796
 
1805
1797
  /**
1806
1798
  * Add additional plugins to the compiler.
@@ -1818,17 +1810,17 @@ declare interface Configuration {
1818
1810
  /**
1819
1811
  * Store compiler state to a json file.
1820
1812
  */
1821
- recordsInputPath?: DevTool;
1813
+ recordsInputPath?: string | false;
1822
1814
 
1823
1815
  /**
1824
1816
  * Load compiler state from a json file.
1825
1817
  */
1826
- recordsOutputPath?: DevTool;
1818
+ recordsOutputPath?: string | false;
1827
1819
 
1828
1820
  /**
1829
1821
  * Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
1830
1822
  */
1831
- recordsPath?: DevTool;
1823
+ recordsPath?: string | false;
1832
1824
 
1833
1825
  /**
1834
1826
  * Options for the resolver.
@@ -1848,12 +1840,22 @@ declare interface Configuration {
1848
1840
  /**
1849
1841
  * Stats options object or preset name.
1850
1842
  */
1851
- stats?: StatsValue;
1843
+ stats?:
1844
+ | boolean
1845
+ | "none"
1846
+ | "summary"
1847
+ | "errors-only"
1848
+ | "errors-warnings"
1849
+ | "minimal"
1850
+ | "normal"
1851
+ | "detailed"
1852
+ | "verbose"
1853
+ | StatsOptions;
1852
1854
 
1853
1855
  /**
1854
1856
  * Environment to build for. An array of environments to build for all of them when possible.
1855
1857
  */
1856
- target?: Target;
1858
+ target?: string | false | string[];
1857
1859
 
1858
1860
  /**
1859
1861
  * Enter watch mode, which rebuilds on file change.
@@ -1909,7 +1911,7 @@ declare interface ConsumesConfig {
1909
1911
  /**
1910
1912
  * Fallback module if no shared module is found in share scope. Defaults to the property name.
1911
1913
  */
1912
- import?: DevTool;
1914
+ import?: string | false;
1913
1915
 
1914
1916
  /**
1915
1917
  * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
@@ -1919,7 +1921,7 @@ declare interface ConsumesConfig {
1919
1921
  /**
1920
1922
  * Version requirement from module in share scope.
1921
1923
  */
1922
- requiredVersion?: DevTool;
1924
+ requiredVersion?: string | false;
1923
1925
 
1924
1926
  /**
1925
1927
  * Module is looked up under this key from the share scope.
@@ -2087,7 +2089,6 @@ declare class ContextReplacementPlugin {
2087
2089
  newContentRegExp: any;
2088
2090
  apply(compiler?: any): void;
2089
2091
  }
2090
- type CrossOriginLoading = false | "anonymous" | "use-credentials";
2091
2092
  type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
2092
2093
  declare class DefinePlugin {
2093
2094
  /**
@@ -2097,14 +2098,30 @@ declare class DefinePlugin {
2097
2098
  definitions: Record<
2098
2099
  string,
2099
2100
  RecursiveArrayOrRecord<
2100
- string | number | bigint | boolean | Function | RegExp | RuntimeValue
2101
+ | undefined
2102
+ | null
2103
+ | string
2104
+ | number
2105
+ | bigint
2106
+ | boolean
2107
+ | Function
2108
+ | RegExp
2109
+ | RuntimeValue
2101
2110
  >
2102
2111
  >
2103
2112
  );
2104
2113
  definitions: Record<
2105
2114
  string,
2106
2115
  RecursiveArrayOrRecord<
2107
- string | number | bigint | boolean | Function | RegExp | RuntimeValue
2116
+ | undefined
2117
+ | null
2118
+ | string
2119
+ | number
2120
+ | bigint
2121
+ | boolean
2122
+ | Function
2123
+ | RegExp
2124
+ | RuntimeValue
2108
2125
  >
2109
2126
  >;
2110
2127
 
@@ -2157,7 +2174,7 @@ declare class Dependency {
2157
2174
  loc: DependencyLocation;
2158
2175
  readonly type: string;
2159
2176
  readonly category: string;
2160
- getResourceIdentifier(): string;
2177
+ getResourceIdentifier(): null | string;
2161
2178
 
2162
2179
  /**
2163
2180
  * Returns the referenced module and export
@@ -2178,7 +2195,7 @@ declare class Dependency {
2178
2195
  /**
2179
2196
  * Returns the exported names
2180
2197
  */
2181
- getExports(moduleGraph: ModuleGraph): ExportsSpec;
2198
+ getExports(moduleGraph: ModuleGraph): undefined | ExportsSpec;
2182
2199
 
2183
2200
  /**
2184
2201
  * Returns warnings
@@ -2207,7 +2224,7 @@ declare class Dependency {
2207
2224
  module: any;
2208
2225
  readonly disconnect: any;
2209
2226
  static NO_EXPORTS_REFERENCED: any[];
2210
- static EXPORTS_OBJECT_REFERENCED: any[][];
2227
+ static EXPORTS_OBJECT_REFERENCED: never[][];
2211
2228
  }
2212
2229
  declare interface DependencyConstructor {
2213
2230
  new (...args: any[]): Dependency;
@@ -2395,7 +2412,21 @@ type DllReferencePluginOptions =
2395
2412
  /**
2396
2413
  * How the dll is exposed (libraryTarget, defaults to manifest.type).
2397
2414
  */
2398
- sourceType?: DllReferencePluginOptionsSourceType;
2415
+ sourceType?:
2416
+ | "var"
2417
+ | "assign"
2418
+ | "this"
2419
+ | "window"
2420
+ | "global"
2421
+ | "commonjs"
2422
+ | "commonjs2"
2423
+ | "commonjs-module"
2424
+ | "amd"
2425
+ | "amd-require"
2426
+ | "umd"
2427
+ | "umd2"
2428
+ | "jsonp"
2429
+ | "system";
2399
2430
  /**
2400
2431
  * The way how the export of the dll bundle is used.
2401
2432
  */
@@ -2425,7 +2456,21 @@ type DllReferencePluginOptions =
2425
2456
  /**
2426
2457
  * How the dll is exposed (libraryTarget).
2427
2458
  */
2428
- sourceType?: DllReferencePluginOptionsSourceType;
2459
+ sourceType?:
2460
+ | "var"
2461
+ | "assign"
2462
+ | "this"
2463
+ | "window"
2464
+ | "global"
2465
+ | "commonjs"
2466
+ | "commonjs2"
2467
+ | "commonjs-module"
2468
+ | "amd"
2469
+ | "amd-require"
2470
+ | "umd"
2471
+ | "umd2"
2472
+ | "jsonp"
2473
+ | "system";
2429
2474
  /**
2430
2475
  * The way how the export of the dll bundle is used.
2431
2476
  */
@@ -2469,23 +2514,22 @@ declare interface DllReferencePluginOptionsManifest {
2469
2514
  /**
2470
2515
  * The type how the dll is exposed (external type).
2471
2516
  */
2472
- type?: DllReferencePluginOptionsSourceType;
2517
+ type?:
2518
+ | "var"
2519
+ | "assign"
2520
+ | "this"
2521
+ | "window"
2522
+ | "global"
2523
+ | "commonjs"
2524
+ | "commonjs2"
2525
+ | "commonjs-module"
2526
+ | "amd"
2527
+ | "amd-require"
2528
+ | "umd"
2529
+ | "umd2"
2530
+ | "jsonp"
2531
+ | "system";
2473
2532
  }
2474
- type DllReferencePluginOptionsSourceType =
2475
- | "var"
2476
- | "assign"
2477
- | "this"
2478
- | "window"
2479
- | "global"
2480
- | "commonjs"
2481
- | "commonjs2"
2482
- | "commonjs-module"
2483
- | "amd"
2484
- | "amd-require"
2485
- | "umd"
2486
- | "umd2"
2487
- | "jsonp"
2488
- | "system";
2489
2533
  declare class DynamicEntryPlugin {
2490
2534
  constructor(context: string, entry: () => Promise<EntryStaticNormalized>);
2491
2535
  context: string;
@@ -2560,17 +2604,17 @@ declare interface EntryDescription {
2560
2604
  /**
2561
2605
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
2562
2606
  */
2563
- chunkLoading?: DevTool;
2607
+ chunkLoading?: string | false;
2564
2608
 
2565
2609
  /**
2566
2610
  * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
2567
2611
  */
2568
- dependOn?: EntryItem;
2612
+ dependOn?: string | string[];
2569
2613
 
2570
2614
  /**
2571
2615
  * Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
2572
2616
  */
2573
- filename?: Filename;
2617
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
2574
2618
 
2575
2619
  /**
2576
2620
  * Module(s) that are loaded upon startup.
@@ -2590,7 +2634,7 @@ declare interface EntryDescription {
2590
2634
  /**
2591
2635
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
2592
2636
  */
2593
- wasmLoading?: DevTool;
2637
+ wasmLoading?: string | false;
2594
2638
  }
2595
2639
 
2596
2640
  /**
@@ -2600,7 +2644,7 @@ declare interface EntryDescriptionNormalized {
2600
2644
  /**
2601
2645
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
2602
2646
  */
2603
- chunkLoading?: DevTool;
2647
+ chunkLoading?: string | false;
2604
2648
 
2605
2649
  /**
2606
2650
  * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
@@ -2610,7 +2654,7 @@ declare interface EntryDescriptionNormalized {
2610
2654
  /**
2611
2655
  * Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
2612
2656
  */
2613
- filename?: Filename;
2657
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
2614
2658
 
2615
2659
  /**
2616
2660
  * Module(s) that are loaded upon startup. The last one is exported.
@@ -2630,7 +2674,7 @@ declare interface EntryDescriptionNormalized {
2630
2674
  /**
2631
2675
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
2632
2676
  */
2633
- wasmLoading?: DevTool;
2677
+ wasmLoading?: string | false;
2634
2678
  }
2635
2679
  type EntryItem = string | string[];
2636
2680
  type EntryNormalized =
@@ -2702,7 +2746,7 @@ declare abstract class Entrypoint extends ChunkGroup {
2702
2746
  /**
2703
2747
  * Fetches the chunk reference containing the webpack bootstrap code
2704
2748
  */
2705
- getRuntimeChunk(): Chunk;
2749
+ getRuntimeChunk(): null | Chunk;
2706
2750
 
2707
2751
  /**
2708
2752
  * Sets the chunk with the entrypoint modules for an entrypoint.
@@ -2830,7 +2874,7 @@ declare abstract class ExportInfo {
2830
2874
  * null: only the runtime knows if it is provided
2831
2875
  * undefined: it was not determined if it is provided
2832
2876
  */
2833
- provided: boolean;
2877
+ provided?: null | boolean;
2834
2878
 
2835
2879
  /**
2836
2880
  * is the export a terminal binding that should be checked for export star conflicts
@@ -2842,17 +2886,17 @@ declare abstract class ExportInfo {
2842
2886
  * false: is can not be mangled
2843
2887
  * undefined: it was not determined if it can be mangled
2844
2888
  */
2845
- canMangleProvide: boolean;
2889
+ canMangleProvide?: boolean;
2846
2890
 
2847
2891
  /**
2848
2892
  * true: it can be mangled
2849
2893
  * false: is can not be mangled
2850
2894
  * undefined: it was not determined if it can be mangled
2851
2895
  */
2852
- canMangleUse: boolean;
2896
+ canMangleUse?: boolean;
2853
2897
  exportsInfoOwned: boolean;
2854
- exportsInfo: ExportsInfo;
2855
- readonly canMangle: boolean;
2898
+ exportsInfo?: ExportsInfo;
2899
+ readonly canMangle?: boolean;
2856
2900
  setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
2857
2901
  setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
2858
2902
  setHasUseInfo(): void;
@@ -2872,7 +2916,7 @@ declare abstract class ExportInfo {
2872
2916
  /**
2873
2917
  * get used name
2874
2918
  */
2875
- getUsedName(fallbackName: string, runtime: RuntimeSpec): DevTool;
2919
+ getUsedName(fallbackName: undefined | string, runtime: RuntimeSpec): DevTool;
2876
2920
  hasUsedName(): boolean;
2877
2921
 
2878
2922
  /**
@@ -2883,31 +2927,34 @@ declare abstract class ExportInfo {
2883
2927
  moduleGraph: ModuleGraph,
2884
2928
  resolveTargetFilter?: (arg0: {
2885
2929
  module: Module;
2886
- export: string[];
2930
+ export?: string[];
2887
2931
  }) => boolean
2888
- ): ExportsInfo | ExportInfo;
2889
- isReexport(): boolean;
2932
+ ): undefined | ExportsInfo | ExportInfo;
2933
+ isReexport(): undefined | boolean;
2890
2934
  findTarget(
2891
2935
  moduleGraph: ModuleGraph,
2892
2936
  validTargetModuleFilter: (arg0: Module) => boolean
2893
- ): false | { module: Module; export: string[] };
2937
+ ): undefined | false | { module: Module; export?: string[] };
2894
2938
  getTarget(
2895
2939
  moduleGraph: ModuleGraph,
2896
2940
  resolveTargetFilter?: (arg0: {
2897
2941
  module: Module;
2898
- export: string[];
2942
+ export?: string[];
2899
2943
  }) => boolean
2900
- ): { module: Module; export: string[] };
2944
+ ): undefined | { module: Module; export?: string[] };
2901
2945
 
2902
2946
  /**
2903
2947
  * Move the target forward as long resolveTargetFilter is fulfilled
2904
2948
  */
2905
2949
  moveTarget(
2906
2950
  moduleGraph: ModuleGraph,
2907
- resolveTargetFilter: (arg0: { module: Module; export: string[] }) => boolean
2908
- ): { module: Module; export: string[] };
2909
- createNestedExportsInfo(): ExportsInfo;
2910
- getNestedExportsInfo(): ExportsInfo;
2951
+ resolveTargetFilter: (arg0: {
2952
+ module: Module;
2953
+ export?: string[];
2954
+ }) => boolean
2955
+ ): undefined | { module: Module; export?: string[] };
2956
+ createNestedExportsInfo(): undefined | ExportsInfo;
2957
+ getNestedExportsInfo(): undefined | ExportsInfo;
2911
2958
  updateHash(hash?: any, runtime?: any): void;
2912
2959
  getUsedInfo(): string;
2913
2960
  getProvidedInfo():
@@ -2946,7 +2993,7 @@ declare interface ExportSpec {
2946
2993
  /**
2947
2994
  * when reexported: from which export
2948
2995
  */
2949
- export?: string[];
2996
+ export?: null | string[];
2950
2997
  }
2951
2998
  type ExportedVariableInfo = string | ScopeInfo | VariableInfo;
2952
2999
  declare abstract class ExportsInfo {
@@ -2961,8 +3008,8 @@ declare abstract class ExportsInfo {
2961
3008
  getOwnExportInfo(name: string): ExportInfo;
2962
3009
  getExportInfo(name: string): ExportInfo;
2963
3010
  getReadOnlyExportInfo(name: string): ExportInfo;
2964
- getReadOnlyExportInfoRecursive(name: string[]): ExportInfo;
2965
- getNestedExportsInfo(name?: string[]): ExportsInfo;
3011
+ getReadOnlyExportInfoRecursive(name: string[]): undefined | ExportInfo;
3012
+ getNestedExportsInfo(name?: string[]): undefined | ExportsInfo;
2966
3013
  setUnknownExportsProvided(
2967
3014
  canMangle?: boolean,
2968
3015
  excludeExports?: Set<string>,
@@ -2975,10 +3022,10 @@ declare abstract class ExportsInfo {
2975
3022
  setUsedForSideEffectsOnly(runtime: RuntimeSpec): boolean;
2976
3023
  isUsed(runtime: RuntimeSpec): boolean;
2977
3024
  isModuleUsed(runtime: RuntimeSpec): boolean;
2978
- getUsedExports(runtime: RuntimeSpec): boolean | SortableSet<string>;
2979
- getProvidedExports(): true | string[];
3025
+ getUsedExports(runtime: RuntimeSpec): null | boolean | SortableSet<string>;
3026
+ getProvidedExports(): null | true | string[];
2980
3027
  getRelevantExports(runtime: RuntimeSpec): ExportInfo[];
2981
- isExportProvided(name: EntryItem): boolean;
3028
+ isExportProvided(name: EntryItem): undefined | null | boolean;
2982
3029
  getUsageKey(runtime: RuntimeSpec): string;
2983
3030
  isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
2984
3031
  getUsed(name: EntryItem, runtime: RuntimeSpec): UsageStateType;
@@ -2996,7 +3043,7 @@ declare interface ExportsSpec {
2996
3043
  /**
2997
3044
  * exported names, true for unknown exports or null for no exports
2998
3045
  */
2999
- exports: true | (string | ExportSpec)[];
3046
+ exports: null | true | (string | ExportSpec)[];
3000
3047
 
3001
3048
  /**
3002
3049
  * when exports = true, list of unaffected exports
@@ -3107,8 +3154,8 @@ type Externals =
3107
3154
  callback: (err?: Error, result?: string) => void
3108
3155
  ) => void);
3109
3156
  declare class ExternalsPlugin {
3110
- constructor(type: string, externals: Externals);
3111
- type: string;
3157
+ constructor(type: undefined | string, externals: Externals);
3158
+ type?: string;
3112
3159
  externals: Externals;
3113
3160
 
3114
3161
  /**
@@ -3185,7 +3232,7 @@ declare interface FactorizeModuleOptions {
3185
3232
  currentProfile: ModuleProfile;
3186
3233
  factory: ModuleFactory;
3187
3234
  dependencies: Dependency[];
3188
- originModule: Module;
3235
+ originModule: null | Module;
3189
3236
  context?: string;
3190
3237
  }
3191
3238
  type FakeHook<T> = T & FakeHookMarker;
@@ -3312,7 +3359,7 @@ declare interface FileSystem {
3312
3359
  };
3313
3360
  }
3314
3361
  declare interface FileSystemCallback<T> {
3315
- (err?: PossibleFileSystemError & Error, result?: T): any;
3362
+ (err?: null | (PossibleFileSystemError & Error), result?: T): any;
3316
3363
  }
3317
3364
  declare interface FileSystemDirent {
3318
3365
  name: string | Buffer;
@@ -3321,44 +3368,54 @@ declare interface FileSystemDirent {
3321
3368
  }
3322
3369
  declare abstract class FileSystemInfo {
3323
3370
  fs: InputFileSystem;
3324
- logger: WebpackLogger;
3325
- fileTimestampQueue: AsyncQueue<string, string, FileSystemInfoEntry>;
3326
- fileHashQueue: AsyncQueue<string, string, string>;
3327
- contextTimestampQueue: AsyncQueue<string, string, FileSystemInfoEntry>;
3328
- contextHashQueue: AsyncQueue<string, string, string>;
3329
- managedItemQueue: AsyncQueue<string, string, string>;
3371
+ logger?: WebpackLogger;
3372
+ fileTimestampQueue: AsyncQueue<string, string, null | FileSystemInfoEntry>;
3373
+ fileHashQueue: AsyncQueue<string, string, null | string>;
3374
+ contextTimestampQueue: AsyncQueue<string, string, null | FileSystemInfoEntry>;
3375
+ contextHashQueue: AsyncQueue<string, string, null | string>;
3376
+ managedItemQueue: AsyncQueue<string, string, null | string>;
3330
3377
  managedItemDirectoryQueue: AsyncQueue<string, string, Set<string>>;
3331
3378
  managedPaths: string[];
3332
3379
  managedPathsWithSlash: string[];
3333
3380
  immutablePaths: string[];
3334
3381
  immutablePathsWithSlash: string[];
3335
3382
  logStatistics(): void;
3336
- addFileTimestamps(map: Map<string, FileSystemInfoEntry | "ignore">): void;
3337
- addContextTimestamps(map: Map<string, FileSystemInfoEntry | "ignore">): void;
3383
+ addFileTimestamps(
3384
+ map: Map<string, null | FileSystemInfoEntry | "ignore">
3385
+ ): void;
3386
+ addContextTimestamps(
3387
+ map: Map<string, null | FileSystemInfoEntry | "ignore">
3388
+ ): void;
3338
3389
  getFileTimestamp(
3339
3390
  path: string,
3340
- callback: (arg0: WebpackError, arg1: FileSystemInfoEntry | "ignore") => void
3391
+ callback: (
3392
+ arg0?: WebpackError,
3393
+ arg1?: null | FileSystemInfoEntry | "ignore"
3394
+ ) => void
3341
3395
  ): void;
3342
3396
  getContextTimestamp(
3343
3397
  path: string,
3344
- callback: (arg0: WebpackError, arg1: FileSystemInfoEntry | "ignore") => void
3398
+ callback: (
3399
+ arg0?: WebpackError,
3400
+ arg1?: null | FileSystemInfoEntry | "ignore"
3401
+ ) => void
3345
3402
  ): void;
3346
3403
  getFileHash(
3347
3404
  path: string,
3348
- callback: (arg0: WebpackError, arg1: string) => void
3405
+ callback: (arg0?: WebpackError, arg1?: string) => void
3349
3406
  ): void;
3350
3407
  getContextHash(
3351
3408
  path: string,
3352
- callback: (arg0: WebpackError, arg1: string) => void
3409
+ callback: (arg0?: WebpackError, arg1?: string) => void
3353
3410
  ): void;
3354
3411
  resolveBuildDependencies(
3355
3412
  context: string,
3356
3413
  deps: Iterable<string>,
3357
- callback: (arg0: Error, arg1: ResolveBuildDependenciesResult) => void
3414
+ callback: (arg0?: Error, arg1?: ResolveBuildDependenciesResult) => void
3358
3415
  ): void;
3359
3416
  checkResolveResultsValid(
3360
3417
  resolveResults: Map<string, string>,
3361
- callback: (arg0: Error, arg1: boolean) => void
3418
+ callback: (arg0?: Error, arg1?: boolean) => void
3362
3419
  ): void;
3363
3420
  createSnapshot(
3364
3421
  startTime: number,
@@ -3375,12 +3432,12 @@ declare abstract class FileSystemInfo {
3375
3432
  */
3376
3433
  timestamp?: boolean;
3377
3434
  },
3378
- callback: (arg0: WebpackError, arg1: Snapshot) => void
3435
+ callback: (arg0?: WebpackError, arg1?: Snapshot) => void
3379
3436
  ): void;
3380
3437
  mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
3381
3438
  checkSnapshotValid(
3382
3439
  snapshot: Snapshot,
3383
- callback: (arg0: WebpackError, arg1: boolean) => void
3440
+ callback: (arg0?: WebpackError, arg1?: boolean) => void
3384
3441
  ): void;
3385
3442
  getDeprecatedFileTimestamps(): Map<any, any>;
3386
3443
  getDeprecatedContextTimestamps(): Map<any, any>;
@@ -3394,15 +3451,7 @@ declare interface FileSystemStats {
3394
3451
  isDirectory: () => boolean;
3395
3452
  isFile: () => boolean;
3396
3453
  }
3397
- type Filename =
3398
- | string
3399
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3400
3454
  type FilterItemTypes = string | RegExp | ((value: string) => boolean);
3401
- type FilterTypes =
3402
- | string
3403
- | RegExp
3404
- | FilterItemTypes[]
3405
- | ((value: string) => boolean);
3406
3455
  declare interface GenerateContext {
3407
3456
  /**
3408
3457
  * mapping from dependencies to templates
@@ -3452,7 +3501,7 @@ declare class Generator {
3452
3501
  getConcatenationBailoutReason(
3453
3502
  module: NormalModule,
3454
3503
  context: ConcatenationBailoutReasonContext
3455
- ): string;
3504
+ ): undefined | string;
3456
3505
  updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
3457
3506
  static byType(map?: any): ByTypeGenerator;
3458
3507
  }
@@ -3463,15 +3512,35 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
3463
3512
  global: string,
3464
3513
  getFilenameForChunk: (
3465
3514
  arg0: Chunk
3466
- ) => string | ((arg0: PathData, arg1: AssetInfo) => string),
3515
+ ) => string | ((arg0: PathData, arg1?: AssetInfo) => string),
3467
3516
  allChunks: boolean
3468
3517
  );
3469
3518
  contentType: string;
3470
3519
  global: string;
3471
3520
  getFilenameForChunk: (
3472
3521
  arg0: Chunk
3473
- ) => string | ((arg0: PathData, arg1: AssetInfo) => string);
3522
+ ) => string | ((arg0: PathData, arg1?: AssetInfo) => string);
3474
3523
  allChunks: boolean;
3524
+
3525
+ /**
3526
+ * Runtime modules without any dependencies to other runtime modules
3527
+ */
3528
+ static STAGE_NORMAL: number;
3529
+
3530
+ /**
3531
+ * Runtime modules with simple dependencies on other runtime modules
3532
+ */
3533
+ static STAGE_BASIC: number;
3534
+
3535
+ /**
3536
+ * Runtime modules which attach to handlers of other runtime modules
3537
+ */
3538
+ static STAGE_ATTACH: number;
3539
+
3540
+ /**
3541
+ * Runtime modules which trigger actions on bootstrap
3542
+ */
3543
+ static STAGE_TRIGGER: number;
3475
3544
  }
3476
3545
  declare interface GroupConfig<T, R> {
3477
3546
  getKeys: (arg0: T) => string[];
@@ -3490,7 +3559,7 @@ declare interface HMRJavascriptParserHooks {
3490
3559
  declare interface HandleModuleCreationOptions {
3491
3560
  factory: ModuleFactory;
3492
3561
  dependencies: Dependency[];
3493
- originModule: Module;
3562
+ originModule: null | Module;
3494
3563
  context?: string;
3495
3564
 
3496
3565
  /**
@@ -3579,7 +3648,7 @@ declare class IgnorePlugin {
3579
3648
  * Note that if "contextRegExp" is given, both the "resourceRegExp"
3580
3649
  * and "contextRegExp" have to match.
3581
3650
  */
3582
- checkIgnore(resolveData: ResolveData): false;
3651
+ checkIgnore(resolveData: ResolveData): undefined | false;
3583
3652
 
3584
3653
  /**
3585
3654
  * Apply the plugin
@@ -3603,7 +3672,7 @@ type IgnorePluginOptions =
3603
3672
  */
3604
3673
  checkResource?: (resource: string, context: string) => boolean;
3605
3674
  };
3606
- type ImportSource = string | SimpleLiteral | RegExpLiteral;
3675
+ type ImportSource = undefined | null | string | SimpleLiteral | RegExpLiteral;
3607
3676
 
3608
3677
  /**
3609
3678
  * Options for infrastructure level logging.
@@ -3628,38 +3697,38 @@ declare abstract class InitFragment {
3628
3697
  content: string | Source;
3629
3698
  stage: number;
3630
3699
  position: number;
3631
- key: string;
3632
- endContent: string | Source;
3700
+ key?: string;
3701
+ endContent?: string | Source;
3633
3702
  getContent(generateContext: GenerateContext): string | Source;
3634
- getEndContent(generateContext: GenerateContext): string | Source;
3703
+ getEndContent(generateContext: GenerateContext): undefined | string | Source;
3635
3704
  merge: any;
3636
3705
  }
3637
3706
  declare interface InputFileSystem {
3638
3707
  readFile: (
3639
3708
  arg0: string,
3640
- arg1: (arg0: NodeJS.ErrnoException, arg1: Buffer) => void
3709
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: Buffer) => void
3641
3710
  ) => void;
3642
3711
  readJson?: (
3643
3712
  arg0: string,
3644
- arg1: (arg0: Error | NodeJS.ErrnoException, arg1?: any) => void
3713
+ arg1: (arg0?: Error | NodeJS.ErrnoException, arg1?: any) => void
3645
3714
  ) => void;
3646
3715
  readlink: (
3647
3716
  arg0: string,
3648
- arg1: (arg0: NodeJS.ErrnoException, arg1: string | Buffer) => void
3717
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
3649
3718
  ) => void;
3650
3719
  readdir: (
3651
3720
  arg0: string,
3652
- arg1: (arg0: NodeJS.ErrnoException, arg1: string[]) => void
3721
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: string[]) => void
3653
3722
  ) => void;
3654
3723
  stat: (
3655
3724
  arg0: string,
3656
- arg1: (arg0: NodeJS.ErrnoException, arg1: FsStats) => void
3725
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: FsStats) => void
3657
3726
  ) => void;
3658
3727
  realpath?: (
3659
3728
  arg0: string,
3660
- arg1: (arg0: NodeJS.ErrnoException, arg1: string) => void
3729
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: string) => void
3661
3730
  ) => void;
3662
- purge?: (arg0: string) => void;
3731
+ purge?: (arg0?: string) => void;
3663
3732
  join?: (arg0: string, arg1: string) => string;
3664
3733
  relative?: (arg0: string, arg1: string) => string;
3665
3734
  dirname?: (arg0: string) => string;
@@ -3670,10 +3739,24 @@ type IntermediateFileSystem = InputFileSystem &
3670
3739
  declare interface IntermediateFileSystemExtras {
3671
3740
  mkdirSync: (arg0: string) => void;
3672
3741
  createWriteStream: (arg0: string) => WriteStream;
3742
+ open: (
3743
+ arg0: string,
3744
+ arg1: string,
3745
+ arg2: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
3746
+ ) => void;
3747
+ read: (
3748
+ arg0: number,
3749
+ arg1: Buffer,
3750
+ arg2: number,
3751
+ arg3: number,
3752
+ arg4: number,
3753
+ arg5: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
3754
+ ) => void;
3755
+ close: (arg0: number, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
3673
3756
  rename: (
3674
3757
  arg0: string,
3675
3758
  arg1: string,
3676
- arg2: (arg0: NodeJS.ErrnoException) => void
3759
+ arg2: (arg0?: NodeJS.ErrnoException) => void
3677
3760
  ) => void;
3678
3761
  }
3679
3762
  type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
@@ -3719,7 +3802,13 @@ declare class JavascriptModulesPlugin {
3719
3802
  renderBootstrap(
3720
3803
  renderContext: RenderBootstrapContext,
3721
3804
  hooks: CompilationHooksJavascriptModulesPlugin
3722
- ): { header: string[]; startup: string[]; allowInlineStartup: boolean };
3805
+ ): {
3806
+ header: string[];
3807
+ beforeStartup: string[];
3808
+ startup: string[];
3809
+ afterStartup: string[];
3810
+ allowInlineStartup: boolean;
3811
+ };
3723
3812
  renderRequire(
3724
3813
  renderContext: RenderBootstrapContext,
3725
3814
  hooks: CompilationHooksJavascriptModulesPlugin
@@ -3734,25 +3823,30 @@ declare class JavascriptParser extends Parser {
3734
3823
  constructor(sourceType?: "module" | "script" | "auto");
3735
3824
  hooks: Readonly<{
3736
3825
  evaluateTypeof: HookMap<
3737
- SyncBailHook<[UnaryExpression], BasicEvaluatedExpression>
3826
+ SyncBailHook<
3827
+ [UnaryExpression],
3828
+ undefined | null | BasicEvaluatedExpression
3829
+ >
3830
+ >;
3831
+ evaluate: HookMap<
3832
+ SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
3738
3833
  >;
3739
- evaluate: HookMap<SyncBailHook<[Expression], BasicEvaluatedExpression>>;
3740
3834
  evaluateIdentifier: HookMap<
3741
3835
  SyncBailHook<
3742
3836
  [ThisExpression | MemberExpression | MetaProperty | Identifier],
3743
- BasicEvaluatedExpression
3837
+ undefined | null | BasicEvaluatedExpression
3744
3838
  >
3745
3839
  >;
3746
3840
  evaluateDefinedIdentifier: HookMap<
3747
3841
  SyncBailHook<
3748
3842
  [ThisExpression | MemberExpression | Identifier],
3749
- BasicEvaluatedExpression
3843
+ undefined | null | BasicEvaluatedExpression
3750
3844
  >
3751
3845
  >;
3752
3846
  evaluateCallExpressionMember: HookMap<
3753
3847
  SyncBailHook<
3754
- [CallExpression, BasicEvaluatedExpression],
3755
- BasicEvaluatedExpression
3848
+ [CallExpression, undefined | BasicEvaluatedExpression],
3849
+ undefined | null | BasicEvaluatedExpression
3756
3850
  >
3757
3851
  >;
3758
3852
  isPure: HookMap<
@@ -3904,11 +3998,11 @@ declare class JavascriptParser extends Parser {
3904
3998
  exportDeclaration: SyncBailHook<[Statement, Declaration], boolean | void>;
3905
3999
  exportExpression: SyncBailHook<[Statement, Declaration], boolean | void>;
3906
4000
  exportSpecifier: SyncBailHook<
3907
- [Statement, string, string, number],
4001
+ [Statement, string, string, undefined | number],
3908
4002
  boolean | void
3909
4003
  >;
3910
4004
  exportImportSpecifier: SyncBailHook<
3911
- [Statement, ImportSource, string, string, number],
4005
+ [Statement, ImportSource, string, string, undefined | number],
3912
4006
  boolean | void
3913
4007
  >;
3914
4008
  preDeclarator: SyncBailHook<
@@ -4016,7 +4110,7 @@ declare class JavascriptParser extends Parser {
4016
4110
  )[];
4017
4111
  prevStatement: any;
4018
4112
  currentTagData: any;
4019
- getRenameIdentifier(expr?: any): string;
4113
+ getRenameIdentifier(expr?: any): undefined | string;
4020
4114
  walkClass(classy: ClassExpression | ClassDeclaration): void;
4021
4115
  walkMethodDefinition(methodDefinition?: any): void;
4022
4116
  preWalkStatements(statements?: any): void;
@@ -4163,12 +4257,16 @@ declare class JavascriptParser extends Parser {
4163
4257
  enterArrayPattern(pattern?: any, onIdent?: any): void;
4164
4258
  enterRestElement(pattern?: any, onIdent?: any): void;
4165
4259
  enterAssignmentPattern(pattern?: any, onIdent?: any): void;
4166
- evaluateExpression(expression: Expression): BasicEvaluatedExpression;
4260
+ evaluateExpression(
4261
+ expression: Expression
4262
+ ): undefined | BasicEvaluatedExpression;
4167
4263
  parseString(expression?: any): any;
4168
4264
  parseCalculatedString(expression?: any): any;
4169
- evaluate(source?: any): BasicEvaluatedExpression;
4265
+ evaluate(source?: any): undefined | BasicEvaluatedExpression;
4170
4266
  isPure(
4171
4267
  expr:
4268
+ | undefined
4269
+ | null
4172
4270
  | UnaryExpression
4173
4271
  | ThisExpression
4174
4272
  | ArrayExpression
@@ -4211,7 +4309,9 @@ declare class JavascriptParser extends Parser {
4211
4309
  isVariableDefined(name?: any): boolean;
4212
4310
  getVariableInfo(name: string): ExportedVariableInfo;
4213
4311
  setVariable(name: string, variableInfo: ExportedVariableInfo): void;
4214
- parseCommentOptions(range?: any): { options: any; errors: any };
4312
+ parseCommentOptions(
4313
+ range?: any
4314
+ ): { options: null; errors: null } | { options: {}; errors: any[] };
4215
4315
  extractMemberExpressionChain(
4216
4316
  expression: MemberExpression
4217
4317
  ): {
@@ -4251,7 +4351,7 @@ declare class JavascriptParser extends Parser {
4251
4351
  getMemberExpressionInfo(
4252
4352
  expression: MemberExpression,
4253
4353
  allowedTypes: number
4254
- ): CallExpressionInfo | ExpressionExpressionInfo;
4354
+ ): undefined | CallExpressionInfo | ExpressionExpressionInfo;
4255
4355
  getNameForExpression(
4256
4356
  expression: MemberExpression
4257
4357
  ): {
@@ -4268,6 +4368,26 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
4268
4368
  static getCompilationHooks(
4269
4369
  compilation: Compilation
4270
4370
  ): JsonpCompilationPluginHooks;
4371
+
4372
+ /**
4373
+ * Runtime modules without any dependencies to other runtime modules
4374
+ */
4375
+ static STAGE_NORMAL: number;
4376
+
4377
+ /**
4378
+ * Runtime modules with simple dependencies on other runtime modules
4379
+ */
4380
+ static STAGE_BASIC: number;
4381
+
4382
+ /**
4383
+ * Runtime modules which attach to handlers of other runtime modules
4384
+ */
4385
+ static STAGE_ATTACH: number;
4386
+
4387
+ /**
4388
+ * Runtime modules which trigger actions on bootstrap
4389
+ */
4390
+ static STAGE_TRIGGER: number;
4271
4391
  }
4272
4392
  declare interface JsonpCompilationPluginHooks {
4273
4393
  linkPreload: SyncWaterfallHook<[string, Chunk]>;
@@ -4284,6 +4404,67 @@ declare class JsonpTemplatePlugin {
4284
4404
  compilation: Compilation
4285
4405
  ): JsonpCompilationPluginHooks;
4286
4406
  }
4407
+ declare interface KnownAssetInfo {
4408
+ /**
4409
+ * true, if the asset can be long term cached forever (contains a hash)
4410
+ */
4411
+ immutable?: boolean;
4412
+
4413
+ /**
4414
+ * whether the asset is minimized
4415
+ */
4416
+ minimized?: boolean;
4417
+
4418
+ /**
4419
+ * the value(s) of the full hash used for this asset
4420
+ */
4421
+ fullhash?: string | string[];
4422
+
4423
+ /**
4424
+ * the value(s) of the chunk hash used for this asset
4425
+ */
4426
+ chunkhash?: string | string[];
4427
+
4428
+ /**
4429
+ * the value(s) of the module hash used for this asset
4430
+ */
4431
+ modulehash?: string | string[];
4432
+
4433
+ /**
4434
+ * the value(s) of the content hash used for this asset
4435
+ */
4436
+ contenthash?: string | string[];
4437
+
4438
+ /**
4439
+ * when asset was created from a source file (potentially transformed), the original filename relative to compilation context
4440
+ */
4441
+ sourceFilename?: string;
4442
+
4443
+ /**
4444
+ * size in bytes, only set after asset has been emitted
4445
+ */
4446
+ size?: number;
4447
+
4448
+ /**
4449
+ * true, when asset is only used for development and doesn't count towards user-facing assets
4450
+ */
4451
+ development?: boolean;
4452
+
4453
+ /**
4454
+ * true, when asset ships data for updating an existing application (HMR)
4455
+ */
4456
+ hotModuleReplacement?: boolean;
4457
+
4458
+ /**
4459
+ * true, when asset is javascript and an ESM
4460
+ */
4461
+ javascriptModule?: boolean;
4462
+
4463
+ /**
4464
+ * object of pointers to other assets, keyed by type of relation (only points from parent to child)
4465
+ */
4466
+ related?: Record<string, EntryItem>;
4467
+ }
4287
4468
  declare interface KnownBuildMeta {
4288
4469
  moduleArgument?: string;
4289
4470
  exportsArgument?: string;
@@ -4322,7 +4503,7 @@ declare interface LibIdentOptions {
4322
4503
  /**
4323
4504
  * object for caching
4324
4505
  */
4325
- associatedObjectForCache?: any;
4506
+ associatedObjectForCache?: Object;
4326
4507
  }
4327
4508
  declare class LibManifestPlugin {
4328
4509
  constructor(options?: any);
@@ -4333,7 +4514,6 @@ declare class LibManifestPlugin {
4333
4514
  */
4334
4515
  apply(compiler: Compiler): void;
4335
4516
  }
4336
- type Library = string | string[] | LibraryOptions | LibraryCustomUmdObject;
4337
4517
  declare interface LibraryContext<T> {
4338
4518
  compilation: Compilation;
4339
4519
  options: T;
@@ -4381,7 +4561,7 @@ declare interface LibraryCustomUmdObject {
4381
4561
  /**
4382
4562
  * Name of the property exposed globally by a UMD library.
4383
4563
  */
4384
- root?: EntryItem;
4564
+ root?: string | string[];
4385
4565
  }
4386
4566
  type LibraryName = string | string[] | LibraryCustomUmdObject;
4387
4567
 
@@ -4392,17 +4572,17 @@ declare interface LibraryOptions {
4392
4572
  /**
4393
4573
  * Add a comment in the UMD wrapper.
4394
4574
  */
4395
- auxiliaryComment?: AuxiliaryComment;
4575
+ auxiliaryComment?: string | LibraryCustomUmdCommentObject;
4396
4576
 
4397
4577
  /**
4398
4578
  * Specify which export should be exposed as library.
4399
4579
  */
4400
- export?: EntryItem;
4580
+ export?: string | string[];
4401
4581
 
4402
4582
  /**
4403
4583
  * The name of the library (some types allow unnamed libraries too).
4404
4584
  */
4405
- name?: LibraryName;
4585
+ name?: string | string[] | LibraryCustomUmdObject;
4406
4586
 
4407
4587
  /**
4408
4588
  * Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
@@ -4437,7 +4617,7 @@ declare class LibraryTemplatePlugin {
4437
4617
  }
4438
4618
  declare class LimitChunkCountPlugin {
4439
4619
  constructor(options?: LimitChunkCountPluginOptions);
4440
- options: LimitChunkCountPluginOptions;
4620
+ options?: LimitChunkCountPluginOptions;
4441
4621
  apply(compiler: Compiler): void;
4442
4622
  }
4443
4623
  declare interface LimitChunkCountPluginOptions {
@@ -4464,6 +4644,26 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
4464
4644
  static getCompilationHooks(
4465
4645
  compilation: Compilation
4466
4646
  ): LoadScriptCompilationHooks;
4647
+
4648
+ /**
4649
+ * Runtime modules without any dependencies to other runtime modules
4650
+ */
4651
+ static STAGE_NORMAL: number;
4652
+
4653
+ /**
4654
+ * Runtime modules with simple dependencies on other runtime modules
4655
+ */
4656
+ static STAGE_BASIC: number;
4657
+
4658
+ /**
4659
+ * Runtime modules which attach to handlers of other runtime modules
4660
+ */
4661
+ static STAGE_ATTACH: number;
4662
+
4663
+ /**
4664
+ * Runtime modules which trigger actions on bootstrap
4665
+ */
4666
+ static STAGE_TRIGGER: number;
4467
4667
  }
4468
4668
 
4469
4669
  /**
@@ -4475,8 +4675,8 @@ declare interface Loader {
4475
4675
  declare interface LoaderItem {
4476
4676
  loader: string;
4477
4677
  options: any;
4478
- ident: string;
4479
- type: string;
4678
+ ident: null | string;
4679
+ type: null | string;
4480
4680
  }
4481
4681
  declare class LoaderOptionsPlugin {
4482
4682
  constructor(options?: LoaderOptionsPluginOptions);
@@ -4595,13 +4795,13 @@ declare abstract class MainTemplate {
4595
4795
  readonly linkPreload: SyncWaterfallHook<[string, Chunk]>;
4596
4796
  }>;
4597
4797
  renderCurrentHashCode: (hash: string, length?: number) => string;
4598
- getPublicPath: (options?: any) => string;
4798
+ getPublicPath: (options: {}) => string;
4599
4799
  getAssetPath: (path?: any, options?: any) => string;
4600
4800
  getAssetPathWithInfo: (
4601
4801
  path?: any,
4602
4802
  options?: any
4603
4803
  ) => { path: string; info: AssetInfo };
4604
- readonly requireFn: string;
4804
+ readonly requireFn: "__webpack_require__";
4605
4805
  readonly outputOptions: Output;
4606
4806
  }
4607
4807
  declare interface MapOptions {
@@ -4651,7 +4851,6 @@ declare interface MinChunkSizePluginOptions {
4651
4851
  */
4652
4852
  minChunkSize: number;
4653
4853
  }
4654
- type Mode = "development" | "production" | "none";
4655
4854
  declare class Module extends DependenciesBlock {
4656
4855
  constructor(type: string, context?: string);
4657
4856
  type: string;
@@ -4659,21 +4858,21 @@ declare class Module extends DependenciesBlock {
4659
4858
  needId: boolean;
4660
4859
  debugId: number;
4661
4860
  resolveOptions: ResolveOptionsWebpackOptions;
4662
- factoryMeta: any;
4861
+ factoryMeta?: {};
4663
4862
  useSourceMap: boolean;
4664
4863
  useSimpleSourceMap: boolean;
4665
4864
  buildMeta: BuildMeta;
4666
- buildInfo: any;
4667
- presentationalDependencies: Dependency[];
4865
+ buildInfo: Record<string, any>;
4866
+ presentationalDependencies?: Dependency[];
4668
4867
  id: string | number;
4669
4868
  readonly hash: string;
4670
4869
  readonly renderedHash: string;
4671
- profile: ModuleProfile;
4870
+ profile: null | ModuleProfile;
4672
4871
  index: number;
4673
4872
  index2: number;
4674
4873
  depth: number;
4675
- issuer: Module;
4676
- readonly usedExports: boolean | SortableSet<string>;
4874
+ issuer: null | Module;
4875
+ readonly usedExports: null | boolean | SortableSet<string>;
4677
4876
  readonly optimizationBailout: (
4678
4877
  | string
4679
4878
  | ((requestShortener: RequestShortener) => string)
@@ -4686,7 +4885,7 @@ declare class Module extends DependenciesBlock {
4686
4885
  getChunks(): Chunk[];
4687
4886
  getNumberOfChunks(): number;
4688
4887
  readonly chunksIterable: Iterable<Chunk>;
4689
- isProvided(exportName: string): boolean;
4888
+ isProvided(exportName: string): null | boolean;
4690
4889
  readonly exportsArgument: string;
4691
4890
  readonly moduleArgument: string;
4692
4891
  getExportsType(
@@ -4695,10 +4894,10 @@ declare class Module extends DependenciesBlock {
4695
4894
  ): "namespace" | "default-only" | "default-with-named" | "dynamic";
4696
4895
  addPresentationalDependency(presentationalDependency: Dependency): void;
4697
4896
  addWarning(warning: WebpackError): void;
4698
- getWarnings(): Iterable<WebpackError>;
4897
+ getWarnings(): undefined | Iterable<WebpackError>;
4699
4898
  getNumberOfWarnings(): number;
4700
4899
  addError(error: WebpackError): void;
4701
- getErrors(): Iterable<WebpackError>;
4900
+ getErrors(): undefined | Iterable<WebpackError>;
4702
4901
  getNumberOfErrors(): number;
4703
4902
 
4704
4903
  /**
@@ -4724,11 +4923,11 @@ declare class Module extends DependenciesBlock {
4724
4923
  hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
4725
4924
  needBuild(
4726
4925
  context: NeedBuildContext,
4727
- callback: (arg0: WebpackError, arg1: boolean) => void
4926
+ callback: (arg0?: WebpackError, arg1?: boolean) => void
4728
4927
  ): void;
4729
4928
  needRebuild(
4730
- fileTimestamps: Map<string, number>,
4731
- contextTimestamps: Map<string, number>
4929
+ fileTimestamps: Map<string, null | number>,
4930
+ contextTimestamps: Map<string, null | number>
4732
4931
  ): boolean;
4733
4932
  invalidateBuild(): void;
4734
4933
  identifier(): string;
@@ -4738,7 +4937,7 @@ declare class Module extends DependenciesBlock {
4738
4937
  compilation: Compilation,
4739
4938
  resolver: ResolverWithOptions,
4740
4939
  fs: InputFileSystem,
4741
- callback: (arg0: WebpackError) => void
4940
+ callback: (arg0?: WebpackError) => void
4742
4941
  ): void;
4743
4942
  getSourceTypes(): Set<string>;
4744
4943
  source(
@@ -4747,11 +4946,11 @@ declare class Module extends DependenciesBlock {
4747
4946
  type?: string
4748
4947
  ): Source;
4749
4948
  size(type?: string): number;
4750
- libIdent(options: LibIdentOptions): string;
4751
- nameForCondition(): string;
4949
+ libIdent(options: LibIdentOptions): null | string;
4950
+ nameForCondition(): null | string;
4752
4951
  getConcatenationBailoutReason(
4753
4952
  context: ConcatenationBailoutReasonContext
4754
- ): string;
4953
+ ): undefined | string;
4755
4954
  getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
4756
4955
  codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
4757
4956
  chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
@@ -4762,7 +4961,7 @@ declare class Module extends DependenciesBlock {
4762
4961
  * and properties.
4763
4962
  */
4764
4963
  updateCacheModule(module: Module): void;
4765
- originalSource(): Source;
4964
+ originalSource(): null | Source;
4766
4965
  addCacheDependencies(
4767
4966
  fileDependencies: LazySet<string>,
4768
4967
  contextDependencies: LazySet<string>,
@@ -4792,7 +4991,7 @@ declare abstract class ModuleDependency extends Dependency {
4792
4991
  declare abstract class ModuleFactory {
4793
4992
  create(
4794
4993
  data: ModuleFactoryCreateData,
4795
- callback: (arg0: Error, arg1: ModuleFactoryResult) => void
4994
+ callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
4796
4995
  ): void;
4797
4996
  }
4798
4997
  declare interface ModuleFactoryCreateData {
@@ -4826,7 +5025,7 @@ declare interface ModuleFederationPluginOptions {
4826
5025
  /**
4827
5026
  * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
4828
5027
  */
4829
- exposes?: Exposes;
5028
+ exposes?: (string | ExposesObject)[] | ExposesObject;
4830
5029
 
4831
5030
  /**
4832
5031
  * The filename of the container as relative path inside the `output.path` directory.
@@ -4846,12 +5045,31 @@ declare interface ModuleFederationPluginOptions {
4846
5045
  /**
4847
5046
  * The external type of the remote containers.
4848
5047
  */
4849
- remoteType?: ExternalsType;
5048
+ remoteType?:
5049
+ | "var"
5050
+ | "module"
5051
+ | "assign"
5052
+ | "this"
5053
+ | "window"
5054
+ | "self"
5055
+ | "global"
5056
+ | "commonjs"
5057
+ | "commonjs2"
5058
+ | "commonjs-module"
5059
+ | "amd"
5060
+ | "amd-require"
5061
+ | "umd"
5062
+ | "umd2"
5063
+ | "jsonp"
5064
+ | "system"
5065
+ | "promise"
5066
+ | "import"
5067
+ | "script";
4850
5068
 
4851
5069
  /**
4852
5070
  * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
4853
5071
  */
4854
- remotes?: Remotes;
5072
+ remotes?: (string | RemotesObject)[] | RemotesObject;
4855
5073
 
4856
5074
  /**
4857
5075
  * Share scope name used for all shared modules (defaults to 'default').
@@ -4861,7 +5079,7 @@ declare interface ModuleFederationPluginOptions {
4861
5079
  /**
4862
5080
  * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
4863
5081
  */
4864
- shared?: Shared;
5082
+ shared?: (string | SharedObject)[] | SharedObject;
4865
5083
  }
4866
5084
  declare class ModuleGraph {
4867
5085
  constructor();
@@ -4895,29 +5113,29 @@ declare class ModuleGraph {
4895
5113
  ): void;
4896
5114
  addExtraReason(module: Module, explanation: string): void;
4897
5115
  getResolvedModule(dependency: Dependency): Module;
4898
- getConnection(dependency: Dependency): ModuleGraphConnection;
5116
+ getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
4899
5117
  getModule(dependency: Dependency): Module;
4900
5118
  getOrigin(dependency: Dependency): Module;
4901
5119
  getResolvedOrigin(dependency: Dependency): Module;
4902
5120
  getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
4903
5121
  getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
4904
- getProfile(module: Module): ModuleProfile;
4905
- setProfile(module: Module, profile: ModuleProfile): void;
4906
- getIssuer(module: Module): Module;
4907
- setIssuer(module: Module, issuer: Module): void;
4908
- setIssuerIfUnset(module: Module, issuer: Module): void;
5122
+ getProfile(module: Module): null | ModuleProfile;
5123
+ setProfile(module: Module, profile: null | ModuleProfile): void;
5124
+ getIssuer(module: Module): null | Module;
5125
+ setIssuer(module: Module, issuer: null | Module): void;
5126
+ setIssuerIfUnset(module: Module, issuer: null | Module): void;
4909
5127
  getOptimizationBailout(
4910
5128
  module: Module
4911
5129
  ): (string | ((requestShortener: RequestShortener) => string))[];
4912
- getProvidedExports(module: Module): true | string[];
4913
- isExportProvided(module: Module, exportName: EntryItem): boolean;
5130
+ getProvidedExports(module: Module): null | true | string[];
5131
+ isExportProvided(module: Module, exportName: EntryItem): null | boolean;
4914
5132
  getExportsInfo(module: Module): ExportsInfo;
4915
5133
  getExportInfo(module: Module, exportName: string): ExportInfo;
4916
5134
  getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
4917
5135
  getUsedExports(
4918
5136
  module: Module,
4919
5137
  runtime: RuntimeSpec
4920
- ): boolean | SortableSet<string>;
5138
+ ): null | boolean | SortableSet<string>;
4921
5139
  getPreOrderIndex(module: Module): number;
4922
5140
  getPostOrderIndex(module: Module): number;
4923
5141
  setPreOrderIndex(module: Module, index: number): void;
@@ -4929,7 +5147,7 @@ declare class ModuleGraph {
4929
5147
  setDepthIfLower(module: Module, depth: number): boolean;
4930
5148
  isAsync(module: Module): boolean;
4931
5149
  setAsync(module: Module): void;
4932
- getMeta(thing?: any): any;
5150
+ getMeta(thing?: any): Object;
4933
5151
  static getModuleGraphForModule(
4934
5152
  module: Module,
4935
5153
  deprecateMessage: string,
@@ -4943,8 +5161,8 @@ declare class ModuleGraph {
4943
5161
  }
4944
5162
  declare class ModuleGraphConnection {
4945
5163
  constructor(
4946
- originModule: Module,
4947
- dependency: Dependency,
5164
+ originModule: undefined | Module,
5165
+ dependency: undefined | Dependency,
4948
5166
  module: Module,
4949
5167
  explanation?: string,
4950
5168
  weak?: boolean,
@@ -4953,9 +5171,9 @@ declare class ModuleGraphConnection {
4953
5171
  arg1: RuntimeSpec
4954
5172
  ) => ConnectionState
4955
5173
  );
4956
- originModule: Module;
4957
- resolvedOriginModule: Module;
4958
- dependency: Dependency;
5174
+ originModule?: Module;
5175
+ resolvedOriginModule?: Module;
5176
+ dependency?: Dependency;
4959
5177
  resolvedModule: Module;
4960
5178
  module: Module;
4961
5179
  weak: boolean;
@@ -5092,25 +5310,25 @@ declare abstract class ModuleProfile {
5092
5310
  additionalFactories: number;
5093
5311
  additionalIntegration: number;
5094
5312
  markFactoryStart(): void;
5095
- factoryStartTime: number;
5313
+ factoryStartTime?: number;
5096
5314
  markFactoryEnd(): void;
5097
- factoryEndTime: number;
5315
+ factoryEndTime?: number;
5098
5316
  markRestoringStart(): void;
5099
- restoringStartTime: number;
5317
+ restoringStartTime?: number;
5100
5318
  markRestoringEnd(): void;
5101
- restoringEndTime: number;
5319
+ restoringEndTime?: number;
5102
5320
  markIntegrationStart(): void;
5103
- integrationStartTime: number;
5321
+ integrationStartTime?: number;
5104
5322
  markIntegrationEnd(): void;
5105
- integrationEndTime: number;
5323
+ integrationEndTime?: number;
5106
5324
  markBuildingStart(): void;
5107
- buildingStartTime: number;
5325
+ buildingStartTime?: number;
5108
5326
  markBuildingEnd(): void;
5109
- buildingEndTime: number;
5327
+ buildingEndTime?: number;
5110
5328
  markStoringStart(): void;
5111
- storingStartTime: number;
5329
+ storingStartTime?: number;
5112
5330
  markStoringEnd(): void;
5113
- storingEndTime: number;
5331
+ storingEndTime?: number;
5114
5332
 
5115
5333
  /**
5116
5334
  * Merge this profile into another one
@@ -5136,7 +5354,7 @@ declare interface ModuleReferenceOptions {
5136
5354
  /**
5137
5355
  * if the position is ASI safe or unknown
5138
5356
  */
5139
- asiSafe: boolean;
5357
+ asiSafe?: boolean;
5140
5358
  }
5141
5359
  declare abstract class ModuleTemplate {
5142
5360
  type: string;
@@ -5153,7 +5371,7 @@ declare class MultiCompiler {
5153
5371
  constructor(compilers: Compiler[] | Record<string, Compiler>);
5154
5372
  hooks: Readonly<{
5155
5373
  done: SyncHook<[MultiStats]>;
5156
- invalid: MultiHook<SyncHook<[string, number]>>;
5374
+ invalid: MultiHook<SyncHook<[null | string, number]>>;
5157
5375
  run: MultiHook<AsyncSeriesHook<[Compiler]>>;
5158
5376
  watchClose: SyncHook<[]>;
5159
5377
  watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
@@ -5312,11 +5530,11 @@ type NodeEstreeIndex =
5312
5530
  | MethodDefinition
5313
5531
  | VariableDeclarator
5314
5532
  | Program
5533
+ | Super
5315
5534
  | SwitchCase
5316
5535
  | CatchClause
5317
5536
  | Property
5318
5537
  | AssignmentProperty
5319
- | Super
5320
5538
  | TemplateElement
5321
5539
  | SpreadElement
5322
5540
  | ObjectPattern
@@ -5402,7 +5620,7 @@ declare class NormalModule extends Module {
5402
5620
  /**
5403
5621
  * path + query of the matched resource (virtual)
5404
5622
  */
5405
- matchResource: string;
5623
+ matchResource?: string;
5406
5624
  /**
5407
5625
  * the parser used
5408
5626
  */
@@ -5414,7 +5632,7 @@ declare class NormalModule extends Module {
5414
5632
  /**
5415
5633
  * options used for resolving requests from this module
5416
5634
  */
5417
- resolveOptions: any;
5635
+ resolveOptions: Object;
5418
5636
  });
5419
5637
  request: string;
5420
5638
  userRequest: string;
@@ -5423,15 +5641,15 @@ declare class NormalModule extends Module {
5423
5641
  parser: Parser;
5424
5642
  generator: Generator;
5425
5643
  resource: string;
5426
- matchResource: string;
5644
+ matchResource?: string;
5427
5645
  loaders: LoaderItem[];
5428
- error: WebpackError;
5646
+ error?: WebpackError;
5429
5647
  createSourceForAsset(
5430
5648
  context: string,
5431
5649
  name: string,
5432
5650
  content: string,
5433
5651
  sourceMap?: any,
5434
- associatedObjectForCache?: any
5652
+ associatedObjectForCache?: Object
5435
5653
  ): Source;
5436
5654
  createLoaderContext(
5437
5655
  resolver: ResolverWithOptions,
@@ -5439,19 +5657,19 @@ declare class NormalModule extends Module {
5439
5657
  compilation: Compilation,
5440
5658
  fs: InputFileSystem
5441
5659
  ): any;
5442
- getCurrentLoader(loaderContext?: any, index?: any): LoaderItem;
5660
+ getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
5443
5661
  createSource(
5444
5662
  context: string,
5445
5663
  content: string | Buffer,
5446
5664
  sourceMap?: any,
5447
- associatedObjectForCache?: any
5665
+ associatedObjectForCache?: Object
5448
5666
  ): Source;
5449
5667
  doBuild(
5450
5668
  options: WebpackOptionsNormalized,
5451
5669
  compilation: Compilation,
5452
5670
  resolver: ResolverWithOptions,
5453
5671
  fs: InputFileSystem,
5454
- callback: (arg0: WebpackError) => void
5672
+ callback: (arg0?: WebpackError) => void
5455
5673
  ): void;
5456
5674
  markModuleAsErrored(error: WebpackError): void;
5457
5675
  applyNoParseRule(rule?: any, content?: any): any;
@@ -5462,8 +5680,8 @@ declare class NormalModule extends Module {
5462
5680
  static deserialize(context?: any): NormalModule;
5463
5681
  }
5464
5682
  declare interface NormalModuleCompilationHooks {
5465
- loader: SyncHook<[any, NormalModule]>;
5466
- beforeLoaders: SyncHook<[LoaderItem[], NormalModule, any]>;
5683
+ loader: SyncHook<[{}, NormalModule]>;
5684
+ beforeLoaders: SyncHook<[LoaderItem[], NormalModule, {}]>;
5467
5685
  readResourceForScheme: HookMap<
5468
5686
  AsyncSeriesBailHook<[string, NormalModule], string | Buffer>
5469
5687
  >;
@@ -5477,8 +5695,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
5477
5695
  factorize: AsyncSeriesBailHook<[ResolveData], any>;
5478
5696
  beforeResolve: AsyncSeriesBailHook<[ResolveData], any>;
5479
5697
  afterResolve: AsyncSeriesBailHook<[ResolveData], any>;
5480
- createModule: AsyncSeriesBailHook<[any, ResolveData], any>;
5481
- module: SyncWaterfallHook<[Module, any, ResolveData], any>;
5698
+ createModule: AsyncSeriesBailHook<[Object, ResolveData], any>;
5699
+ module: SyncWaterfallHook<[Module, Object, ResolveData], any>;
5482
5700
  createParser: HookMap<SyncBailHook<any, any>>;
5483
5701
  parser: HookMap<SyncHook<any>>;
5484
5702
  createGenerator: HookMap<SyncBailHook<any, any>>;
@@ -5490,8 +5708,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
5490
5708
  cachePredicate: Function;
5491
5709
  context: string;
5492
5710
  fs: InputFileSystem;
5493
- parserCache: Map<string, WeakMap<any, any>>;
5494
- generatorCache: Map<string, WeakMap<any, Generator>>;
5711
+ parserCache: Map<string, WeakMap<Object, any>>;
5712
+ generatorCache: Map<string, WeakMap<Object, Generator>>;
5495
5713
  resolveResource(
5496
5714
  contextInfo?: any,
5497
5715
  context?: any,
@@ -5510,7 +5728,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
5510
5728
  ): any;
5511
5729
  getParser(type?: any, parserOptions?: {}): any;
5512
5730
  createParser(type: string, parserOptions?: { [index: string]: any }): Parser;
5513
- getGenerator(type?: any, generatorOptions?: {}): Generator;
5731
+ getGenerator(type?: any, generatorOptions?: {}): undefined | Generator;
5514
5732
  createGenerator(type?: any, generatorOptions?: {}): any;
5515
5733
  getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
5516
5734
  }
@@ -5653,7 +5871,7 @@ declare interface Optimization {
5653
5871
  /**
5654
5872
  * Set process.env.NODE_ENV to a specific value.
5655
5873
  */
5656
- nodeEnv?: DevTool;
5874
+ nodeEnv?: string | false;
5657
5875
 
5658
5876
  /**
5659
5877
  * Generate records with relative paths to be able to move the context folder.
@@ -5683,7 +5901,16 @@ declare interface Optimization {
5683
5901
  /**
5684
5902
  * Create an additional chunk which contains only the webpack runtime and chunk hash maps.
5685
5903
  */
5686
- runtimeChunk?: OptimizationRuntimeChunk;
5904
+ runtimeChunk?:
5905
+ | boolean
5906
+ | "single"
5907
+ | "multiple"
5908
+ | {
5909
+ /**
5910
+ * The name or name factory for the runtime chunks.
5911
+ */
5912
+ name?: string | Function;
5913
+ };
5687
5914
 
5688
5915
  /**
5689
5916
  * Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
@@ -5700,16 +5927,6 @@ declare interface Optimization {
5700
5927
  */
5701
5928
  usedExports?: boolean | "global";
5702
5929
  }
5703
- type OptimizationRuntimeChunk =
5704
- | boolean
5705
- | "single"
5706
- | "multiple"
5707
- | {
5708
- /**
5709
- * The name or name factory for the runtime chunks.
5710
- */
5711
- name?: DevtoolFallbackModuleFilenameTemplate;
5712
- };
5713
5930
 
5714
5931
  /**
5715
5932
  * Options object for describing behavior of a cache group selecting modules that should be cached together.
@@ -5733,7 +5950,7 @@ declare interface OptimizationSplitChunksCacheGroup {
5733
5950
  /**
5734
5951
  * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
5735
5952
  */
5736
- enforceSizeThreshold?: OptimizationSplitChunksSizes;
5953
+ enforceSizeThreshold?: number | { [index: string]: number };
5737
5954
 
5738
5955
  /**
5739
5956
  * Sets the template for the filename for created chunks.
@@ -5753,7 +5970,7 @@ declare interface OptimizationSplitChunksCacheGroup {
5753
5970
  /**
5754
5971
  * Maximal size hint for the on-demand chunks.
5755
5972
  */
5756
- maxAsyncSize?: OptimizationSplitChunksSizes;
5973
+ maxAsyncSize?: number | { [index: string]: number };
5757
5974
 
5758
5975
  /**
5759
5976
  * Maximum number of initial chunks which are accepted for an entry point.
@@ -5763,12 +5980,12 @@ declare interface OptimizationSplitChunksCacheGroup {
5763
5980
  /**
5764
5981
  * Maximal size hint for the initial chunks.
5765
5982
  */
5766
- maxInitialSize?: OptimizationSplitChunksSizes;
5983
+ maxInitialSize?: number | { [index: string]: number };
5767
5984
 
5768
5985
  /**
5769
5986
  * Maximal size hint for the created chunks.
5770
5987
  */
5771
- maxSize?: OptimizationSplitChunksSizes;
5988
+ maxSize?: number | { [index: string]: number };
5772
5989
 
5773
5990
  /**
5774
5991
  * Minimum number of times a module has to be duplicated until it's considered for splitting.
@@ -5778,12 +5995,12 @@ declare interface OptimizationSplitChunksCacheGroup {
5778
5995
  /**
5779
5996
  * Minimal size for the chunks the stay after moving the modules to a new chunk.
5780
5997
  */
5781
- minRemainingSize?: OptimizationSplitChunksSizes;
5998
+ minRemainingSize?: number | { [index: string]: number };
5782
5999
 
5783
6000
  /**
5784
6001
  * Minimal size for the created chunk.
5785
6002
  */
5786
- minSize?: OptimizationSplitChunksSizes;
6003
+ minSize?: number | { [index: string]: number };
5787
6004
 
5788
6005
  /**
5789
6006
  * Give chunks for this cache group a name (chunks with equal name are merged).
@@ -5850,7 +6067,7 @@ declare interface OptimizationSplitChunksOptions {
5850
6067
  /**
5851
6068
  * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
5852
6069
  */
5853
- enforceSizeThreshold?: OptimizationSplitChunksSizes;
6070
+ enforceSizeThreshold?: number | { [index: string]: number };
5854
6071
 
5855
6072
  /**
5856
6073
  * Options for modules not selected by any other cache group.
@@ -5863,19 +6080,19 @@ declare interface OptimizationSplitChunksOptions {
5863
6080
  /**
5864
6081
  * Maximal size hint for the on-demand chunks.
5865
6082
  */
5866
- maxAsyncSize?: OptimizationSplitChunksSizes;
6083
+ maxAsyncSize?: number | { [index: string]: number };
5867
6084
  /**
5868
6085
  * Maximal size hint for the initial chunks.
5869
6086
  */
5870
- maxInitialSize?: OptimizationSplitChunksSizes;
6087
+ maxInitialSize?: number | { [index: string]: number };
5871
6088
  /**
5872
6089
  * Maximal size hint for the created chunks.
5873
6090
  */
5874
- maxSize?: OptimizationSplitChunksSizes;
6091
+ maxSize?: number | { [index: string]: number };
5875
6092
  /**
5876
6093
  * Minimal size for the created chunk.
5877
6094
  */
5878
- minSize?: OptimizationSplitChunksSizes;
6095
+ minSize?: number | { [index: string]: number };
5879
6096
  };
5880
6097
 
5881
6098
  /**
@@ -5896,7 +6113,7 @@ declare interface OptimizationSplitChunksOptions {
5896
6113
  /**
5897
6114
  * Maximal size hint for the on-demand chunks.
5898
6115
  */
5899
- maxAsyncSize?: OptimizationSplitChunksSizes;
6116
+ maxAsyncSize?: number | { [index: string]: number };
5900
6117
 
5901
6118
  /**
5902
6119
  * Maximum number of initial chunks which are accepted for an entry point.
@@ -5906,12 +6123,12 @@ declare interface OptimizationSplitChunksOptions {
5906
6123
  /**
5907
6124
  * Maximal size hint for the initial chunks.
5908
6125
  */
5909
- maxInitialSize?: OptimizationSplitChunksSizes;
6126
+ maxInitialSize?: number | { [index: string]: number };
5910
6127
 
5911
6128
  /**
5912
6129
  * Maximal size hint for the created chunks.
5913
6130
  */
5914
- maxSize?: OptimizationSplitChunksSizes;
6131
+ maxSize?: number | { [index: string]: number };
5915
6132
 
5916
6133
  /**
5917
6134
  * Minimum number of times a module has to be duplicated until it's considered for splitting.
@@ -5921,12 +6138,12 @@ declare interface OptimizationSplitChunksOptions {
5921
6138
  /**
5922
6139
  * Minimal size for the chunks the stay after moving the modules to a new chunk.
5923
6140
  */
5924
- minRemainingSize?: OptimizationSplitChunksSizes;
6141
+ minRemainingSize?: number | { [index: string]: number };
5925
6142
 
5926
6143
  /**
5927
6144
  * Minimal size for the created chunks.
5928
6145
  */
5929
- minSize?: OptimizationSplitChunksSizes;
6146
+ minSize?: number | { [index: string]: number };
5930
6147
 
5931
6148
  /**
5932
6149
  * Give chunks created a name (chunks with equal name are merged).
@@ -5938,7 +6155,6 @@ declare interface OptimizationSplitChunksOptions {
5938
6155
  */
5939
6156
  usedExports?: boolean;
5940
6157
  }
5941
- type OptimizationSplitChunksSizes = number | { [index: string]: number };
5942
6158
  declare abstract class OptionsApply {
5943
6159
  process(options?: any, compiler?: any): void;
5944
6160
  }
@@ -5959,12 +6175,14 @@ declare interface Output {
5959
6175
  /**
5960
6176
  * The filename of asset modules as relative path inside the `output.path` directory.
5961
6177
  */
5962
- assetModuleFilename?: AssetModuleFilename;
6178
+ assetModuleFilename?:
6179
+ | string
6180
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
5963
6181
 
5964
6182
  /**
5965
6183
  * Add a comment in the UMD wrapper.
5966
6184
  */
5967
- auxiliaryComment?: AuxiliaryComment;
6185
+ auxiliaryComment?: string | LibraryCustomUmdCommentObject;
5968
6186
 
5969
6187
  /**
5970
6188
  * Add charset attribute for script tag.
@@ -5974,12 +6192,14 @@ declare interface Output {
5974
6192
  /**
5975
6193
  * The filename of non-initial chunks as relative path inside the `output.path` directory.
5976
6194
  */
5977
- chunkFilename?: ChunkFilename;
6195
+ chunkFilename?:
6196
+ | string
6197
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
5978
6198
 
5979
6199
  /**
5980
6200
  * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).
5981
6201
  */
5982
- chunkFormat?: DevTool;
6202
+ chunkFormat?: string | false;
5983
6203
 
5984
6204
  /**
5985
6205
  * Number of milliseconds before chunk request expires.
@@ -5989,7 +6209,7 @@ declare interface Output {
5989
6209
  /**
5990
6210
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
5991
6211
  */
5992
- chunkLoading?: DevTool;
6212
+ chunkLoading?: string | false;
5993
6213
 
5994
6214
  /**
5995
6215
  * The global variable used by webpack for loading of chunks.
@@ -6004,17 +6224,17 @@ declare interface Output {
6004
6224
  /**
6005
6225
  * This option enables cross-origin loading of chunks.
6006
6226
  */
6007
- crossOriginLoading?: CrossOriginLoading;
6227
+ crossOriginLoading?: false | "anonymous" | "use-credentials";
6008
6228
 
6009
6229
  /**
6010
6230
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
6011
6231
  */
6012
- devtoolFallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
6232
+ devtoolFallbackModuleFilenameTemplate?: string | Function;
6013
6233
 
6014
6234
  /**
6015
6235
  * Filename template string of function for the sources array in a generated SourceMap.
6016
6236
  */
6017
- devtoolModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
6237
+ devtoolModuleFilenameTemplate?: string | Function;
6018
6238
 
6019
6239
  /**
6020
6240
  * Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
@@ -6044,7 +6264,7 @@ declare interface Output {
6044
6264
  /**
6045
6265
  * Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
6046
6266
  */
6047
- filename?: Filename;
6267
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6048
6268
 
6049
6269
  /**
6050
6270
  * An expression which is used to address the global object/scope in runtime code.
@@ -6064,7 +6284,7 @@ declare interface Output {
6064
6284
  /**
6065
6285
  * Algorithm used for generation the hash (see node.js crypto package).
6066
6286
  */
6067
- hashFunction?: HashFunction;
6287
+ hashFunction?: string | typeof Hash;
6068
6288
 
6069
6289
  /**
6070
6290
  * Any string which is added to the hash to salt it.
@@ -6104,12 +6324,12 @@ declare interface Output {
6104
6324
  /**
6105
6325
  * Make the output files a library, exporting the exports of the entry point.
6106
6326
  */
6107
- library?: Library;
6327
+ library?: string | string[] | LibraryOptions | LibraryCustomUmdObject;
6108
6328
 
6109
6329
  /**
6110
6330
  * Specify which export should be exposed as library.
6111
6331
  */
6112
- libraryExport?: EntryItem;
6332
+ libraryExport?: string | string[];
6113
6333
 
6114
6334
  /**
6115
6335
  * Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
@@ -6129,17 +6349,17 @@ declare interface Output {
6129
6349
  /**
6130
6350
  * Include comments with information about the modules.
6131
6351
  */
6132
- pathinfo?: Pathinfo;
6352
+ pathinfo?: boolean | "verbose";
6133
6353
 
6134
6354
  /**
6135
6355
  * The `publicPath` specifies the public URL address of the output files when referenced in a browser.
6136
6356
  */
6137
- publicPath?: PublicPath;
6357
+ publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6138
6358
 
6139
6359
  /**
6140
6360
  * This option enables loading async chunks via a custom script type, such as script type="module".
6141
6361
  */
6142
- scriptType?: ScriptType;
6362
+ scriptType?: false | "module" | "text/javascript";
6143
6363
 
6144
6364
  /**
6145
6365
  * The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.
@@ -6169,7 +6389,7 @@ declare interface Output {
6169
6389
  /**
6170
6390
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
6171
6391
  */
6172
- wasmLoading?: DevTool;
6392
+ wasmLoading?: string | false;
6173
6393
 
6174
6394
  /**
6175
6395
  * The filename of WebAssembly modules as relative path inside the `output.path` directory.
@@ -6179,27 +6399,27 @@ declare interface Output {
6179
6399
  /**
6180
6400
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
6181
6401
  */
6182
- workerChunkLoading?: DevTool;
6402
+ workerChunkLoading?: string | false;
6183
6403
 
6184
6404
  /**
6185
6405
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
6186
6406
  */
6187
- workerWasmLoading?: DevTool;
6407
+ workerWasmLoading?: string | false;
6188
6408
  }
6189
6409
  declare interface OutputFileSystem {
6190
6410
  writeFile: (
6191
6411
  arg0: string,
6192
6412
  arg1: string | Buffer,
6193
- arg2: (arg0: NodeJS.ErrnoException) => void
6413
+ arg2: (arg0?: NodeJS.ErrnoException) => void
6194
6414
  ) => void;
6195
- mkdir: (arg0: string, arg1: (arg0: NodeJS.ErrnoException) => void) => void;
6415
+ mkdir: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
6196
6416
  stat: (
6197
6417
  arg0: string,
6198
- arg1: (arg0: NodeJS.ErrnoException, arg1: FsStats) => void
6418
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: FsStats) => void
6199
6419
  ) => void;
6200
6420
  readFile: (
6201
6421
  arg0: string,
6202
- arg1: (arg0: NodeJS.ErrnoException, arg1: Buffer) => void
6422
+ arg1: (arg0?: NodeJS.ErrnoException, arg1?: Buffer) => void
6203
6423
  ) => void;
6204
6424
  join?: (arg0: string, arg1: string) => string;
6205
6425
  relative?: (arg0: string, arg1: string) => string;
@@ -6213,7 +6433,9 @@ declare interface OutputNormalized {
6213
6433
  /**
6214
6434
  * The filename of asset modules as relative path inside the `output.path` directory.
6215
6435
  */
6216
- assetModuleFilename?: AssetModuleFilename;
6436
+ assetModuleFilename?:
6437
+ | string
6438
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6217
6439
 
6218
6440
  /**
6219
6441
  * Add charset attribute for script tag.
@@ -6223,12 +6445,14 @@ declare interface OutputNormalized {
6223
6445
  /**
6224
6446
  * The filename of non-initial chunks as relative path inside the `output.path` directory.
6225
6447
  */
6226
- chunkFilename?: ChunkFilename;
6448
+ chunkFilename?:
6449
+ | string
6450
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6227
6451
 
6228
6452
  /**
6229
6453
  * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).
6230
6454
  */
6231
- chunkFormat?: DevTool;
6455
+ chunkFormat?: string | false;
6232
6456
 
6233
6457
  /**
6234
6458
  * Number of milliseconds before chunk request expires.
@@ -6238,7 +6462,7 @@ declare interface OutputNormalized {
6238
6462
  /**
6239
6463
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
6240
6464
  */
6241
- chunkLoading?: DevTool;
6465
+ chunkLoading?: string | false;
6242
6466
 
6243
6467
  /**
6244
6468
  * The global variable used by webpack for loading of chunks.
@@ -6253,17 +6477,17 @@ declare interface OutputNormalized {
6253
6477
  /**
6254
6478
  * This option enables cross-origin loading of chunks.
6255
6479
  */
6256
- crossOriginLoading?: CrossOriginLoading;
6480
+ crossOriginLoading?: false | "anonymous" | "use-credentials";
6257
6481
 
6258
6482
  /**
6259
6483
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
6260
6484
  */
6261
- devtoolFallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
6485
+ devtoolFallbackModuleFilenameTemplate?: string | Function;
6262
6486
 
6263
6487
  /**
6264
6488
  * Filename template string of function for the sources array in a generated SourceMap.
6265
6489
  */
6266
- devtoolModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
6490
+ devtoolModuleFilenameTemplate?: string | Function;
6267
6491
 
6268
6492
  /**
6269
6493
  * Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
@@ -6293,7 +6517,7 @@ declare interface OutputNormalized {
6293
6517
  /**
6294
6518
  * Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
6295
6519
  */
6296
- filename?: Filename;
6520
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6297
6521
 
6298
6522
  /**
6299
6523
  * An expression which is used to address the global object/scope in runtime code.
@@ -6313,7 +6537,7 @@ declare interface OutputNormalized {
6313
6537
  /**
6314
6538
  * Algorithm used for generation the hash (see node.js crypto package).
6315
6539
  */
6316
- hashFunction?: HashFunction;
6540
+ hashFunction?: string | typeof Hash;
6317
6541
 
6318
6542
  /**
6319
6543
  * Any string which is added to the hash to salt it.
@@ -6368,17 +6592,17 @@ declare interface OutputNormalized {
6368
6592
  /**
6369
6593
  * Include comments with information about the modules.
6370
6594
  */
6371
- pathinfo?: Pathinfo;
6595
+ pathinfo?: boolean | "verbose";
6372
6596
 
6373
6597
  /**
6374
6598
  * The `publicPath` specifies the public URL address of the output files when referenced in a browser.
6375
6599
  */
6376
- publicPath?: PublicPath;
6600
+ publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6377
6601
 
6378
6602
  /**
6379
6603
  * This option enables loading async chunks via a custom script type, such as script type="module".
6380
6604
  */
6381
- scriptType?: ScriptType;
6605
+ scriptType?: false | "module" | "text/javascript";
6382
6606
 
6383
6607
  /**
6384
6608
  * The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.
@@ -6403,7 +6627,7 @@ declare interface OutputNormalized {
6403
6627
  /**
6404
6628
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
6405
6629
  */
6406
- wasmLoading?: DevTool;
6630
+ wasmLoading?: string | false;
6407
6631
 
6408
6632
  /**
6409
6633
  * The filename of WebAssembly modules as relative path inside the `output.path` directory.
@@ -6413,12 +6637,12 @@ declare interface OutputNormalized {
6413
6637
  /**
6414
6638
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
6415
6639
  */
6416
- workerChunkLoading?: DevTool;
6640
+ workerChunkLoading?: string | false;
6417
6641
 
6418
6642
  /**
6419
6643
  * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
6420
6644
  */
6421
- workerWasmLoading?: DevTool;
6645
+ workerWasmLoading?: string | false;
6422
6646
  }
6423
6647
  declare interface ParameterizedComparator<TArg, T> {
6424
6648
  (arg0: TArg): Comparator<T>;
@@ -6462,8 +6686,6 @@ declare interface PathData {
6462
6686
  noChunkHash?: boolean;
6463
6687
  url?: string;
6464
6688
  }
6465
- type Pathinfo = boolean | "verbose";
6466
- type Performance = false | PerformanceOptions;
6467
6689
 
6468
6690
  /**
6469
6691
  * Configuration object for web performance recommendations.
@@ -6558,15 +6780,15 @@ declare interface ProfilingPluginOptions {
6558
6780
  }
6559
6781
  declare class ProgressPlugin {
6560
6782
  constructor(options: ProgressPluginArgument);
6561
- profile: boolean;
6562
- handler: (percentage: number, msg: string, ...args: string[]) => void;
6563
- modulesCount: number;
6564
- dependenciesCount: number;
6565
- showEntries: boolean;
6566
- showModules: boolean;
6567
- showDependencies: boolean;
6568
- showActiveModules: boolean;
6569
- percentBy: "modules" | "dependencies" | "entries";
6783
+ profile?: null | boolean;
6784
+ handler?: (percentage: number, msg: string, ...args: string[]) => void;
6785
+ modulesCount?: number;
6786
+ dependenciesCount?: number;
6787
+ showEntries?: boolean;
6788
+ showModules?: boolean;
6789
+ showDependencies?: boolean;
6790
+ showActiveModules?: boolean;
6791
+ percentBy?: null | "dependencies" | "modules" | "entries";
6570
6792
  apply(compiler: Compiler | MultiCompiler): void;
6571
6793
  static getReporter(
6572
6794
  compiler: Compiler
@@ -6627,12 +6849,12 @@ declare interface ProgressPluginOptions {
6627
6849
  /**
6628
6850
  * Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
6629
6851
  */
6630
- percentBy?: "modules" | "dependencies" | "entries";
6852
+ percentBy?: null | "dependencies" | "modules" | "entries";
6631
6853
 
6632
6854
  /**
6633
6855
  * Collect profile data for progress steps. Default: false.
6634
6856
  */
6635
- profile?: boolean;
6857
+ profile?: null | boolean;
6636
6858
  }
6637
6859
  declare class ProvidePlugin {
6638
6860
  constructor(definitions: Record<string, EntryItem>);
@@ -6686,7 +6908,7 @@ declare interface ProvidesConfig {
6686
6908
  /**
6687
6909
  * Version of the provided module. Will replace lower matching versions, but not higher.
6688
6910
  */
6689
- version?: DevTool;
6911
+ version?: string | false;
6690
6912
  }
6691
6913
 
6692
6914
  /**
@@ -6695,9 +6917,6 @@ declare interface ProvidesConfig {
6695
6917
  declare interface ProvidesObject {
6696
6918
  [index: string]: string | ProvidesConfig;
6697
6919
  }
6698
- type PublicPath =
6699
- | string
6700
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6701
6920
  declare interface RawChunkGroupOptions {
6702
6921
  preloadOrder?: number;
6703
6922
  prefetchOrder?: number;
@@ -6865,7 +7084,7 @@ declare interface RenderManifestEntryStatic {
6865
7084
  }
6866
7085
  declare interface RenderManifestEntryTemplated {
6867
7086
  render: () => Source;
6868
- filenameTemplate: string | ((arg0: PathData, arg1: AssetInfo) => string);
7087
+ filenameTemplate: string | ((arg0: PathData, arg1?: AssetInfo) => string);
6869
7088
  pathOptions?: PathData;
6870
7089
  info?: AssetInfo;
6871
7090
  identifier: string;
@@ -6903,24 +7122,8 @@ declare class ReplaceSource extends Source {
6903
7122
  }
6904
7123
  declare abstract class RequestShortener {
6905
7124
  contextify: (arg0: string) => string;
6906
- shorten(request: string): string;
7125
+ shorten(request?: null | string): undefined | null | string;
6907
7126
  }
6908
- type ResolveAlias =
6909
- | {
6910
- /**
6911
- * New request.
6912
- */
6913
- alias: Target;
6914
- /**
6915
- * Request to be redirected.
6916
- */
6917
- name: string;
6918
- /**
6919
- * Redirect only exact matching request.
6920
- */
6921
- onlyModule?: boolean;
6922
- }[]
6923
- | { [index: string]: Target };
6924
7127
  declare interface ResolveBuildDependenciesResult {
6925
7128
  /**
6926
7129
  * list of files
@@ -6989,11 +7192,11 @@ declare interface ResolveContext {
6989
7192
  }
6990
7193
  declare interface ResolveData {
6991
7194
  contextInfo: ModuleFactoryCreateDataContextInfo;
6992
- resolveOptions: ResolveOptionsWebpackOptions;
7195
+ resolveOptions?: ResolveOptionsWebpackOptions;
6993
7196
  context: string;
6994
7197
  request: string;
6995
7198
  dependencies: ModuleDependency[];
6996
- createData: any;
7199
+ createData: Object;
6997
7200
  fileDependencies: LazySet<string>;
6998
7201
  missingDependencies: LazySet<string>;
6999
7202
  contextDependencies: LazySet<string>;
@@ -7056,7 +7259,7 @@ declare interface ResolveOptionsTypes {
7056
7259
  | { apply: (arg0: Resolver) => void }
7057
7260
  | ((this: Resolver, arg1: Resolver) => void)
7058
7261
  )[];
7059
- pnpApi: PnpApiImpl;
7262
+ pnpApi: null | PnpApiImpl;
7060
7263
  roots: Set<string>;
7061
7264
  fullySpecified: boolean;
7062
7265
  resolveToContext: boolean;
@@ -7071,7 +7274,22 @@ declare interface ResolveOptionsWebpackOptions {
7071
7274
  /**
7072
7275
  * Redirect module requests.
7073
7276
  */
7074
- alias?: ResolveAlias;
7277
+ alias?:
7278
+ | {
7279
+ /**
7280
+ * New request.
7281
+ */
7282
+ alias: Target;
7283
+ /**
7284
+ * Request to be redirected.
7285
+ */
7286
+ name: string;
7287
+ /**
7288
+ * Redirect only exact matching request.
7289
+ */
7290
+ onlyModule?: boolean;
7291
+ }[]
7292
+ | { [index: string]: Target };
7075
7293
 
7076
7294
  /**
7077
7295
  * Fields in the description file (usually package.json) which are used to redirect requests inside the module.
@@ -7126,7 +7344,22 @@ declare interface ResolveOptionsWebpackOptions {
7126
7344
  /**
7127
7345
  * Redirect module requests when normal resolving fails.
7128
7346
  */
7129
- fallback?: ResolveAlias;
7347
+ fallback?:
7348
+ | {
7349
+ /**
7350
+ * New request.
7351
+ */
7352
+ alias: Target;
7353
+ /**
7354
+ * Request to be redirected.
7355
+ */
7356
+ name: string;
7357
+ /**
7358
+ * Redirect only exact matching request.
7359
+ */
7360
+ onlyModule?: boolean;
7361
+ }[]
7362
+ | { [index: string]: Target };
7130
7363
 
7131
7364
  /**
7132
7365
  * Filesystem for the resolver.
@@ -7206,7 +7439,22 @@ declare interface ResolveOptionsWithDependencyType {
7206
7439
  /**
7207
7440
  * Redirect module requests.
7208
7441
  */
7209
- alias?: ResolveAlias;
7442
+ alias?:
7443
+ | {
7444
+ /**
7445
+ * New request.
7446
+ */
7447
+ alias: Target;
7448
+ /**
7449
+ * Request to be redirected.
7450
+ */
7451
+ name: string;
7452
+ /**
7453
+ * Redirect only exact matching request.
7454
+ */
7455
+ onlyModule?: boolean;
7456
+ }[]
7457
+ | { [index: string]: Target };
7210
7458
 
7211
7459
  /**
7212
7460
  * Fields in the description file (usually package.json) which are used to redirect requests inside the module.
@@ -7261,7 +7509,22 @@ declare interface ResolveOptionsWithDependencyType {
7261
7509
  /**
7262
7510
  * Redirect module requests when normal resolving fails.
7263
7511
  */
7264
- fallback?: ResolveAlias;
7512
+ fallback?:
7513
+ | {
7514
+ /**
7515
+ * New request.
7516
+ */
7517
+ alias: Target;
7518
+ /**
7519
+ * Request to be redirected.
7520
+ */
7521
+ name: string;
7522
+ /**
7523
+ * Redirect only exact matching request.
7524
+ */
7525
+ onlyModule?: boolean;
7526
+ }[]
7527
+ | { [index: string]: Target };
7265
7528
 
7266
7529
  /**
7267
7530
  * Filesystem for the resolver.
@@ -7354,34 +7617,53 @@ declare abstract class Resolver {
7354
7617
  hooks: {
7355
7618
  resolveStep: SyncHook<
7356
7619
  [
7357
- AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>,
7620
+ AsyncSeriesBailHook<
7621
+ [ResolveRequest, ResolveContext],
7622
+ null | ResolveRequest
7623
+ >,
7358
7624
  ResolveRequest
7359
7625
  ]
7360
7626
  >;
7361
7627
  noResolve: SyncHook<[ResolveRequest, Error]>;
7362
7628
  resolve: AsyncSeriesBailHook<
7363
7629
  [ResolveRequest, ResolveContext],
7364
- ResolveRequest
7630
+ null | ResolveRequest
7365
7631
  >;
7366
7632
  result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
7367
7633
  };
7368
7634
  ensureHook(
7369
7635
  name:
7370
7636
  | string
7371
- | AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>
7372
- ): AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>;
7637
+ | AsyncSeriesBailHook<
7638
+ [ResolveRequest, ResolveContext],
7639
+ null | ResolveRequest
7640
+ >
7641
+ ): AsyncSeriesBailHook<
7642
+ [ResolveRequest, ResolveContext],
7643
+ null | ResolveRequest
7644
+ >;
7373
7645
  getHook(
7374
7646
  name:
7375
7647
  | string
7376
- | AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>
7377
- ): AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>;
7648
+ | AsyncSeriesBailHook<
7649
+ [ResolveRequest, ResolveContext],
7650
+ null | ResolveRequest
7651
+ >
7652
+ ): AsyncSeriesBailHook<
7653
+ [ResolveRequest, ResolveContext],
7654
+ null | ResolveRequest
7655
+ >;
7378
7656
  resolveSync(context: any, path: string, request: string): DevTool;
7379
7657
  resolve(
7380
7658
  context: any,
7381
7659
  path: string,
7382
7660
  request: string,
7383
7661
  resolveContext: ResolveContext,
7384
- callback: (arg0: Error, arg1?: DevTool, arg2?: ResolveRequest) => void
7662
+ callback: (
7663
+ arg0: null | Error,
7664
+ arg1?: string | false,
7665
+ arg2?: ResolveRequest
7666
+ ) => void
7385
7667
  ): void;
7386
7668
  doResolve(
7387
7669
  hook?: any,
@@ -7398,7 +7680,7 @@ declare abstract class Resolver {
7398
7680
  normalize(path?: any): string;
7399
7681
  }
7400
7682
  declare interface ResolverCache {
7401
- direct: WeakMap<any, ResolverWithOptions>;
7683
+ direct: WeakMap<Object, ResolverWithOptions>;
7402
7684
  stringified: Map<string, ResolverWithOptions>;
7403
7685
  }
7404
7686
  declare abstract class ResolverFactory {
@@ -7434,7 +7716,7 @@ declare interface RuleSet {
7434
7716
  /**
7435
7717
  * execute the rule set
7436
7718
  */
7437
- exec: (arg0?: any) => Effect[];
7719
+ exec: (arg0: {}) => Effect[];
7438
7720
  }
7439
7721
  type RuleSetCondition =
7440
7722
  | string
@@ -7474,7 +7756,6 @@ type RuleSetConditionAbsolute =
7474
7756
  }
7475
7757
  | ((value: string) => boolean)
7476
7758
  | RuleSetConditionAbsolute[];
7477
- type RuleSetLoaderOptions = string | { [index: string]: any };
7478
7759
 
7479
7760
  /**
7480
7761
  * A rule description with conditions and effects for modules.
@@ -7483,12 +7764,48 @@ declare interface RuleSetRule {
7483
7764
  /**
7484
7765
  * Match the child compiler name.
7485
7766
  */
7486
- compiler?: RuleSetCondition;
7767
+ compiler?:
7768
+ | string
7769
+ | RegExp
7770
+ | {
7771
+ /**
7772
+ * Logical AND.
7773
+ */
7774
+ and?: RuleSetCondition[];
7775
+ /**
7776
+ * Logical NOT.
7777
+ */
7778
+ not?: RuleSetCondition[];
7779
+ /**
7780
+ * Logical OR.
7781
+ */
7782
+ or?: RuleSetCondition[];
7783
+ }
7784
+ | ((value: string) => boolean)
7785
+ | RuleSetCondition[];
7487
7786
 
7488
7787
  /**
7489
7788
  * Match dependency type.
7490
7789
  */
7491
- dependency?: RuleSetCondition;
7790
+ dependency?:
7791
+ | string
7792
+ | RegExp
7793
+ | {
7794
+ /**
7795
+ * Logical AND.
7796
+ */
7797
+ and?: RuleSetCondition[];
7798
+ /**
7799
+ * Logical NOT.
7800
+ */
7801
+ not?: RuleSetCondition[];
7802
+ /**
7803
+ * Logical OR.
7804
+ */
7805
+ or?: RuleSetCondition[];
7806
+ }
7807
+ | ((value: string) => boolean)
7808
+ | RuleSetCondition[];
7492
7809
 
7493
7810
  /**
7494
7811
  * Match values of properties in the description file (usually package.json).
@@ -7503,7 +7820,25 @@ declare interface RuleSetRule {
7503
7820
  /**
7504
7821
  * Shortcut for resource.exclude.
7505
7822
  */
7506
- exclude?: RuleSetConditionAbsolute;
7823
+ exclude?:
7824
+ | string
7825
+ | RegExp
7826
+ | {
7827
+ /**
7828
+ * Logical AND.
7829
+ */
7830
+ and?: RuleSetConditionAbsolute[];
7831
+ /**
7832
+ * Logical NOT.
7833
+ */
7834
+ not?: RuleSetConditionAbsolute[];
7835
+ /**
7836
+ * Logical OR.
7837
+ */
7838
+ or?: RuleSetConditionAbsolute[];
7839
+ }
7840
+ | ((value: string) => boolean)
7841
+ | RuleSetConditionAbsolute[];
7507
7842
 
7508
7843
  /**
7509
7844
  * The options for the module generator.
@@ -7513,12 +7848,48 @@ declare interface RuleSetRule {
7513
7848
  /**
7514
7849
  * Shortcut for resource.include.
7515
7850
  */
7516
- include?: RuleSetConditionAbsolute;
7851
+ include?:
7852
+ | string
7853
+ | RegExp
7854
+ | {
7855
+ /**
7856
+ * Logical AND.
7857
+ */
7858
+ and?: RuleSetConditionAbsolute[];
7859
+ /**
7860
+ * Logical NOT.
7861
+ */
7862
+ not?: RuleSetConditionAbsolute[];
7863
+ /**
7864
+ * Logical OR.
7865
+ */
7866
+ or?: RuleSetConditionAbsolute[];
7867
+ }
7868
+ | ((value: string) => boolean)
7869
+ | RuleSetConditionAbsolute[];
7517
7870
 
7518
7871
  /**
7519
7872
  * Match the issuer of the module (The module pointing to this module).
7520
7873
  */
7521
- issuer?: RuleSetConditionAbsolute;
7874
+ issuer?:
7875
+ | string
7876
+ | RegExp
7877
+ | {
7878
+ /**
7879
+ * Logical AND.
7880
+ */
7881
+ and?: RuleSetConditionAbsolute[];
7882
+ /**
7883
+ * Logical NOT.
7884
+ */
7885
+ not?: RuleSetConditionAbsolute[];
7886
+ /**
7887
+ * Logical OR.
7888
+ */
7889
+ or?: RuleSetConditionAbsolute[];
7890
+ }
7891
+ | ((value: string) => boolean)
7892
+ | RuleSetConditionAbsolute[];
7522
7893
 
7523
7894
  /**
7524
7895
  * Shortcut for use.loader.
@@ -7528,7 +7899,25 @@ declare interface RuleSetRule {
7528
7899
  /**
7529
7900
  * Match module mimetype when load from Data URI.
7530
7901
  */
7531
- mimetype?: RuleSetCondition;
7902
+ mimetype?:
7903
+ | string
7904
+ | RegExp
7905
+ | {
7906
+ /**
7907
+ * Logical AND.
7908
+ */
7909
+ and?: RuleSetCondition[];
7910
+ /**
7911
+ * Logical NOT.
7912
+ */
7913
+ not?: RuleSetCondition[];
7914
+ /**
7915
+ * Logical OR.
7916
+ */
7917
+ or?: RuleSetCondition[];
7918
+ }
7919
+ | ((value: string) => boolean)
7920
+ | RuleSetCondition[];
7532
7921
 
7533
7922
  /**
7534
7923
  * Only execute the first matching rule in this array.
@@ -7538,7 +7927,7 @@ declare interface RuleSetRule {
7538
7927
  /**
7539
7928
  * Shortcut for use.options.
7540
7929
  */
7541
- options?: RuleSetLoaderOptions;
7930
+ options?: string | { [index: string]: any };
7542
7931
 
7543
7932
  /**
7544
7933
  * Options for parsing.
@@ -7548,7 +7937,25 @@ declare interface RuleSetRule {
7548
7937
  /**
7549
7938
  * Match the real resource path of the module.
7550
7939
  */
7551
- realResource?: RuleSetConditionAbsolute;
7940
+ realResource?:
7941
+ | string
7942
+ | RegExp
7943
+ | {
7944
+ /**
7945
+ * Logical AND.
7946
+ */
7947
+ and?: RuleSetConditionAbsolute[];
7948
+ /**
7949
+ * Logical NOT.
7950
+ */
7951
+ not?: RuleSetConditionAbsolute[];
7952
+ /**
7953
+ * Logical OR.
7954
+ */
7955
+ or?: RuleSetConditionAbsolute[];
7956
+ }
7957
+ | ((value: string) => boolean)
7958
+ | RuleSetConditionAbsolute[];
7552
7959
 
7553
7960
  /**
7554
7961
  * Options for the resolver.
@@ -7558,17 +7965,71 @@ declare interface RuleSetRule {
7558
7965
  /**
7559
7966
  * Match the resource path of the module.
7560
7967
  */
7561
- resource?: RuleSetConditionAbsolute;
7968
+ resource?:
7969
+ | string
7970
+ | RegExp
7971
+ | {
7972
+ /**
7973
+ * Logical AND.
7974
+ */
7975
+ and?: RuleSetConditionAbsolute[];
7976
+ /**
7977
+ * Logical NOT.
7978
+ */
7979
+ not?: RuleSetConditionAbsolute[];
7980
+ /**
7981
+ * Logical OR.
7982
+ */
7983
+ or?: RuleSetConditionAbsolute[];
7984
+ }
7985
+ | ((value: string) => boolean)
7986
+ | RuleSetConditionAbsolute[];
7562
7987
 
7563
7988
  /**
7564
7989
  * Match the resource fragment of the module.
7565
7990
  */
7566
- resourceFragment?: RuleSetCondition;
7991
+ resourceFragment?:
7992
+ | string
7993
+ | RegExp
7994
+ | {
7995
+ /**
7996
+ * Logical AND.
7997
+ */
7998
+ and?: RuleSetCondition[];
7999
+ /**
8000
+ * Logical NOT.
8001
+ */
8002
+ not?: RuleSetCondition[];
8003
+ /**
8004
+ * Logical OR.
8005
+ */
8006
+ or?: RuleSetCondition[];
8007
+ }
8008
+ | ((value: string) => boolean)
8009
+ | RuleSetCondition[];
7567
8010
 
7568
8011
  /**
7569
8012
  * Match the resource query of the module.
7570
8013
  */
7571
- resourceQuery?: RuleSetCondition;
8014
+ resourceQuery?:
8015
+ | string
8016
+ | RegExp
8017
+ | {
8018
+ /**
8019
+ * Logical AND.
8020
+ */
8021
+ and?: RuleSetCondition[];
8022
+ /**
8023
+ * Logical NOT.
8024
+ */
8025
+ not?: RuleSetCondition[];
8026
+ /**
8027
+ * Logical OR.
8028
+ */
8029
+ or?: RuleSetCondition[];
8030
+ }
8031
+ | ((value: string) => boolean)
8032
+ | RuleSetCondition[];
7572
8033
 
7573
8034
  /**
7574
8035
  * Match and execute these rules when this rule is matched.
@@ -7583,7 +8044,25 @@ declare interface RuleSetRule {
7583
8044
  /**
7584
8045
  * Shortcut for resource.test.
7585
8046
  */
7586
- test?: RuleSetConditionAbsolute;
8047
+ test?:
8048
+ | string
8049
+ | RegExp
8050
+ | {
8051
+ /**
8052
+ * Logical AND.
8053
+ */
8054
+ and?: RuleSetConditionAbsolute[];
8055
+ /**
8056
+ * Logical NOT.
8057
+ */
8058
+ not?: RuleSetConditionAbsolute[];
8059
+ /**
8060
+ * Logical OR.
8061
+ */
8062
+ or?: RuleSetConditionAbsolute[];
8063
+ }
8064
+ | ((value: string) => boolean)
8065
+ | RuleSetConditionAbsolute[];
7587
8066
 
7588
8067
  /**
7589
8068
  * Module type to use for the module.
@@ -7593,7 +8072,48 @@ declare interface RuleSetRule {
7593
8072
  /**
7594
8073
  * Modifiers applied to the module when rule is matched.
7595
8074
  */
7596
- use?: RuleSetUse;
8075
+ use?:
8076
+ | string
8077
+ | RuleSetUseItem[]
8078
+ | ((data: {
8079
+ resource: string;
8080
+ realResource: string;
8081
+ resourceQuery: string;
8082
+ issuer: string;
8083
+ compiler: string;
8084
+ }) => RuleSetUseItem[])
8085
+ | {
8086
+ /**
8087
+ * Unique loader options identifier.
8088
+ */
8089
+ ident?: string;
8090
+ /**
8091
+ * Loader name.
8092
+ */
8093
+ loader?: string;
8094
+ /**
8095
+ * Loader options.
8096
+ */
8097
+ options?: string | { [index: string]: any };
8098
+ }
8099
+ | ((data: {}) =>
8100
+ | string
8101
+ | {
8102
+ /**
8103
+ * Unique loader options identifier.
8104
+ */
8105
+ ident?: string;
8106
+ /**
8107
+ * Loader name.
8108
+ */
8109
+ loader?: string;
8110
+ /**
8111
+ * Loader options.
8112
+ */
8113
+ options?: string | { [index: string]: any };
8114
+ }
8115
+ | __TypeWebpackOptions
8116
+ | RuleSetUseItem[]);
7597
8117
  }
7598
8118
  type RuleSetUse =
7599
8119
  | string
@@ -7617,26 +8137,9 @@ type RuleSetUse =
7617
8137
  /**
7618
8138
  * Loader options.
7619
8139
  */
7620
- options?: RuleSetLoaderOptions;
8140
+ options?: string | { [index: string]: any };
7621
8141
  }
7622
- | ((data: {}) =>
7623
- | string
7624
- | {
7625
- /**
7626
- * Unique loader options identifier.
7627
- */
7628
- ident?: string;
7629
- /**
7630
- * Loader name.
7631
- */
7632
- loader?: string;
7633
- /**
7634
- * Loader options.
7635
- */
7636
- options?: RuleSetLoaderOptions;
7637
- }
7638
- | __TypeWebpackOptions
7639
- | RuleSetUseItem[]);
8142
+ | __TypeWebpackOptions;
7640
8143
  type RuleSetUseItem =
7641
8144
  | string
7642
8145
  | {
@@ -7651,10 +8154,9 @@ type RuleSetUseItem =
7651
8154
  /**
7652
8155
  * Loader options.
7653
8156
  */
7654
- options?: RuleSetLoaderOptions;
8157
+ options?: string | { [index: string]: any };
7655
8158
  }
7656
8159
  | __TypeWebpackOptions;
7657
- type Rules = string | RegExp | (string | RegExp)[];
7658
8160
  declare class RuntimeChunkPlugin {
7659
8161
  constructor(options?: any);
7660
8162
  options: any;
@@ -7675,8 +8177,28 @@ declare class RuntimeModule extends Module {
7675
8177
  generate(): string;
7676
8178
  getGeneratedCode(): string;
7677
8179
  shouldIsolate(): boolean;
8180
+
8181
+ /**
8182
+ * Runtime modules without any dependencies to other runtime modules
8183
+ */
8184
+ static STAGE_NORMAL: number;
8185
+
8186
+ /**
8187
+ * Runtime modules with simple dependencies on other runtime modules
8188
+ */
8189
+ static STAGE_BASIC: number;
8190
+
8191
+ /**
8192
+ * Runtime modules which attach to handlers of other runtime modules
8193
+ */
8194
+ static STAGE_ATTACH: number;
8195
+
8196
+ /**
8197
+ * Runtime modules which trigger actions on bootstrap
8198
+ */
8199
+ static STAGE_TRIGGER: number;
7678
8200
  }
7679
- type RuntimeSpec = string | SortableSet<string>;
8201
+ type RuntimeSpec = undefined | string | SortableSet<string>;
7680
8202
  declare abstract class RuntimeSpecMap<T> {
7681
8203
  get(runtime: RuntimeSpec): T;
7682
8204
  has(runtime: RuntimeSpec): boolean;
@@ -7695,18 +8217,19 @@ declare abstract class RuntimeSpecSet {
7695
8217
  declare abstract class RuntimeTemplate {
7696
8218
  outputOptions: OutputNormalized;
7697
8219
  requestShortener: RequestShortener;
7698
- isIIFE(): boolean;
7699
- isModule(): boolean;
7700
- supportsConst(): boolean;
7701
- supportsArrowFunction(): boolean;
7702
- supportsForOf(): boolean;
7703
- supportsDestructuring(): boolean;
7704
- supportsBigIntLiteral(): boolean;
7705
- supportsDynamicImport(): boolean;
7706
- supportsEcmaScriptModuleSyntax(): boolean;
8220
+ isIIFE(): undefined | boolean;
8221
+ isModule(): undefined | boolean;
8222
+ supportsConst(): undefined | boolean;
8223
+ supportsArrowFunction(): undefined | boolean;
8224
+ supportsForOf(): undefined | boolean;
8225
+ supportsDestructuring(): undefined | boolean;
8226
+ supportsBigIntLiteral(): undefined | boolean;
8227
+ supportsDynamicImport(): undefined | boolean;
8228
+ supportsEcmaScriptModuleSyntax(): undefined | boolean;
7707
8229
  supportTemplateLiteral(): boolean;
7708
8230
  returningFunction(returnValue?: any, args?: string): string;
7709
8231
  basicFunction(args?: any, body?: any): string;
8232
+ emptyFunction(): "x => {}" | "function() {}";
7710
8233
  destructureArray(items?: any, value?: any): string;
7711
8234
  iife(args?: any, body?: any): string;
7712
8235
  forEach(variable?: any, array?: any, body?: any): string;
@@ -7986,7 +8509,7 @@ declare abstract class RuntimeTemplate {
7986
8509
  /**
7987
8510
  * true, if location is safe for ASI, a bracket can be emitted
7988
8511
  */
7989
- asiSafe: boolean;
8512
+ asiSafe?: boolean;
7990
8513
  /**
7991
8514
  * true, if expression will be called
7992
8515
  */
@@ -8086,6 +8609,10 @@ declare abstract class RuntimeValue {
8086
8609
  fileDependencies: any;
8087
8610
  exec(parser?: any): any;
8088
8611
  }
8612
+ type Schema =
8613
+ | (JSONSchema4 & Extend)
8614
+ | (JSONSchema6 & Extend)
8615
+ | (JSONSchema7 & Extend);
8089
8616
  declare interface ScopeInfo {
8090
8617
  definitions: StackedMap<string, ScopeInfo | VariableInfo>;
8091
8618
  topLevelScope: boolean | "arrow";
@@ -8094,7 +8621,6 @@ declare interface ScopeInfo {
8094
8621
  isAsmJs: boolean;
8095
8622
  inTry: boolean;
8096
8623
  }
8097
- type ScriptType = false | "module" | "text/javascript";
8098
8624
  declare interface Selector<A, B> {
8099
8625
  (input: A): B;
8100
8626
  }
@@ -8142,7 +8668,7 @@ declare interface SharedConfig {
8142
8668
  /**
8143
8669
  * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
8144
8670
  */
8145
- import?: DevTool;
8671
+ import?: string | false;
8146
8672
 
8147
8673
  /**
8148
8674
  * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
@@ -8152,7 +8678,7 @@ declare interface SharedConfig {
8152
8678
  /**
8153
8679
  * Version requirement from module in share scope.
8154
8680
  */
8155
- requiredVersion?: DevTool;
8681
+ requiredVersion?: string | false;
8156
8682
 
8157
8683
  /**
8158
8684
  * Module is looked up under this key from the share scope.
@@ -8177,7 +8703,7 @@ declare interface SharedConfig {
8177
8703
  /**
8178
8704
  * Version of the provided module. Will replace lower matching versions, but not higher.
8179
8705
  */
8180
- version?: DevTool;
8706
+ version?: string | false;
8181
8707
  }
8182
8708
 
8183
8709
  /**
@@ -8203,19 +8729,19 @@ declare class SizeOnlySource extends Source {
8203
8729
  constructor(size: number);
8204
8730
  }
8205
8731
  declare abstract class Snapshot {
8206
- startTime: number;
8207
- fileTimestamps: Map<string, FileSystemInfoEntry>;
8208
- fileHashes: Map<string, string>;
8209
- fileTshs: Map<string, string | TimestampAndHash>;
8210
- contextTimestamps: Map<string, FileSystemInfoEntry>;
8211
- contextHashes: Map<string, string>;
8212
- contextTshs: Map<string, string | TimestampAndHash>;
8213
- missingExistence: Map<string, boolean>;
8214
- managedItemInfo: Map<string, string>;
8215
- managedFiles: Set<string>;
8216
- managedContexts: Set<string>;
8217
- managedMissing: Set<string>;
8218
- children: Set<Snapshot>;
8732
+ startTime?: number;
8733
+ fileTimestamps?: Map<string, FileSystemInfoEntry>;
8734
+ fileHashes?: Map<string, string>;
8735
+ fileTshs?: Map<string, string | TimestampAndHash>;
8736
+ contextTimestamps?: Map<string, FileSystemInfoEntry>;
8737
+ contextHashes?: Map<string, string>;
8738
+ contextTshs?: Map<string, string | TimestampAndHash>;
8739
+ missingExistence?: Map<string, boolean>;
8740
+ managedItemInfo?: Map<string, string>;
8741
+ managedFiles?: Set<string>;
8742
+ managedContexts?: Set<string>;
8743
+ managedMissing?: Set<string>;
8744
+ children?: Set<Snapshot>;
8219
8745
  hasStartTime(): boolean;
8220
8746
  setStartTime(value?: any): void;
8221
8747
  setMergedStartTime(value?: any, snapshot?: any): void;
@@ -8380,7 +8906,7 @@ declare interface SourceMapDevToolPluginOptions {
8380
8906
  /**
8381
8907
  * Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
8382
8908
  */
8383
- append?: DevTool;
8909
+ append?: null | string | false;
8384
8910
 
8385
8911
  /**
8386
8912
  * Indicates whether column mappings should be used (defaults to true).
@@ -8390,12 +8916,12 @@ declare interface SourceMapDevToolPluginOptions {
8390
8916
  /**
8391
8917
  * Exclude modules that match the given value from source map generation.
8392
8918
  */
8393
- exclude?: Rules;
8919
+ exclude?: string | RegExp | (string | RegExp)[];
8394
8920
 
8395
8921
  /**
8396
8922
  * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
8397
8923
  */
8398
- fallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
8924
+ fallbackModuleFilenameTemplate?: string | Function;
8399
8925
 
8400
8926
  /**
8401
8927
  * Path prefix to which the [file] placeholder is relative to.
@@ -8405,12 +8931,12 @@ declare interface SourceMapDevToolPluginOptions {
8405
8931
  /**
8406
8932
  * Defines the output filename of the SourceMap (will be inlined if no value is provided).
8407
8933
  */
8408
- filename?: DevTool;
8934
+ filename?: null | string | false;
8409
8935
 
8410
8936
  /**
8411
8937
  * Include source maps for module paths that match the given value.
8412
8938
  */
8413
- include?: Rules;
8939
+ include?: string | RegExp | (string | RegExp)[];
8414
8940
 
8415
8941
  /**
8416
8942
  * Indicates whether SourceMaps from loaders should be used (defaults to true).
@@ -8420,7 +8946,7 @@ declare interface SourceMapDevToolPluginOptions {
8420
8946
  /**
8421
8947
  * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
8422
8948
  */
8423
- moduleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
8949
+ moduleFilenameTemplate?: string | Function;
8424
8950
 
8425
8951
  /**
8426
8952
  * Namespace prefix to allow multiple webpack roots in the devtools.
@@ -8445,7 +8971,7 @@ declare interface SourceMapDevToolPluginOptions {
8445
8971
  /**
8446
8972
  * Include source maps for modules based on their extension (defaults to .js and .css).
8447
8973
  */
8448
- test?: Rules;
8974
+ test?: string | RegExp | (string | RegExp)[];
8449
8975
  }
8450
8976
  declare class SourceMapSource extends Source {
8451
8977
  constructor(
@@ -8453,9 +8979,17 @@ declare class SourceMapSource extends Source {
8453
8979
  name: string,
8454
8980
  sourceMap: string | Object | Buffer,
8455
8981
  originalSource?: string | Buffer,
8456
- innerSourceMap?: string | Object | Buffer
8982
+ innerSourceMap?: string | Object | Buffer,
8983
+ removeOriginalSource?: boolean
8457
8984
  );
8458
- getArgsAsBuffers(): [Buffer, string, Buffer, Buffer, Buffer];
8985
+ getArgsAsBuffers(): [
8986
+ Buffer,
8987
+ string,
8988
+ Buffer,
8989
+ undefined | Buffer,
8990
+ undefined | Buffer,
8991
+ boolean
8992
+ ];
8459
8993
  }
8460
8994
  declare interface SourcePosition {
8461
8995
  line: number;
@@ -8473,13 +9007,17 @@ declare interface SplitChunksOptions {
8473
9007
  maxAsyncRequests: number;
8474
9008
  maxInitialRequests: number;
8475
9009
  hidePathInfo: boolean;
8476
- filename: string | ((arg0: PathData, arg1: AssetInfo) => string);
9010
+ filename: string | ((arg0: PathData, arg1?: AssetInfo) => string);
8477
9011
  automaticNameDelimiter: string;
8478
9012
  getCacheGroups: (
8479
9013
  module: Module,
8480
9014
  context: CacheGroupsContext
8481
9015
  ) => CacheGroupSource[];
8482
- getName: (module?: Module, chunks?: Chunk[], key?: string) => string;
9016
+ getName: (
9017
+ module?: Module,
9018
+ chunks?: Chunk[],
9019
+ key?: string
9020
+ ) => undefined | string;
8483
9021
  usedExports: boolean;
8484
9022
  fallbackCacheGroup: FallbackCacheGroup;
8485
9023
  }
@@ -8498,11 +9036,11 @@ declare abstract class StackedMap<K, V> {
8498
9036
  set(item: K, value: V): void;
8499
9037
  delete(item: K): void;
8500
9038
  has(item: K): boolean;
8501
- get(item: K): V;
9039
+ get(item: K): Cell<V>;
8502
9040
  asArray(): K[];
8503
9041
  asSet(): Set<K>;
8504
- asPairArray(): [K, V][];
8505
- asMap(): Map<K, V>;
9042
+ asPairArray(): [K, Cell<V>][];
9043
+ asMap(): Map<K, Cell<V>>;
8506
9044
  readonly size: number;
8507
9045
  createChild(): StackedMap<K, V>;
8508
9046
  }
@@ -8531,7 +9069,7 @@ type Statement =
8531
9069
  declare class Stats {
8532
9070
  constructor(compilation: Compilation);
8533
9071
  compilation: Compilation;
8534
- readonly hash: string;
9072
+ readonly hash?: string;
8535
9073
  readonly startTime: any;
8536
9074
  readonly endTime: any;
8537
9075
  hasWarnings(): boolean;
@@ -8541,21 +9079,21 @@ declare class Stats {
8541
9079
  }
8542
9080
  declare abstract class StatsFactory {
8543
9081
  hooks: Readonly<{
8544
- extract: HookMap<SyncBailHook<[any, any, any], any>>;
8545
- filter: HookMap<SyncBailHook<[any, any, number, number], any>>;
9082
+ extract: HookMap<SyncBailHook<[Object, any, Object], any>>;
9083
+ filter: HookMap<SyncBailHook<[any, Object, number, number], any>>;
8546
9084
  sort: HookMap<
8547
- SyncBailHook<[((arg0?: any, arg1?: any) => number)[], any], any>
9085
+ SyncBailHook<[((arg0?: any, arg1?: any) => number)[], Object], any>
8548
9086
  >;
8549
- filterSorted: HookMap<SyncBailHook<[any, any, number, number], any>>;
8550
- groupResults: HookMap<SyncBailHook<[GroupConfig<any, any>[], any], any>>;
9087
+ filterSorted: HookMap<SyncBailHook<[any, Object, number, number], any>>;
9088
+ groupResults: HookMap<SyncBailHook<[GroupConfig<any, {}>[], Object], any>>;
8551
9089
  sortResults: HookMap<
8552
- SyncBailHook<[((arg0?: any, arg1?: any) => number)[], any], any>
9090
+ SyncBailHook<[((arg0?: any, arg1?: any) => number)[], Object], any>
8553
9091
  >;
8554
9092
  filterResults: HookMap<SyncBailHook<any, any>>;
8555
- merge: HookMap<SyncBailHook<[any[], any], any>>;
8556
- result: HookMap<SyncBailHook<[any[], any], any>>;
8557
- getItemName: HookMap<SyncBailHook<[any, any], any>>;
8558
- getItemFactory: HookMap<SyncBailHook<[any, any], any>>;
9093
+ merge: HookMap<SyncBailHook<[any[], Object], any>>;
9094
+ result: HookMap<SyncBailHook<[any[], Object], any>>;
9095
+ getItemName: HookMap<SyncBailHook<[any, Object], any>>;
9096
+ getItemFactory: HookMap<SyncBailHook<[any, Object], any>>;
8559
9097
  }>;
8560
9098
  create(type?: any, data?: any, baseContext?: any): any;
8561
9099
  }
@@ -8744,7 +9282,11 @@ declare interface StatsOptions {
8744
9282
  /**
8745
9283
  * Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
8746
9284
  */
8747
- excludeAssets?: FilterTypes;
9285
+ excludeAssets?:
9286
+ | string
9287
+ | RegExp
9288
+ | FilterItemTypes[]
9289
+ | ((value: string) => boolean);
8748
9290
 
8749
9291
  /**
8750
9292
  * Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
@@ -8944,7 +9486,11 @@ declare interface StatsOptions {
8944
9486
  /**
8945
9487
  * Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
8946
9488
  */
8947
- warningsFilter?: FilterTypes;
9489
+ warningsFilter?:
9490
+ | string
9491
+ | RegExp
9492
+ | FilterItemTypes[]
9493
+ | ((value: string) => boolean);
8948
9494
  }
8949
9495
  declare abstract class StatsPrinter {
8950
9496
  hooks: Readonly<{
@@ -8956,7 +9502,7 @@ declare abstract class StatsPrinter {
8956
9502
  print: HookMap<SyncBailHook<[{}, {}], string>>;
8957
9503
  result: HookMap<SyncWaterfallHook<[string, {}]>>;
8958
9504
  }>;
8959
- print(type: string, object?: any, baseContext?: any): string;
9505
+ print(type: string, object: Object, baseContext?: Object): string;
8960
9506
  }
8961
9507
  type StatsValue =
8962
9508
  | boolean
@@ -8978,7 +9524,7 @@ declare const TRANSITIVE_ONLY: unique symbol;
8978
9524
  declare interface TagInfo {
8979
9525
  tag: any;
8980
9526
  data: any;
8981
- next: TagInfo;
9527
+ next?: TagInfo;
8982
9528
  }
8983
9529
  type Target = string | false | string[];
8984
9530
  declare class Template {
@@ -9031,7 +9577,7 @@ declare interface UpdateHashContextGenerator {
9031
9577
  chunkGraph: ChunkGraph;
9032
9578
  runtime: RuntimeSpec;
9033
9579
  }
9034
- type UsageStateType = 0 | 1 | 2 | 3 | 4;
9580
+ type UsageStateType = 0 | 2 | 3 | 1 | 4;
9035
9581
  declare interface UserResolveOptions {
9036
9582
  /**
9037
9583
  * A list of module alias configurations or an object which maps key to value
@@ -9141,7 +9687,7 @@ declare interface UserResolveOptions {
9141
9687
  /**
9142
9688
  * A list of directories to resolve modules from, can be absolute path or folder name
9143
9689
  */
9144
- modules?: EntryItem;
9690
+ modules?: string | string[];
9145
9691
 
9146
9692
  /**
9147
9693
  * A list of main fields in description files
@@ -9168,7 +9714,7 @@ declare interface UserResolveOptions {
9168
9714
  /**
9169
9715
  * A PnP API that should be used - null is "never", undefined is "auto"
9170
9716
  */
9171
- pnpApi?: PnpApiImpl;
9717
+ pnpApi?: null | PnpApiImpl;
9172
9718
 
9173
9719
  /**
9174
9720
  * A list of root paths
@@ -9203,12 +9749,12 @@ declare interface UserResolveOptions {
9203
9749
  declare abstract class VariableInfo {
9204
9750
  declaredScope: ScopeInfo;
9205
9751
  freeName: string | true;
9206
- tagInfo: TagInfo;
9752
+ tagInfo?: TagInfo;
9207
9753
  }
9208
9754
  declare interface VariableInfoInterface {
9209
9755
  declaredScope: ScopeInfo;
9210
9756
  freeName: string | true;
9211
- tagInfo: TagInfo;
9757
+ tagInfo?: TagInfo;
9212
9758
  }
9213
9759
  declare interface WatchFileSystem {
9214
9760
  watch: (
@@ -9218,7 +9764,7 @@ declare interface WatchFileSystem {
9218
9764
  startTime: number,
9219
9765
  options: WatchOptions,
9220
9766
  callback: (
9221
- arg0: Error,
9767
+ arg0: undefined | Error,
9222
9768
  arg1: Map<string, FileSystemInfoEntry>,
9223
9769
  arg2: Map<string, FileSystemInfoEntry>,
9224
9770
  arg3: Set<string>,
@@ -9294,7 +9840,7 @@ declare interface Watcher {
9294
9840
  getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry>;
9295
9841
  }
9296
9842
  declare abstract class Watching {
9297
- startTime: number;
9843
+ startTime: null | number;
9298
9844
  invalid: boolean;
9299
9845
  handler: CallbackFunction<Stats>;
9300
9846
  callbacks: CallbackFunction<void>[];
@@ -9344,7 +9890,11 @@ declare class WebWorkerTemplatePlugin {
9344
9890
  */
9345
9891
  apply(compiler: Compiler): void;
9346
9892
  }
9347
- declare interface WebpackError extends Error {
9893
+ declare class WebpackError extends Error {
9894
+ /**
9895
+ * Creates an instance of WebpackError.
9896
+ */
9897
+ constructor(message?: string);
9348
9898
  details: any;
9349
9899
  module: Module;
9350
9900
  loc: DependencyLocation;
@@ -9353,6 +9903,20 @@ declare interface WebpackError extends Error {
9353
9903
  file: string;
9354
9904
  serialize(__0: { write: any }): void;
9355
9905
  deserialize(__0: { read: any }): void;
9906
+
9907
+ /**
9908
+ * Create .stack property on a target object
9909
+ */
9910
+ static captureStackTrace(targetObject: {}, constructorOpt?: Function): void;
9911
+
9912
+ /**
9913
+ * Optional override for formatting stack traces
9914
+ */
9915
+ static prepareStackTrace?: (
9916
+ err: Error,
9917
+ stackTraces: NodeJS.CallSite[]
9918
+ ) => any;
9919
+ static stackTraceLimit: number;
9356
9920
  }
9357
9921
  declare abstract class WebpackLogger {
9358
9922
  getChildLogger: (arg0: string | (() => string)) => WebpackLogger;
@@ -9391,7 +9955,7 @@ declare interface WebpackOptionsNormalized {
9391
9955
  /**
9392
9956
  * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
9393
9957
  */
9394
- amd?: Amd;
9958
+ amd?: false | { [index: string]: any };
9395
9959
 
9396
9960
  /**
9397
9961
  * Report the first error as a hard error instead of tolerating it.
@@ -9421,7 +9985,7 @@ declare interface WebpackOptionsNormalized {
9421
9985
  /**
9422
9986
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
9423
9987
  */
9424
- devtool?: DevTool;
9988
+ devtool?: string | false;
9425
9989
 
9426
9990
  /**
9427
9991
  * The entry point(s) of the compilation.
@@ -9446,7 +10010,26 @@ declare interface WebpackOptionsNormalized {
9446
10010
  /**
9447
10011
  * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
9448
10012
  */
9449
- externalsType?: ExternalsType;
10013
+ externalsType?:
10014
+ | "var"
10015
+ | "module"
10016
+ | "assign"
10017
+ | "this"
10018
+ | "window"
10019
+ | "self"
10020
+ | "global"
10021
+ | "commonjs"
10022
+ | "commonjs2"
10023
+ | "commonjs-module"
10024
+ | "amd"
10025
+ | "amd-require"
10026
+ | "umd"
10027
+ | "umd2"
10028
+ | "jsonp"
10029
+ | "system"
10030
+ | "promise"
10031
+ | "import"
10032
+ | "script";
9450
10033
 
9451
10034
  /**
9452
10035
  * Ignore specific warnings.
@@ -9469,7 +10052,7 @@ declare interface WebpackOptionsNormalized {
9469
10052
  /**
9470
10053
  * Enable production optimizations or development hints.
9471
10054
  */
9472
- mode?: Mode;
10055
+ mode?: "development" | "production" | "none";
9473
10056
 
9474
10057
  /**
9475
10058
  * Options affecting the normal modules (`NormalModuleFactory`).
@@ -9504,7 +10087,7 @@ declare interface WebpackOptionsNormalized {
9504
10087
  /**
9505
10088
  * Configuration for web performance recommendations.
9506
10089
  */
9507
- performance?: Performance;
10090
+ performance?: false | PerformanceOptions;
9508
10091
 
9509
10092
  /**
9510
10093
  * Add additional plugins to the compiler.
@@ -9522,12 +10105,12 @@ declare interface WebpackOptionsNormalized {
9522
10105
  /**
9523
10106
  * Store compiler state to a json file.
9524
10107
  */
9525
- recordsInputPath?: DevTool;
10108
+ recordsInputPath?: string | false;
9526
10109
 
9527
10110
  /**
9528
10111
  * Load compiler state from a json file.
9529
10112
  */
9530
- recordsOutputPath?: DevTool;
10113
+ recordsOutputPath?: string | false;
9531
10114
 
9532
10115
  /**
9533
10116
  * Options for the resolver.
@@ -9552,7 +10135,7 @@ declare interface WebpackOptionsNormalized {
9552
10135
  /**
9553
10136
  * Environment to build for. An array of environments to build for all of them when possible.
9554
10137
  */
9555
- target?: Target;
10138
+ target?: string | false | string[];
9556
10139
 
9557
10140
  /**
9558
10141
  * Enter watch mode, which rebuilds on file change.
@@ -9601,7 +10184,7 @@ type __TypeWebpackOptions = (data: {}) =>
9601
10184
  /**
9602
10185
  * Loader options.
9603
10186
  */
9604
- options?: RuleSetLoaderOptions;
10187
+ options?: string | { [index: string]: any };
9605
10188
  }
9606
10189
  | __TypeWebpackOptions
9607
10190
  | RuleSetUseItem[];
@@ -9622,7 +10205,11 @@ declare namespace exports {
9622
10205
  ): MultiCompiler;
9623
10206
  };
9624
10207
  export const validate: (options?: any) => void;
9625
- export const validateSchema: (schema?: any, options?: any) => void;
10208
+ export const validateSchema: (
10209
+ schema: Schema,
10210
+ options: {} | {}[],
10211
+ validationConfiguration?: ValidationErrorConfiguration
10212
+ ) => void;
9626
10213
  export const version: string;
9627
10214
  export namespace cli {
9628
10215
  export let getArguments: (schema?: any) => Record<string, Argument>;
@@ -9637,7 +10224,7 @@ declare namespace exports {
9637
10224
  | RegExp
9638
10225
  | (string | number | boolean | RegExp)[]
9639
10226
  >
9640
- ) => Problem[];
10227
+ ) => null | Problem[];
9641
10228
  }
9642
10229
  export namespace ModuleFilenameHelpers {
9643
10230
  export let ALL_LOADERS_RESOURCE: string;
@@ -9714,6 +10301,8 @@ declare namespace exports {
9714
10301
  export let getChunkUpdateScriptFilename: string;
9715
10302
  export let startup: string;
9716
10303
  export let startupNoDefault: string;
10304
+ export let startupOnlyAfter: string;
10305
+ export let startupOnlyBefore: string;
9717
10306
  export let startupEntrypoint: string;
9718
10307
  export let externalInstallChunk: string;
9719
10308
  export let interceptModuleExecution: string;
@@ -9991,6 +10580,7 @@ declare namespace exports {
9991
10580
  Stats,
9992
10581
  Template,
9993
10582
  WatchIgnorePlugin,
10583
+ WebpackError,
9994
10584
  WebpackOptionsApply,
9995
10585
  WebpackOptionsDefaulter,
9996
10586
  Entry,
@@ -10006,6 +10596,8 @@ declare namespace exports {
10006
10596
  Configuration,
10007
10597
  WebpackOptionsNormalized,
10008
10598
  WebpackPluginInstance,
10599
+ Asset,
10600
+ AssetInfo,
10009
10601
  ParserState
10010
10602
  };
10011
10603
  }