webpack 5.83.1 → 5.85.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 (232) hide show
  1. package/README.md +2 -2
  2. package/lib/AsyncDependenciesBlock.js +2 -2
  3. package/lib/AutomaticPrefetchPlugin.js +1 -0
  4. package/lib/BannerPlugin.js +4 -0
  5. package/lib/CacheFacade.js +4 -0
  6. package/lib/ChunkGroup.js +5 -1
  7. package/lib/CleanPlugin.js +30 -7
  8. package/lib/CompatibilityPlugin.js +4 -3
  9. package/lib/Compilation.js +3 -3
  10. package/lib/Compiler.js +1 -1
  11. package/lib/ContextModule.js +3 -3
  12. package/lib/ContextModuleFactory.js +1 -1
  13. package/lib/DefinePlugin.js +11 -2
  14. package/lib/DllEntryPlugin.js +5 -0
  15. package/lib/DllModule.js +1 -1
  16. package/lib/DllModuleFactory.js +1 -1
  17. package/lib/EvalSourceMapDevToolPlugin.js +3 -1
  18. package/lib/HookWebpackError.js +1 -1
  19. package/lib/IgnoreErrorModuleFactory.js +1 -1
  20. package/lib/MainTemplate.js +2 -2
  21. package/lib/Module.js +21 -9
  22. package/lib/ModuleFactory.js +1 -1
  23. package/lib/ModuleTypeConstants.js +2 -1
  24. package/lib/NormalModuleFactory.js +1 -1
  25. package/lib/NormalModuleReplacementPlugin.js +4 -2
  26. package/lib/NullFactory.js +1 -1
  27. package/lib/PrefetchPlugin.js +4 -0
  28. package/lib/RecordIdsPlugin.js +4 -4
  29. package/lib/RuntimeModule.js +5 -5
  30. package/lib/RuntimePlugin.js +4 -0
  31. package/lib/RuntimeTemplate.js +7 -7
  32. package/lib/SelfModuleFactory.js +12 -0
  33. package/lib/SourceMapDevToolPlugin.js +9 -2
  34. package/lib/Template.js +3 -2
  35. package/lib/UseStrictPlugin.js +4 -0
  36. package/lib/WarnDeprecatedOptionPlugin.js +7 -0
  37. package/lib/WatchIgnorePlugin.js +4 -0
  38. package/lib/WebpackOptionsApply.js +2 -1
  39. package/lib/asset/AssetGenerator.js +7 -2
  40. package/lib/asset/AssetModulesPlugin.js +7 -1
  41. package/lib/asset/AssetParser.js +4 -1
  42. package/lib/asset/RawDataUrlModule.js +5 -3
  43. package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
  44. package/lib/cache/PackFileCacheStrategy.js +7 -1
  45. package/lib/config/browserslistTargetHandler.js +3 -3
  46. package/lib/config/defaults.js +240 -73
  47. package/lib/config/normalization.js +104 -71
  48. package/lib/config/target.js +37 -10
  49. package/lib/container/ContainerEntryModule.js +4 -0
  50. package/lib/container/ContainerEntryModuleFactory.js +1 -1
  51. package/lib/container/FallbackDependency.js +7 -0
  52. package/lib/container/FallbackItemDependency.js +3 -0
  53. package/lib/container/FallbackModule.js +5 -1
  54. package/lib/container/FallbackModuleFactory.js +1 -1
  55. package/lib/container/RemoteModule.js +4 -0
  56. package/lib/container/RemoteRuntimeModule.js +2 -1
  57. package/lib/container/RemoteToExternalDependency.js +3 -0
  58. package/lib/css/CssParser.js +168 -73
  59. package/lib/debug/ProfilingPlugin.js +11 -0
  60. package/lib/dependencies/AMDDefineDependency.js +12 -6
  61. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +8 -2
  62. package/lib/dependencies/AMDPlugin.js +7 -0
  63. package/lib/dependencies/AMDRequireArrayDependency.js +5 -0
  64. package/lib/dependencies/AMDRequireContextDependency.js +6 -0
  65. package/lib/dependencies/AMDRequireDependenciesBlock.js +6 -0
  66. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +8 -2
  67. package/lib/dependencies/AMDRequireDependency.js +8 -1
  68. package/lib/dependencies/AMDRequireItemDependency.js +6 -0
  69. package/lib/dependencies/CachedConstDependency.js +6 -0
  70. package/lib/dependencies/CommonJsExportRequireDependency.js +11 -0
  71. package/lib/dependencies/CommonJsExportsDependency.js +8 -0
  72. package/lib/dependencies/CommonJsExportsParserPlugin.js +2 -2
  73. package/lib/dependencies/CommonJsFullRequireDependency.js +2 -1
  74. package/lib/dependencies/CommonJsPlugin.js +28 -12
  75. package/lib/dependencies/CommonJsRequireContextDependency.js +8 -0
  76. package/lib/dependencies/CommonJsRequireDependency.js +7 -0
  77. package/lib/dependencies/CommonJsSelfReferenceDependency.js +8 -0
  78. package/lib/dependencies/ConstDependency.js +2 -1
  79. package/lib/dependencies/ContextDependencyHelpers.js +3 -3
  80. package/lib/dependencies/CreateScriptUrlDependency.js +2 -1
  81. package/lib/dependencies/CriticalDependencyWarning.js +3 -0
  82. package/lib/dependencies/CssImportDependency.js +2 -1
  83. package/lib/dependencies/CssLocalIdentifierDependency.js +2 -1
  84. package/lib/dependencies/CssSelfLocalIdentifierDependency.js +2 -1
  85. package/lib/dependencies/CssUrlDependency.js +12 -2
  86. package/lib/dependencies/DelegatedSourceDependency.js +3 -0
  87. package/lib/dependencies/ExportsInfoDependency.js +6 -0
  88. package/lib/dependencies/HarmonyAcceptDependency.js +2 -1
  89. package/lib/dependencies/HarmonyAcceptImportDependency.js +3 -0
  90. package/lib/dependencies/HarmonyDetectionParserPlugin.js +16 -0
  91. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +12 -1
  92. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +3 -0
  93. package/lib/dependencies/HarmonyExportExpressionDependency.js +8 -0
  94. package/lib/dependencies/HarmonyExportHeaderDependency.js +5 -0
  95. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
  96. package/lib/dependencies/HarmonyExportSpecifierDependency.js +4 -0
  97. package/lib/dependencies/HarmonyExports.js +3 -1
  98. package/lib/dependencies/HarmonyImportDependency.js +2 -1
  99. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +18 -5
  100. package/lib/dependencies/HarmonyImportSideEffectDependency.js +6 -0
  101. package/lib/dependencies/HarmonyImportSpecifierDependency.js +86 -6
  102. package/lib/dependencies/HarmonyModulesPlugin.js +12 -0
  103. package/lib/dependencies/ImportContextDependency.js +6 -0
  104. package/lib/dependencies/ImportDependency.js +2 -1
  105. package/lib/dependencies/ImportEagerDependency.js +2 -1
  106. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +32 -13
  107. package/lib/dependencies/ImportMetaContextPlugin.js +7 -0
  108. package/lib/dependencies/ImportMetaHotAcceptDependency.js +6 -0
  109. package/lib/dependencies/ImportMetaHotDeclineDependency.js +6 -0
  110. package/lib/dependencies/ImportParserPlugin.js +5 -0
  111. package/lib/dependencies/ImportPlugin.js +7 -0
  112. package/lib/dependencies/ImportWeakDependency.js +2 -1
  113. package/lib/dependencies/LocalModule.js +16 -0
  114. package/lib/dependencies/LocalModuleDependency.js +7 -0
  115. package/lib/dependencies/LocalModulesHelpers.js +18 -0
  116. package/lib/dependencies/ModuleHotAcceptDependency.js +6 -0
  117. package/lib/dependencies/ModuleHotDeclineDependency.js +6 -0
  118. package/lib/dependencies/PrefetchDependency.js +3 -0
  119. package/lib/dependencies/ProvidedDependency.js +2 -1
  120. package/lib/dependencies/PureExpressionDependency.js +2 -1
  121. package/lib/dependencies/RequireContextDependency.js +6 -0
  122. package/lib/dependencies/RequireContextPlugin.js +7 -0
  123. package/lib/dependencies/RequireEnsureDependenciesBlock.js +4 -0
  124. package/lib/dependencies/RequireEnsureDependency.js +8 -2
  125. package/lib/dependencies/RequireEnsureItemDependency.js +3 -0
  126. package/lib/dependencies/RequireEnsurePlugin.js +14 -0
  127. package/lib/dependencies/RequireHeaderDependency.js +5 -1
  128. package/lib/dependencies/RequireIncludeDependency.js +5 -0
  129. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +3 -0
  130. package/lib/dependencies/RequireIncludePlugin.js +14 -0
  131. package/lib/dependencies/RequireResolveContextDependency.js +8 -0
  132. package/lib/dependencies/RequireResolveDependency.js +6 -0
  133. package/lib/dependencies/RequireResolveHeaderDependency.js +4 -0
  134. package/lib/dependencies/SystemPlugin.js +10 -1
  135. package/lib/dependencies/URLDependency.js +3 -2
  136. package/lib/dependencies/URLPlugin.js +7 -5
  137. package/lib/dependencies/UnsupportedDependency.js +5 -0
  138. package/lib/dependencies/WebAssemblyExportImportedDependency.js +6 -0
  139. package/lib/dependencies/WebpackIsIncludedDependency.js +5 -0
  140. package/lib/dependencies/WorkerDependency.js +2 -1
  141. package/lib/dependencies/WorkerPlugin.js +30 -3
  142. package/lib/dependencies/getFunctionExpression.js +7 -0
  143. package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -1
  144. package/lib/esm/ModuleChunkFormatPlugin.js +15 -7
  145. package/lib/esm/ModuleChunkLoadingPlugin.js +9 -0
  146. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +14 -9
  147. package/lib/hmr/LazyCompilationPlugin.js +1 -1
  148. package/lib/ids/ChunkModuleIdRangePlugin.js +11 -0
  149. package/lib/ids/DeterministicChunkIdsPlugin.js +11 -2
  150. package/lib/ids/DeterministicModuleIdsPlugin.js +11 -7
  151. package/lib/ids/HashedModuleIdsPlugin.js +8 -1
  152. package/lib/ids/IdHelpers.js +6 -0
  153. package/lib/ids/NamedChunkIdsPlugin.js +13 -1
  154. package/lib/ids/NamedModuleIdsPlugin.js +14 -3
  155. package/lib/ids/OccurrenceChunkIdsPlugin.js +6 -2
  156. package/lib/ids/SyncModuleIdsPlugin.js +2 -2
  157. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +3 -3
  158. package/lib/javascript/BasicEvaluatedExpression.js +11 -1
  159. package/lib/javascript/ChunkHelpers.js +2 -2
  160. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
  161. package/lib/javascript/EnableChunkLoadingPlugin.js +4 -0
  162. package/lib/javascript/JavascriptModulesPlugin.js +36 -31
  163. package/lib/javascript/JavascriptParser.js +586 -192
  164. package/lib/javascript/StartupHelpers.js +2 -2
  165. package/lib/json/JsonGenerator.js +7 -5
  166. package/lib/json/JsonParser.js +1 -1
  167. package/lib/library/AbstractLibraryPlugin.js +4 -0
  168. package/lib/library/AssignLibraryPlugin.js +6 -4
  169. package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
  170. package/lib/library/ModuleLibraryPlugin.js +6 -3
  171. package/lib/library/SystemLibraryPlugin.js +1 -0
  172. package/lib/library/UmdLibraryPlugin.js +4 -0
  173. package/lib/node/CommonJsChunkLoadingPlugin.js +17 -2
  174. package/lib/node/NodeTemplatePlugin.js +10 -2
  175. package/lib/node/NodeWatchFileSystem.js +1 -1
  176. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +6 -3
  177. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +8 -0
  178. package/lib/node/ReadFileCompileWasmPlugin.js +19 -2
  179. package/lib/node/RequireChunkLoadingRuntimeModule.js +6 -3
  180. package/lib/optimize/ConcatenatedModule.js +1 -1
  181. package/lib/optimize/InnerGraphPlugin.js +11 -4
  182. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -1
  183. package/lib/runtime/AutoPublicPathRuntimeModule.js +5 -1
  184. package/lib/runtime/BaseUriRuntimeModule.js +5 -1
  185. package/lib/runtime/EnsureChunkRuntimeModule.js +3 -0
  186. package/lib/runtime/GetChunkFilenameRuntimeModule.js +35 -16
  187. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
  188. package/lib/runtime/LoadScriptRuntimeModule.js +1 -1
  189. package/lib/runtime/PublicPathRuntimeModule.js +5 -0
  190. package/lib/runtime/StartupChunkDependenciesPlugin.js +15 -0
  191. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +4 -1
  192. package/lib/runtime/StartupEntrypointRuntimeModule.js +8 -5
  193. package/lib/serialization/ArraySerializer.js +22 -6
  194. package/lib/serialization/BinaryMiddleware.js +21 -0
  195. package/lib/serialization/DateObjectSerializer.js +15 -4
  196. package/lib/serialization/ErrorObjectSerializer.js +20 -8
  197. package/lib/serialization/FileMiddleware.js +17 -0
  198. package/lib/serialization/MapObjectSerializer.js +24 -8
  199. package/lib/serialization/NullPrototypeObjectSerializer.js +25 -8
  200. package/lib/serialization/ObjectMiddleware.js +23 -0
  201. package/lib/serialization/PlainObjectSerializer.js +23 -12
  202. package/lib/serialization/RegExpObjectSerializer.js +16 -5
  203. package/lib/serialization/SetObjectSerializer.js +21 -6
  204. package/lib/sharing/ProvideSharedModuleFactory.js +1 -1
  205. package/lib/sharing/ShareRuntimeModule.js +1 -1
  206. package/lib/util/createHash.js +1 -1
  207. package/lib/util/makeSerializable.js +7 -0
  208. package/lib/util/serialization.js +10 -0
  209. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
  210. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +9 -1
  211. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +13 -3
  212. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +19 -2
  213. package/lib/wasm-async/AsyncWebAssemblyParser.js +3 -0
  214. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +25 -1
  215. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +14 -5
  216. package/lib/wasm-sync/WebAssemblyGenerator.js +18 -5
  217. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +1 -1
  218. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +12 -1
  219. package/lib/wasm-sync/WebAssemblyParser.js +9 -2
  220. package/lib/wasm-sync/WebAssemblyUtils.js +1 -1
  221. package/lib/web/FetchCompileAsyncWasmPlugin.js +9 -0
  222. package/lib/web/FetchCompileWasmPlugin.js +19 -2
  223. package/lib/web/JsonpChunkLoadingPlugin.js +9 -0
  224. package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -1
  225. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +9 -0
  226. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -2
  227. package/package.json +3 -3
  228. package/schemas/WebpackOptions.check.js +1 -1
  229. package/schemas/WebpackOptions.json +12 -0
  230. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  231. package/schemas/plugins/SourceMapDevToolPlugin.json +4 -0
  232. package/types.d.ts +655 -290
package/types.d.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  AssignmentPattern,
14
14
  AssignmentProperty,
15
15
  AwaitExpression,
16
+ BaseCallExpression,
16
17
  BigIntLiteral,
17
18
  BinaryExpression,
18
19
  BlockStatement,
@@ -82,6 +83,7 @@ import {
82
83
  WithStatement,
83
84
  YieldExpression
84
85
  } from "estree";
86
+ import { Dirent } from "fs";
85
87
  import {
86
88
  IncomingMessage,
87
89
  ServerOptions as ServerOptionsImport,
@@ -204,8 +206,9 @@ declare interface AggressiveSplittingPluginOptions {
204
206
  */
205
207
  minSize?: number;
206
208
  }
209
+ type Alias = string | false | string[];
207
210
  declare interface AliasOption {
208
- alias: string | false | string[];
211
+ alias: Alias;
209
212
  name: string;
210
213
  onlyModule?: boolean;
211
214
  }
@@ -227,6 +230,9 @@ declare interface ArgumentConfig {
227
230
  type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
228
231
  values?: any[];
229
232
  }
233
+ declare interface Assertions {
234
+ [index: string]: any;
235
+ }
230
236
  declare interface Asset {
231
237
  /**
232
238
  * the filename of the asset
@@ -350,7 +356,7 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
350
356
  };
351
357
  loc?: SyntheticDependencyLocation | RealDependencyLocation;
352
358
  request?: string;
353
- chunkName: string;
359
+ chunkName?: string;
354
360
  module: any;
355
361
  }
356
362
  declare abstract class AsyncQueue<T, K, R> {
@@ -377,18 +383,28 @@ declare abstract class AsyncQueue<T, K, R> {
377
383
  clear(): void;
378
384
  }
379
385
  declare class AsyncWebAssemblyModulesPlugin {
380
- constructor(options?: any);
381
- options: any;
386
+ constructor(options: AsyncWebAssemblyModulesPluginOptions);
387
+ options: AsyncWebAssemblyModulesPluginOptions;
382
388
 
383
389
  /**
384
390
  * Apply the plugin
385
391
  */
386
392
  apply(compiler: Compiler): void;
387
- renderModule(module?: any, renderContext?: any, hooks?: any): any;
393
+ renderModule(
394
+ module: Module,
395
+ renderContext: WebAssemblyRenderContext,
396
+ hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
397
+ ): Source;
388
398
  static getCompilationHooks(
389
399
  compilation: Compilation
390
400
  ): CompilationHooksAsyncWebAssemblyModulesPlugin;
391
401
  }
402
+ declare interface AsyncWebAssemblyModulesPluginOptions {
403
+ /**
404
+ * mangle imports
405
+ */
406
+ mangleImports?: boolean;
407
+ }
392
408
  declare class AutomaticPrefetchPlugin {
393
409
  constructor();
394
410
 
@@ -456,12 +472,16 @@ declare interface BannerPluginOptions {
456
472
  }
457
473
  declare interface BaseResolveRequest {
458
474
  path: string | false;
475
+ context?: object;
459
476
  descriptionFilePath?: string;
460
477
  descriptionFileRoot?: string;
461
- descriptionFileData?: object;
478
+ descriptionFileData?: JsonObject;
462
479
  relativePath?: string;
463
480
  ignoreSymlinks?: boolean;
464
481
  fullySpecified?: boolean;
482
+ __innerRequest?: string;
483
+ __innerRequest_request?: string;
484
+ __innerRequest_relativePath?: string;
465
485
  }
466
486
  declare abstract class BasicEvaluatedExpression {
467
487
  type: number;
@@ -487,6 +507,7 @@ declare abstract class BasicEvaluatedExpression {
487
507
  rootInfo: string | VariableInfoInterface;
488
508
  getMembers: () => string[];
489
509
  getMembersOptionals: () => boolean[];
510
+ getMemberRangeStarts: () => number[];
490
511
  expression: NodeEstreeIndex;
491
512
  isUnknown(): boolean;
492
513
  isNull(): boolean;
@@ -571,7 +592,8 @@ declare abstract class BasicEvaluatedExpression {
571
592
  identifier: string | VariableInfoInterface,
572
593
  rootInfo: string | VariableInfoInterface,
573
594
  getMembers: () => string[],
574
- getMembersOptionals?: () => boolean[]
595
+ getMembersOptionals?: () => boolean[],
596
+ getMemberRangeStarts?: () => number[]
575
597
  ): BasicEvaluatedExpression;
576
598
 
577
599
  /**
@@ -766,6 +788,7 @@ declare interface CallExpressionInfo {
766
788
  name: string;
767
789
  getMembers: () => string[];
768
790
  getMembersOptionals: () => boolean[];
791
+ getMemberRangeStarts: () => number[];
769
792
  }
770
793
  declare interface CallbackAsyncQueue<T> {
771
794
  (err?: null | WebpackError, result?: T): any;
@@ -1096,9 +1119,9 @@ declare abstract class ChunkGroup {
1096
1119
  removeParent(chunkGroup: ChunkGroup): boolean;
1097
1120
  addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
1098
1121
  get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
1099
- getBlocks(): any[];
1122
+ getBlocks(): AsyncDependenciesBlock[];
1100
1123
  getNumberOfBlocks(): number;
1101
- hasBlock(block?: any): boolean;
1124
+ hasBlock(block: AsyncDependenciesBlock): boolean;
1102
1125
  get blocksIterable(): Iterable<AsyncDependenciesBlock>;
1103
1126
  addBlock(block: AsyncDependenciesBlock): boolean;
1104
1127
  addOrigin(module: Module, loc: DependencyLocation, request: string): void;
@@ -1167,14 +1190,35 @@ declare interface ChunkMaps {
1167
1190
  name: Record<string | number, string>;
1168
1191
  }
1169
1192
  declare class ChunkModuleIdRangePlugin {
1170
- constructor(options?: any);
1171
- options: any;
1193
+ constructor(options: ChunkModuleIdRangePluginOptions);
1194
+ options: ChunkModuleIdRangePluginOptions;
1172
1195
 
1173
1196
  /**
1174
1197
  * Apply the plugin
1175
1198
  */
1176
1199
  apply(compiler: Compiler): void;
1177
1200
  }
1201
+ declare interface ChunkModuleIdRangePluginOptions {
1202
+ /**
1203
+ * the chunk name
1204
+ */
1205
+ name: string;
1206
+
1207
+ /**
1208
+ * order
1209
+ */
1210
+ order?: "index" | "index2" | "preOrderIndex" | "postOrderIndex";
1211
+
1212
+ /**
1213
+ * start id
1214
+ */
1215
+ start?: number;
1216
+
1217
+ /**
1218
+ * end id
1219
+ */
1220
+ end?: number;
1221
+ }
1178
1222
  declare interface ChunkModuleMaps {
1179
1223
  id: Record<string | number, (string | number)[]>;
1180
1224
  hash: Record<string | number, string>;
@@ -1472,7 +1516,7 @@ declare class Compilation {
1472
1516
  any
1473
1517
  >;
1474
1518
  afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
1475
- shouldRecord: SyncBailHook<[], boolean>;
1519
+ shouldRecord: SyncBailHook<[], undefined | boolean>;
1476
1520
  additionalChunkRuntimeRequirements: SyncHook<
1477
1521
  [Chunk, Set<string>, RuntimeRequirementsContext]
1478
1522
  >;
@@ -1980,8 +2024,8 @@ declare interface CompilationHooksJavascriptModulesPlugin {
1980
2024
  [Module, RenderBootstrapContext],
1981
2025
  string
1982
2026
  >;
1983
- embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string>;
1984
- strictRuntimeBailout: SyncBailHook<[RenderContext], string>;
2027
+ embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string | void>;
2028
+ strictRuntimeBailout: SyncBailHook<[RenderContext], string | void>;
1985
2029
  chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
1986
2030
  useSourceMap: SyncBailHook<[Chunk, RenderContext], boolean>;
1987
2031
  }
@@ -1996,7 +2040,7 @@ declare class Compiler {
1996
2040
  constructor(context: string, options?: WebpackOptionsNormalized);
1997
2041
  hooks: Readonly<{
1998
2042
  initialize: SyncHook<[]>;
1999
- shouldEmit: SyncBailHook<[Compilation], boolean>;
2043
+ shouldEmit: SyncBailHook<[Compilation], undefined | boolean>;
2000
2044
  done: AsyncSeriesHook<[Stats]>;
2001
2045
  afterDone: SyncHook<[Stats]>;
2002
2046
  additionalPass: AsyncSeriesHook<[]>;
@@ -2882,73 +2926,65 @@ declare abstract class DependencyTemplates {
2882
2926
  clone(): DependencyTemplates;
2883
2927
  }
2884
2928
  declare class DeterministicChunkIdsPlugin {
2885
- constructor(options?: any);
2886
- options: any;
2929
+ constructor(options?: DeterministicChunkIdsPluginOptions);
2930
+ options: DeterministicChunkIdsPluginOptions;
2887
2931
 
2888
2932
  /**
2889
2933
  * Apply the plugin
2890
2934
  */
2891
2935
  apply(compiler: Compiler): void;
2892
2936
  }
2937
+ declare interface DeterministicChunkIdsPluginOptions {
2938
+ /**
2939
+ * context for ids
2940
+ */
2941
+ context?: string;
2942
+
2943
+ /**
2944
+ * maximum length of ids
2945
+ */
2946
+ maxLength?: number;
2947
+ }
2893
2948
  declare class DeterministicModuleIdsPlugin {
2894
- constructor(options?: {
2895
- /**
2896
- * context relative to which module identifiers are computed
2897
- */
2898
- context?: string;
2899
- /**
2900
- * selector function for modules
2901
- */
2902
- test?: (arg0: Module) => boolean;
2903
- /**
2904
- * maximum id length in digits (used as starting point)
2905
- */
2906
- maxLength?: number;
2907
- /**
2908
- * hash salt for ids
2909
- */
2910
- salt?: number;
2911
- /**
2912
- * do not increase the maxLength to find an optimal id space size
2913
- */
2914
- fixedLength?: boolean;
2915
- /**
2916
- * throw an error when id conflicts occur (instead of rehashing)
2917
- */
2918
- failOnConflict?: boolean;
2919
- });
2920
- options: {
2921
- /**
2922
- * context relative to which module identifiers are computed
2923
- */
2924
- context?: string;
2925
- /**
2926
- * selector function for modules
2927
- */
2928
- test?: (arg0: Module) => boolean;
2929
- /**
2930
- * maximum id length in digits (used as starting point)
2931
- */
2932
- maxLength?: number;
2933
- /**
2934
- * hash salt for ids
2935
- */
2936
- salt?: number;
2937
- /**
2938
- * do not increase the maxLength to find an optimal id space size
2939
- */
2940
- fixedLength?: boolean;
2941
- /**
2942
- * throw an error when id conflicts occur (instead of rehashing)
2943
- */
2944
- failOnConflict?: boolean;
2945
- };
2949
+ constructor(options?: DeterministicModuleIdsPluginOptions);
2950
+ options: DeterministicModuleIdsPluginOptions;
2946
2951
 
2947
2952
  /**
2948
2953
  * Apply the plugin
2949
2954
  */
2950
2955
  apply(compiler: Compiler): void;
2951
2956
  }
2957
+ declare interface DeterministicModuleIdsPluginOptions {
2958
+ /**
2959
+ * context relative to which module identifiers are computed
2960
+ */
2961
+ context?: string;
2962
+
2963
+ /**
2964
+ * selector function for modules
2965
+ */
2966
+ test?: (arg0: Module) => boolean;
2967
+
2968
+ /**
2969
+ * maximum id length in digits (used as starting point)
2970
+ */
2971
+ maxLength?: number;
2972
+
2973
+ /**
2974
+ * hash salt for ids
2975
+ */
2976
+ salt?: number;
2977
+
2978
+ /**
2979
+ * do not increase the maxLength to find an optimal id space size
2980
+ */
2981
+ fixedLength?: boolean;
2982
+
2983
+ /**
2984
+ * throw an error when id conflicts occur (instead of rehashing)
2985
+ */
2986
+ failOnConflict?: boolean;
2987
+ }
2952
2988
 
2953
2989
  /**
2954
2990
  * Options for the webpack-dev-server.
@@ -3481,11 +3517,21 @@ declare interface Environment {
3481
3517
  */
3482
3518
  dynamicImport?: boolean;
3483
3519
 
3520
+ /**
3521
+ * The environment supports an async import() is available when creating a worker.
3522
+ */
3523
+ dynamicImportInWorker?: boolean;
3524
+
3484
3525
  /**
3485
3526
  * The environment supports 'for of' iteration ('for (const x of array) { ... }').
3486
3527
  */
3487
3528
  forOf?: boolean;
3488
3529
 
3530
+ /**
3531
+ * The environment supports 'globalThis'.
3532
+ */
3533
+ globalThis?: boolean;
3534
+
3489
3535
  /**
3490
3536
  * The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
3491
3537
  */
@@ -3945,6 +3991,7 @@ declare interface ExpressionExpressionInfo {
3945
3991
  name: string;
3946
3992
  getMembers: () => string[];
3947
3993
  getMembersOptionals: () => boolean[];
3994
+ getMemberRangeStarts: () => number[];
3948
3995
  }
3949
3996
  declare interface ExtensionAliasOption {
3950
3997
  alias: string | string[];
@@ -4158,14 +4205,20 @@ declare class FetchCompileAsyncWasmPlugin {
4158
4205
  apply(compiler: Compiler): void;
4159
4206
  }
4160
4207
  declare class FetchCompileWasmPlugin {
4161
- constructor(options?: any);
4162
- options: any;
4208
+ constructor(options?: FetchCompileWasmPluginOptions);
4209
+ options: FetchCompileWasmPluginOptions;
4163
4210
 
4164
4211
  /**
4165
4212
  * Apply the plugin
4166
4213
  */
4167
4214
  apply(compiler: Compiler): void;
4168
4215
  }
4216
+ declare interface FetchCompileWasmPluginOptions {
4217
+ /**
4218
+ * mangle imports
4219
+ */
4220
+ mangleImports?: boolean;
4221
+ }
4169
4222
 
4170
4223
  /**
4171
4224
  * Options object for persistent file-based caching.
@@ -4251,6 +4304,11 @@ declare interface FileCacheOptions {
4251
4304
  */
4252
4305
  profile?: boolean;
4253
4306
 
4307
+ /**
4308
+ * Enable/disable readonly mode.
4309
+ */
4310
+ readonly?: boolean;
4311
+
4254
4312
  /**
4255
4313
  * When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
4256
4314
  */
@@ -4287,17 +4345,18 @@ declare interface FileSystem {
4287
4345
  | "binary"
4288
4346
  | ((
4289
4347
  arg0?: null | NodeJS.ErrnoException,
4290
- arg1?: any[] | (string | Buffer)[]
4348
+ arg1?: (string | Buffer)[] | (typeof Dirent)[]
4291
4349
  ) => void)
4292
4350
  | ReaddirOptions
4293
4351
  | "utf-8"
4294
4352
  | "ucs-2"
4295
4353
  | "base64"
4354
+ | "base64url"
4296
4355
  | "hex"
4297
4356
  | "buffer",
4298
4357
  arg2?: (
4299
4358
  arg0?: null | NodeJS.ErrnoException,
4300
- arg1?: any[] | (string | Buffer)[]
4359
+ arg1?: (string | Buffer)[] | (typeof Dirent)[]
4301
4360
  ) => void
4302
4361
  ) => void;
4303
4362
  readJson?: {
@@ -4618,11 +4677,7 @@ declare interface HandleModuleCreationOptions {
4618
4677
  connectOrigin?: boolean;
4619
4678
  }
4620
4679
  declare class HarmonyImportDependency extends ModuleDependency {
4621
- constructor(
4622
- request: string,
4623
- sourceOrder: number,
4624
- assertions?: Record<string, any>
4625
- );
4680
+ constructor(request: string, sourceOrder: number, assertions?: Assertions);
4626
4681
  sourceOrder: number;
4627
4682
  getImportVar(moduleGraph: ModuleGraph): string;
4628
4683
  getImportStatement(
@@ -4672,7 +4727,11 @@ declare interface HashableObject {
4672
4727
  declare class HashedModuleIdsPlugin {
4673
4728
  constructor(options?: HashedModuleIdsPluginOptions);
4674
4729
  options: HashedModuleIdsPluginOptions;
4675
- apply(compiler?: any): void;
4730
+
4731
+ /**
4732
+ * Apply the plugin
4733
+ */
4734
+ apply(compiler: Compiler): void;
4676
4735
  }
4677
4736
  declare interface HashedModuleIdsPluginOptions {
4678
4737
  /**
@@ -5209,7 +5268,7 @@ declare class JavascriptParser extends Parser {
5209
5268
  >;
5210
5269
  classBodyElement: SyncBailHook<
5211
5270
  [
5212
- MethodDefinition | PropertyDefinition,
5271
+ StaticBlock | MethodDefinition | PropertyDefinition,
5213
5272
  ClassExpression | ClassDeclaration
5214
5273
  ],
5215
5274
  boolean | void
@@ -5280,11 +5339,14 @@ declare class JavascriptParser extends Parser {
5280
5339
  SyncBailHook<[AssignmentExpression, string[]], boolean | void>
5281
5340
  >;
5282
5341
  typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
5283
- importCall: SyncBailHook<[Expression], boolean | void>;
5342
+ importCall: SyncBailHook<[ImportExpression], boolean | void>;
5284
5343
  topLevelAwait: SyncBailHook<[Expression], boolean | void>;
5285
- call: HookMap<SyncBailHook<[Expression], boolean | void>>;
5344
+ call: HookMap<SyncBailHook<[BaseCallExpression], boolean | void>>;
5286
5345
  callMemberChain: HookMap<
5287
- SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
5346
+ SyncBailHook<
5347
+ [CallExpression, string[], boolean[], number[]],
5348
+ boolean | void
5349
+ >
5288
5350
  >;
5289
5351
  memberChainOfCallMemberChain: HookMap<
5290
5352
  SyncBailHook<
@@ -5303,7 +5365,7 @@ declare class JavascriptParser extends Parser {
5303
5365
  binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
5304
5366
  expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
5305
5367
  expressionMemberChain: HookMap<
5306
- SyncBailHook<[Expression, string[], boolean[]], boolean | void>
5368
+ SyncBailHook<[Expression, string[], boolean[], number[]], boolean | void>
5307
5369
  >;
5308
5370
  unhandledExpressionMemberChain: HookMap<
5309
5371
  SyncBailHook<[Expression, string[]], boolean | void>
@@ -5368,21 +5430,267 @@ declare class JavascriptParser extends Parser {
5368
5430
  | ForStatement
5369
5431
  | ForInStatement
5370
5432
  | ForOfStatement
5433
+ | ImportDeclaration
5434
+ | ExportNamedDeclaration
5435
+ | ExportDefaultDeclaration
5436
+ | ExportAllDeclaration
5371
5437
  )[];
5372
- prevStatement: any;
5438
+ prevStatement:
5439
+ | UnaryExpression
5440
+ | ArrayExpression
5441
+ | ArrowFunctionExpression
5442
+ | AssignmentExpression
5443
+ | AwaitExpression
5444
+ | BinaryExpression
5445
+ | SimpleCallExpression
5446
+ | NewExpression
5447
+ | ChainExpression
5448
+ | ClassExpression
5449
+ | ConditionalExpression
5450
+ | FunctionExpression
5451
+ | Identifier
5452
+ | ImportExpression
5453
+ | SimpleLiteral
5454
+ | RegExpLiteral
5455
+ | BigIntLiteral
5456
+ | LogicalExpression
5457
+ | MemberExpression
5458
+ | MetaProperty
5459
+ | ObjectExpression
5460
+ | SequenceExpression
5461
+ | TaggedTemplateExpression
5462
+ | TemplateLiteral
5463
+ | ThisExpression
5464
+ | UpdateExpression
5465
+ | YieldExpression
5466
+ | FunctionDeclaration
5467
+ | VariableDeclaration
5468
+ | ClassDeclaration
5469
+ | ExpressionStatement
5470
+ | BlockStatement
5471
+ | StaticBlock
5472
+ | EmptyStatement
5473
+ | DebuggerStatement
5474
+ | WithStatement
5475
+ | ReturnStatement
5476
+ | LabeledStatement
5477
+ | BreakStatement
5478
+ | ContinueStatement
5479
+ | IfStatement
5480
+ | SwitchStatement
5481
+ | ThrowStatement
5482
+ | TryStatement
5483
+ | WhileStatement
5484
+ | DoWhileStatement
5485
+ | ForStatement
5486
+ | ForInStatement
5487
+ | ForOfStatement
5488
+ | ImportDeclaration
5489
+ | ExportNamedDeclaration
5490
+ | ExportDefaultDeclaration
5491
+ | ExportAllDeclaration;
5373
5492
  destructuringAssignmentProperties: WeakMap<Expression, Set<string>>;
5374
5493
  currentTagData: any;
5375
5494
  destructuringAssignmentPropertiesFor(
5376
5495
  node: Expression
5377
5496
  ): undefined | Set<string>;
5378
- getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
5497
+ getRenameIdentifier(
5498
+ expr: Expression
5499
+ ): undefined | string | VariableInfoInterface;
5379
5500
  walkClass(classy: ClassExpression | ClassDeclaration): void;
5380
- preWalkStatements(statements?: any): void;
5381
- blockPreWalkStatements(statements?: any): void;
5382
- walkStatements(statements?: any): void;
5383
- preWalkStatement(statement?: any): void;
5384
- blockPreWalkStatement(statement?: any): void;
5385
- walkStatement(statement?: any): void;
5501
+
5502
+ /**
5503
+ * Pre walking iterates the scope for variable declarations
5504
+ */
5505
+ preWalkStatements(
5506
+ statements: (
5507
+ | FunctionDeclaration
5508
+ | VariableDeclaration
5509
+ | ClassDeclaration
5510
+ | ExpressionStatement
5511
+ | BlockStatement
5512
+ | StaticBlock
5513
+ | EmptyStatement
5514
+ | DebuggerStatement
5515
+ | WithStatement
5516
+ | ReturnStatement
5517
+ | LabeledStatement
5518
+ | BreakStatement
5519
+ | ContinueStatement
5520
+ | IfStatement
5521
+ | SwitchStatement
5522
+ | ThrowStatement
5523
+ | TryStatement
5524
+ | WhileStatement
5525
+ | DoWhileStatement
5526
+ | ForStatement
5527
+ | ForInStatement
5528
+ | ForOfStatement
5529
+ | ImportDeclaration
5530
+ | ExportNamedDeclaration
5531
+ | ExportDefaultDeclaration
5532
+ | ExportAllDeclaration
5533
+ )[]
5534
+ ): void;
5535
+
5536
+ /**
5537
+ * Block pre walking iterates the scope for block variable declarations
5538
+ */
5539
+ blockPreWalkStatements(
5540
+ statements: (
5541
+ | FunctionDeclaration
5542
+ | VariableDeclaration
5543
+ | ClassDeclaration
5544
+ | ExpressionStatement
5545
+ | BlockStatement
5546
+ | StaticBlock
5547
+ | EmptyStatement
5548
+ | DebuggerStatement
5549
+ | WithStatement
5550
+ | ReturnStatement
5551
+ | LabeledStatement
5552
+ | BreakStatement
5553
+ | ContinueStatement
5554
+ | IfStatement
5555
+ | SwitchStatement
5556
+ | ThrowStatement
5557
+ | TryStatement
5558
+ | WhileStatement
5559
+ | DoWhileStatement
5560
+ | ForStatement
5561
+ | ForInStatement
5562
+ | ForOfStatement
5563
+ | ImportDeclaration
5564
+ | ExportNamedDeclaration
5565
+ | ExportDefaultDeclaration
5566
+ | ExportAllDeclaration
5567
+ )[]
5568
+ ): void;
5569
+
5570
+ /**
5571
+ * Walking iterates the statements and expressions and processes them
5572
+ */
5573
+ walkStatements(
5574
+ statements: (
5575
+ | FunctionDeclaration
5576
+ | VariableDeclaration
5577
+ | ClassDeclaration
5578
+ | ExpressionStatement
5579
+ | BlockStatement
5580
+ | StaticBlock
5581
+ | EmptyStatement
5582
+ | DebuggerStatement
5583
+ | WithStatement
5584
+ | ReturnStatement
5585
+ | LabeledStatement
5586
+ | BreakStatement
5587
+ | ContinueStatement
5588
+ | IfStatement
5589
+ | SwitchStatement
5590
+ | ThrowStatement
5591
+ | TryStatement
5592
+ | WhileStatement
5593
+ | DoWhileStatement
5594
+ | ForStatement
5595
+ | ForInStatement
5596
+ | ForOfStatement
5597
+ | ImportDeclaration
5598
+ | ExportNamedDeclaration
5599
+ | ExportDefaultDeclaration
5600
+ | ExportAllDeclaration
5601
+ )[]
5602
+ ): void;
5603
+
5604
+ /**
5605
+ * Walking iterates the statements and expressions and processes them
5606
+ */
5607
+ preWalkStatement(
5608
+ statement:
5609
+ | FunctionDeclaration
5610
+ | VariableDeclaration
5611
+ | ClassDeclaration
5612
+ | ExpressionStatement
5613
+ | BlockStatement
5614
+ | StaticBlock
5615
+ | EmptyStatement
5616
+ | DebuggerStatement
5617
+ | WithStatement
5618
+ | ReturnStatement
5619
+ | LabeledStatement
5620
+ | BreakStatement
5621
+ | ContinueStatement
5622
+ | IfStatement
5623
+ | SwitchStatement
5624
+ | ThrowStatement
5625
+ | TryStatement
5626
+ | WhileStatement
5627
+ | DoWhileStatement
5628
+ | ForStatement
5629
+ | ForInStatement
5630
+ | ForOfStatement
5631
+ | ImportDeclaration
5632
+ | ExportNamedDeclaration
5633
+ | ExportDefaultDeclaration
5634
+ | ExportAllDeclaration
5635
+ ): void;
5636
+ blockPreWalkStatement(
5637
+ statement:
5638
+ | FunctionDeclaration
5639
+ | VariableDeclaration
5640
+ | ClassDeclaration
5641
+ | ExpressionStatement
5642
+ | BlockStatement
5643
+ | StaticBlock
5644
+ | EmptyStatement
5645
+ | DebuggerStatement
5646
+ | WithStatement
5647
+ | ReturnStatement
5648
+ | LabeledStatement
5649
+ | BreakStatement
5650
+ | ContinueStatement
5651
+ | IfStatement
5652
+ | SwitchStatement
5653
+ | ThrowStatement
5654
+ | TryStatement
5655
+ | WhileStatement
5656
+ | DoWhileStatement
5657
+ | ForStatement
5658
+ | ForInStatement
5659
+ | ForOfStatement
5660
+ | ImportDeclaration
5661
+ | ExportNamedDeclaration
5662
+ | ExportDefaultDeclaration
5663
+ | ExportAllDeclaration
5664
+ ): void;
5665
+ walkStatement(
5666
+ statement:
5667
+ | FunctionDeclaration
5668
+ | VariableDeclaration
5669
+ | ClassDeclaration
5670
+ | ExpressionStatement
5671
+ | BlockStatement
5672
+ | StaticBlock
5673
+ | EmptyStatement
5674
+ | DebuggerStatement
5675
+ | WithStatement
5676
+ | ReturnStatement
5677
+ | LabeledStatement
5678
+ | BreakStatement
5679
+ | ContinueStatement
5680
+ | IfStatement
5681
+ | SwitchStatement
5682
+ | ThrowStatement
5683
+ | TryStatement
5684
+ | WhileStatement
5685
+ | DoWhileStatement
5686
+ | ForStatement
5687
+ | ForInStatement
5688
+ | ForOfStatement
5689
+ | ImportDeclaration
5690
+ | ExportNamedDeclaration
5691
+ | ExportDefaultDeclaration
5692
+ | ExportAllDeclaration
5693
+ ): void;
5386
5694
 
5387
5695
  /**
5388
5696
  * Walks a statements that is nested within a parent statement
@@ -5390,84 +5698,118 @@ declare class JavascriptParser extends Parser {
5390
5698
  * This enforces the nested statement to never be in ASI position.
5391
5699
  */
5392
5700
  walkNestedStatement(statement: Statement): void;
5393
- preWalkBlockStatement(statement?: any): void;
5394
- walkBlockStatement(statement?: any): void;
5395
- walkExpressionStatement(statement?: any): void;
5396
- preWalkIfStatement(statement?: any): void;
5397
- walkIfStatement(statement?: any): void;
5398
- preWalkLabeledStatement(statement?: any): void;
5399
- walkLabeledStatement(statement?: any): void;
5400
- preWalkWithStatement(statement?: any): void;
5401
- walkWithStatement(statement?: any): void;
5402
- preWalkSwitchStatement(statement?: any): void;
5403
- walkSwitchStatement(statement?: any): void;
5404
- walkTerminatingStatement(statement?: any): void;
5405
- walkReturnStatement(statement?: any): void;
5406
- walkThrowStatement(statement?: any): void;
5407
- preWalkTryStatement(statement?: any): void;
5408
- walkTryStatement(statement?: any): void;
5409
- preWalkWhileStatement(statement?: any): void;
5410
- walkWhileStatement(statement?: any): void;
5411
- preWalkDoWhileStatement(statement?: any): void;
5412
- walkDoWhileStatement(statement?: any): void;
5413
- preWalkForStatement(statement?: any): void;
5414
- walkForStatement(statement?: any): void;
5415
- preWalkForInStatement(statement?: any): void;
5416
- walkForInStatement(statement?: any): void;
5701
+ preWalkBlockStatement(statement: BlockStatement): void;
5702
+ walkBlockStatement(statement: BlockStatement): void;
5703
+ walkExpressionStatement(statement: ExpressionStatement): void;
5704
+ preWalkIfStatement(statement: IfStatement): void;
5705
+ walkIfStatement(statement: IfStatement): void;
5706
+ preWalkLabeledStatement(statement: LabeledStatement): void;
5707
+ walkLabeledStatement(statement: LabeledStatement): void;
5708
+ preWalkWithStatement(statement: WithStatement): void;
5709
+ walkWithStatement(statement: WithStatement): void;
5710
+ preWalkSwitchStatement(statement: SwitchStatement): void;
5711
+ walkSwitchStatement(statement: SwitchStatement): void;
5712
+ walkTerminatingStatement(statement: ReturnStatement | ThrowStatement): void;
5713
+ walkReturnStatement(statement: ReturnStatement): void;
5714
+ walkThrowStatement(statement: ThrowStatement): void;
5715
+ preWalkTryStatement(statement: TryStatement): void;
5716
+ walkTryStatement(statement: TryStatement): void;
5717
+ preWalkWhileStatement(statement: WhileStatement): void;
5718
+ walkWhileStatement(statement: WhileStatement): void;
5719
+ preWalkDoWhileStatement(statement: DoWhileStatement): void;
5720
+ walkDoWhileStatement(statement: DoWhileStatement): void;
5721
+ preWalkForStatement(statement: ForStatement): void;
5722
+ walkForStatement(statement: ForStatement): void;
5723
+ preWalkForInStatement(statement: ForInStatement): void;
5724
+ walkForInStatement(statement: ForInStatement): void;
5417
5725
  preWalkForOfStatement(statement?: any): void;
5418
- walkForOfStatement(statement?: any): void;
5419
- preWalkFunctionDeclaration(statement?: any): void;
5420
- walkFunctionDeclaration(statement?: any): void;
5421
- blockPreWalkExpressionStatement(statement?: any): void;
5422
- preWalkAssignmentExpression(expression?: any): void;
5726
+ walkForOfStatement(statement: ForOfStatement): void;
5727
+ preWalkFunctionDeclaration(statement: FunctionDeclaration): void;
5728
+ walkFunctionDeclaration(statement: FunctionDeclaration): void;
5729
+ blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
5730
+ preWalkAssignmentExpression(expression: AssignmentExpression): void;
5423
5731
  blockPreWalkImportDeclaration(statement?: any): void;
5424
5732
  enterDeclaration(declaration?: any, onIdent?: any): void;
5425
5733
  blockPreWalkExportNamedDeclaration(statement?: any): void;
5426
- walkExportNamedDeclaration(statement?: any): void;
5734
+ walkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
5427
5735
  blockPreWalkExportDefaultDeclaration(statement?: any): void;
5428
5736
  walkExportDefaultDeclaration(statement?: any): void;
5429
5737
  blockPreWalkExportAllDeclaration(statement?: any): void;
5430
- preWalkVariableDeclaration(statement?: any): void;
5431
- blockPreWalkVariableDeclaration(statement?: any): void;
5432
- preWalkVariableDeclarator(declarator?: any): void;
5433
- walkVariableDeclaration(statement?: any): void;
5434
- blockPreWalkClassDeclaration(statement?: any): void;
5435
- walkClassDeclaration(statement?: any): void;
5436
- preWalkSwitchCases(switchCases?: any): void;
5437
- walkSwitchCases(switchCases?: any): void;
5438
- preWalkCatchClause(catchClause?: any): void;
5439
- walkCatchClause(catchClause?: any): void;
5440
- walkPattern(pattern?: any): void;
5441
- walkAssignmentPattern(pattern?: any): void;
5738
+ preWalkVariableDeclaration(statement: VariableDeclaration): void;
5739
+ blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
5740
+ preWalkVariableDeclarator(declarator: VariableDeclarator): void;
5741
+ walkVariableDeclaration(statement: VariableDeclaration): void;
5742
+ blockPreWalkClassDeclaration(statement: ClassDeclaration): void;
5743
+ walkClassDeclaration(statement: ClassDeclaration): void;
5744
+ preWalkSwitchCases(switchCases: SwitchCase[]): void;
5745
+ walkSwitchCases(switchCases: SwitchCase[]): void;
5746
+ preWalkCatchClause(catchClause: CatchClause): void;
5747
+ walkCatchClause(catchClause: CatchClause): void;
5748
+ walkPattern(pattern: Pattern): void;
5749
+ walkAssignmentPattern(pattern: AssignmentPattern): void;
5442
5750
  walkObjectPattern(pattern?: any): void;
5443
- walkArrayPattern(pattern?: any): void;
5444
- walkRestElement(pattern?: any): void;
5445
- walkExpressions(expressions?: any): void;
5751
+ walkArrayPattern(pattern: ArrayPattern): void;
5752
+ walkRestElement(pattern: RestElement): void;
5753
+ walkExpressions(
5754
+ expressions: (
5755
+ | null
5756
+ | UnaryExpression
5757
+ | ArrayExpression
5758
+ | ArrowFunctionExpression
5759
+ | AssignmentExpression
5760
+ | AwaitExpression
5761
+ | BinaryExpression
5762
+ | SimpleCallExpression
5763
+ | NewExpression
5764
+ | ChainExpression
5765
+ | ClassExpression
5766
+ | ConditionalExpression
5767
+ | FunctionExpression
5768
+ | Identifier
5769
+ | ImportExpression
5770
+ | SimpleLiteral
5771
+ | RegExpLiteral
5772
+ | BigIntLiteral
5773
+ | LogicalExpression
5774
+ | MemberExpression
5775
+ | MetaProperty
5776
+ | ObjectExpression
5777
+ | SequenceExpression
5778
+ | TaggedTemplateExpression
5779
+ | TemplateLiteral
5780
+ | ThisExpression
5781
+ | UpdateExpression
5782
+ | YieldExpression
5783
+ | SpreadElement
5784
+ )[]
5785
+ ): void;
5446
5786
  walkExpression(expression?: any): void;
5447
- walkAwaitExpression(expression?: any): void;
5448
- walkArrayExpression(expression?: any): void;
5449
- walkSpreadElement(expression?: any): void;
5450
- walkObjectExpression(expression?: any): void;
5451
- walkProperty(prop?: any): void;
5452
- walkFunctionExpression(expression?: any): void;
5453
- walkArrowFunctionExpression(expression?: any): void;
5787
+ walkAwaitExpression(expression: AwaitExpression): void;
5788
+ walkArrayExpression(expression: ArrayExpression): void;
5789
+ walkSpreadElement(expression: SpreadElement): void;
5790
+ walkObjectExpression(expression: ObjectExpression): void;
5791
+ walkProperty(prop: SpreadElement | Property): void;
5792
+ walkFunctionExpression(expression: FunctionExpression): void;
5793
+ walkArrowFunctionExpression(expression: ArrowFunctionExpression): void;
5454
5794
  walkSequenceExpression(expression: SequenceExpression): void;
5455
- walkUpdateExpression(expression?: any): void;
5456
- walkUnaryExpression(expression?: any): void;
5457
- walkLeftRightExpression(expression?: any): void;
5458
- walkBinaryExpression(expression?: any): void;
5459
- walkLogicalExpression(expression?: any): void;
5460
- walkAssignmentExpression(expression?: any): void;
5461
- walkConditionalExpression(expression?: any): void;
5462
- walkNewExpression(expression?: any): void;
5463
- walkYieldExpression(expression?: any): void;
5464
- walkTemplateLiteral(expression?: any): void;
5465
- walkTaggedTemplateExpression(expression?: any): void;
5466
- walkClassExpression(expression?: any): void;
5795
+ walkUpdateExpression(expression: UpdateExpression): void;
5796
+ walkUnaryExpression(expression: UnaryExpression): void;
5797
+ walkLeftRightExpression(
5798
+ expression: BinaryExpression | LogicalExpression
5799
+ ): void;
5800
+ walkBinaryExpression(expression: BinaryExpression): void;
5801
+ walkLogicalExpression(expression: LogicalExpression): void;
5802
+ walkAssignmentExpression(expression: AssignmentExpression): void;
5803
+ walkConditionalExpression(expression: ConditionalExpression): void;
5804
+ walkNewExpression(expression: NewExpression): void;
5805
+ walkYieldExpression(expression: YieldExpression): void;
5806
+ walkTemplateLiteral(expression: TemplateLiteral): void;
5807
+ walkTaggedTemplateExpression(expression: TaggedTemplateExpression): void;
5808
+ walkClassExpression(expression: ClassExpression): void;
5467
5809
  walkChainExpression(expression: ChainExpression): void;
5468
- walkImportExpression(expression?: any): void;
5810
+ walkImportExpression(expression: ImportExpression): void;
5469
5811
  walkCallExpression(expression?: any): void;
5470
- walkMemberExpression(expression?: any): void;
5812
+ walkMemberExpression(expression: MemberExpression): void;
5471
5813
  walkMemberExpressionWithExpressionName(
5472
5814
  expression?: any,
5473
5815
  name?: any,
@@ -5475,8 +5817,8 @@ declare class JavascriptParser extends Parser {
5475
5817
  members?: any,
5476
5818
  onUnhandled?: any
5477
5819
  ): void;
5478
- walkThisExpression(expression?: any): void;
5479
- walkIdentifier(expression?: any): void;
5820
+ walkThisExpression(expression: ThisExpression): void;
5821
+ walkIdentifier(expression: Identifier): void;
5480
5822
  walkMetaProperty(metaProperty: MetaProperty): void;
5481
5823
  callHooksForExpression(hookMap: any, expr: any, ...args: any[]): any;
5482
5824
  callHooksForExpressionWithFallback<T, R>(
@@ -5515,18 +5857,19 @@ declare class JavascriptParser extends Parser {
5515
5857
  ...args: AsArray<T>
5516
5858
  ): R;
5517
5859
  inScope(params: any, fn: () => void): void;
5860
+ inClassScope(hasThis?: any, params?: any, fn?: any): void;
5518
5861
  inFunctionScope(hasThis?: any, params?: any, fn?: any): void;
5519
5862
  inBlockScope(fn?: any): void;
5520
5863
  detectMode(statements?: any): void;
5521
5864
  enterPatterns(patterns?: any, onIdent?: any): void;
5522
5865
  enterPattern(pattern?: any, onIdent?: any): void;
5523
- enterIdentifier(pattern?: any, onIdent?: any): void;
5524
- enterObjectPattern(pattern?: any, onIdent?: any): void;
5525
- enterArrayPattern(pattern?: any, onIdent?: any): void;
5526
- enterRestElement(pattern?: any, onIdent?: any): void;
5527
- enterAssignmentPattern(pattern?: any, onIdent?: any): void;
5866
+ enterIdentifier(pattern: Identifier, onIdent?: any): void;
5867
+ enterObjectPattern(pattern: ObjectPattern, onIdent?: any): void;
5868
+ enterArrayPattern(pattern: ArrayPattern, onIdent?: any): void;
5869
+ enterRestElement(pattern: RestElement, onIdent?: any): void;
5870
+ enterAssignmentPattern(pattern: AssignmentPattern, onIdent?: any): void;
5528
5871
  evaluateExpression(expression: Expression): BasicEvaluatedExpression;
5529
- parseString(expression?: any): any;
5872
+ parseString(expression: Expression): string;
5530
5873
  parseCalculatedString(expression?: any): any;
5531
5874
  evaluate(source: string): BasicEvaluatedExpression;
5532
5875
  isPure(
@@ -5566,21 +5909,19 @@ declare class JavascriptParser extends Parser {
5566
5909
  | PrivateIdentifier,
5567
5910
  commentsStartPos: number
5568
5911
  ): boolean;
5569
- getComments(range?: any): any[];
5912
+ getComments(range: [number, number]): any[];
5570
5913
  isAsiPosition(pos: number): boolean;
5571
5914
  unsetAsiPosition(pos: number): void;
5572
5915
  isStatementLevelExpression(expr?: any): boolean;
5573
5916
  getTagData(name?: any, tag?: any): any;
5574
5917
  tagVariable(name?: any, tag?: any, data?: any): void;
5575
- defineVariable(name?: any): void;
5576
- undefineVariable(name?: any): void;
5577
- isVariableDefined(name?: any): boolean;
5918
+ defineVariable(name: string): void;
5919
+ undefineVariable(name: string): void;
5920
+ isVariableDefined(name: string): boolean;
5578
5921
  getVariableInfo(name: string): ExportedVariableInfo;
5579
5922
  setVariable(name: string, variableInfo: ExportedVariableInfo): void;
5580
- evaluatedVariable(tagInfo?: any): VariableInfo;
5581
- parseCommentOptions(
5582
- range?: any
5583
- ): { options: null; errors: null } | { options: object; errors: unknown[] };
5923
+ evaluatedVariable(tagInfo: TagInfo): VariableInfo;
5924
+ parseCommentOptions(range: [number, number]): any;
5584
5925
  extractMemberExpressionChain(expression: MemberExpression): {
5585
5926
  members: string[];
5586
5927
  object:
@@ -5613,6 +5954,7 @@ declare class JavascriptParser extends Parser {
5613
5954
  | YieldExpression
5614
5955
  | Super;
5615
5956
  membersOptionals: boolean[];
5957
+ memberRangeStarts: number[];
5616
5958
  };
5617
5959
  getFreeInfoFromVariable(varName: string): {
5618
5960
  name: string;
@@ -5818,8 +6160,19 @@ declare interface JavascriptParserOptions {
5818
6160
  */
5819
6161
  wrappedContextRegExp?: RegExp;
5820
6162
  }
6163
+ type JsonObject = { [index: string]: JsonValue } & {
6164
+ [index: string]:
6165
+ | undefined
6166
+ | null
6167
+ | string
6168
+ | number
6169
+ | boolean
6170
+ | JsonObject
6171
+ | JsonValue[];
6172
+ };
6173
+ type JsonValue = null | string | number | boolean | JsonObject | JsonValue[];
5821
6174
  declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
5822
- constructor(runtimeRequirements?: any);
6175
+ constructor(runtimeRequirements: Set<string>);
5823
6176
  static getCompilationHooks(
5824
6177
  compilation: Compilation
5825
6178
  ): JsonpCompilationPluginHooks;
@@ -5934,6 +6287,23 @@ declare interface KnownBuildMeta {
5934
6287
  declare interface KnownCreateStatsOptionsContext {
5935
6288
  forToString?: boolean;
5936
6289
  }
6290
+ declare interface KnownHooks {
6291
+ resolveStep: SyncHook<
6292
+ [
6293
+ AsyncSeriesBailHook<
6294
+ [ResolveRequest, ResolveContext],
6295
+ null | ResolveRequest
6296
+ >,
6297
+ ResolveRequest
6298
+ ]
6299
+ >;
6300
+ noResolve: SyncHook<[ResolveRequest, Error]>;
6301
+ resolve: AsyncSeriesBailHook<
6302
+ [ResolveRequest, ResolveContext],
6303
+ null | ResolveRequest
6304
+ >;
6305
+ result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
6306
+ }
5937
6307
  declare interface KnownNormalizedStatsOptions {
5938
6308
  context: string;
5939
6309
  requestShortener: RequestShortener;
@@ -6714,6 +7084,12 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
6714
7084
  * Example: "web"
6715
7085
  */
6716
7086
  target: string;
7087
+
7088
+ /**
7089
+ * Tell what kind of ES-features may be used in the generated runtime-code.
7090
+ * Example: { arrowFunction: true }
7091
+ */
7092
+ environment: Environment;
6717
7093
  }
6718
7094
  declare class LoaderTargetPlugin {
6719
7095
  constructor(target: string);
@@ -6877,64 +7253,18 @@ declare interface MinChunkSizePluginOptions {
6877
7253
  minChunkSize: number;
6878
7254
  }
6879
7255
  declare class Module extends DependenciesBlock {
6880
- constructor(
6881
- type:
6882
- | ""
6883
- | "runtime"
6884
- | "javascript/auto"
6885
- | "javascript/dynamic"
6886
- | "javascript/esm"
6887
- | "json"
6888
- | "webassembly/async"
6889
- | "webassembly/sync"
6890
- | "css"
6891
- | "css/global"
6892
- | "css/module"
6893
- | "asset"
6894
- | "asset/inline"
6895
- | "asset/resource"
6896
- | "asset/source"
6897
- | "asset/raw-data-url"
6898
- | "fallback-module"
6899
- | "remote-module"
6900
- | "provide-module"
6901
- | "consume-shared-module"
6902
- | "lazy-compilation-proxy",
6903
- context?: string,
6904
- layer?: string
6905
- );
6906
- type:
6907
- | ""
6908
- | "runtime"
6909
- | "javascript/auto"
6910
- | "javascript/dynamic"
6911
- | "javascript/esm"
6912
- | "json"
6913
- | "webassembly/async"
6914
- | "webassembly/sync"
6915
- | "css"
6916
- | "css/global"
6917
- | "css/module"
6918
- | "asset"
6919
- | "asset/inline"
6920
- | "asset/resource"
6921
- | "asset/source"
6922
- | "asset/raw-data-url"
6923
- | "fallback-module"
6924
- | "remote-module"
6925
- | "provide-module"
6926
- | "consume-shared-module"
6927
- | "lazy-compilation-proxy";
7256
+ constructor(type: string, context?: null | string, layer?: null | string);
7257
+ type: string;
6928
7258
  context: null | string;
6929
7259
  layer: null | string;
6930
7260
  needId: boolean;
6931
7261
  debugId: number;
6932
- resolveOptions: ResolveOptionsWebpackOptions;
7262
+ resolveOptions?: ResolveOptionsWebpackOptions;
6933
7263
  factoryMeta?: object;
6934
7264
  useSourceMap: boolean;
6935
7265
  useSimpleSourceMap: boolean;
6936
- buildMeta: BuildMeta;
6937
- buildInfo: Record<string, any>;
7266
+ buildMeta?: BuildMeta;
7267
+ buildInfo?: Record<string, any>;
6938
7268
  presentationalDependencies?: Dependency[];
6939
7269
  codeGenerationDependencies?: Dependency[];
6940
7270
  id: string | number;
@@ -6951,9 +7281,9 @@ declare class Module extends DependenciesBlock {
6951
7281
  | ((requestShortener: RequestShortener) => string)
6952
7282
  )[];
6953
7283
  get optional(): boolean;
6954
- addChunk(chunk?: any): boolean;
6955
- removeChunk(chunk?: any): void;
6956
- isInChunk(chunk?: any): boolean;
7284
+ addChunk(chunk: Chunk): boolean;
7285
+ removeChunk(chunk: Chunk): void;
7286
+ isInChunk(chunk: Chunk): boolean;
6957
7287
  isEntryModule(): boolean;
6958
7288
  getChunks(): Chunk[];
6959
7289
  getNumberOfChunks(): number;
@@ -7083,7 +7413,7 @@ declare class ModuleDependency extends Dependency {
7083
7413
  declare abstract class ModuleFactory {
7084
7414
  create(
7085
7415
  data: ModuleFactoryCreateData,
7086
- callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
7416
+ callback: (arg0?: null | Error, arg1?: ModuleFactoryResult) => void
7087
7417
  ): void;
7088
7418
  }
7089
7419
  declare interface ModuleFactoryCreateData {
@@ -7646,24 +7976,41 @@ declare abstract class MultiWatching {
7646
7976
  close(callback: CallbackFunction<void>): void;
7647
7977
  }
7648
7978
  declare class NamedChunkIdsPlugin {
7649
- constructor(options?: any);
7650
- delimiter: any;
7651
- context: any;
7979
+ constructor(options?: NamedChunkIdsPluginOptions);
7980
+ delimiter: string;
7981
+ context?: string;
7652
7982
 
7653
7983
  /**
7654
7984
  * Apply the plugin
7655
7985
  */
7656
7986
  apply(compiler: Compiler): void;
7657
7987
  }
7988
+ declare interface NamedChunkIdsPluginOptions {
7989
+ /**
7990
+ * context
7991
+ */
7992
+ context?: string;
7993
+
7994
+ /**
7995
+ * delimiter
7996
+ */
7997
+ delimiter?: string;
7998
+ }
7658
7999
  declare class NamedModuleIdsPlugin {
7659
- constructor(options?: any);
7660
- options: any;
8000
+ constructor(options?: NamedModuleIdsPluginOptions);
8001
+ options: NamedModuleIdsPluginOptions;
7661
8002
 
7662
8003
  /**
7663
8004
  * Apply the plugin
7664
8005
  */
7665
8006
  apply(compiler: Compiler): void;
7666
8007
  }
8008
+ declare interface NamedModuleIdsPluginOptions {
8009
+ /**
8010
+ * context
8011
+ */
8012
+ context?: string;
8013
+ }
7667
8014
  declare class NaturalModuleIdsPlugin {
7668
8015
  constructor();
7669
8016
 
@@ -7763,21 +8110,21 @@ type NodeEstreeIndex =
7763
8110
  | PropertyDefinition
7764
8111
  | VariableDeclarator
7765
8112
  | Program
7766
- | AssignmentProperty
7767
- | Property
8113
+ | SwitchCase
7768
8114
  | CatchClause
7769
- | ClassBody
7770
- | ImportSpecifier
7771
- | ImportDefaultSpecifier
7772
- | ImportNamespaceSpecifier
7773
- | ExportSpecifier
7774
8115
  | ObjectPattern
7775
8116
  | ArrayPattern
7776
8117
  | RestElement
7777
8118
  | AssignmentPattern
7778
8119
  | SpreadElement
8120
+ | Property
8121
+ | AssignmentProperty
8122
+ | ClassBody
8123
+ | ImportSpecifier
8124
+ | ImportDefaultSpecifier
8125
+ | ImportNamespaceSpecifier
8126
+ | ExportSpecifier
7779
8127
  | Super
7780
- | SwitchCase
7781
8128
  | TemplateElement;
7782
8129
 
7783
8130
  /**
@@ -7816,13 +8163,19 @@ declare class NodeTargetPlugin {
7816
8163
  apply(compiler: Compiler): void;
7817
8164
  }
7818
8165
  declare class NodeTemplatePlugin {
7819
- constructor(options?: any);
8166
+ constructor(options?: NodeTemplatePluginOptions);
7820
8167
 
7821
8168
  /**
7822
8169
  * Apply the plugin
7823
8170
  */
7824
8171
  apply(compiler: Compiler): void;
7825
8172
  }
8173
+ declare interface NodeTemplatePluginOptions {
8174
+ /**
8175
+ * enable async chunk loading
8176
+ */
8177
+ asyncChunkLoading?: boolean;
8178
+ }
7826
8179
  type NodeWebpackOptions = false | NodeOptions;
7827
8180
  declare class NormalModule extends Module {
7828
8181
  constructor(__0: NormalModuleCreateData);
@@ -9269,6 +9622,13 @@ declare interface PathData {
9269
9622
  noChunkHash?: boolean;
9270
9623
  url?: string;
9271
9624
  }
9625
+ type Pattern =
9626
+ | Identifier
9627
+ | MemberExpression
9628
+ | ObjectPattern
9629
+ | ArrayPattern
9630
+ | RestElement
9631
+ | AssignmentPattern;
9272
9632
 
9273
9633
  /**
9274
9634
  * Configuration object for web performance recommendations.
@@ -9322,9 +9682,9 @@ declare interface PossibleFileSystemError {
9322
9682
  syscall?: string;
9323
9683
  }
9324
9684
  declare class PrefetchPlugin {
9325
- constructor(context?: any, request?: any);
9326
- context: any;
9327
- request: any;
9685
+ constructor(context: string, request?: string);
9686
+ context: null | string;
9687
+ request: string;
9328
9688
 
9329
9689
  /**
9330
9690
  * Apply the plugin
@@ -9366,14 +9726,18 @@ declare class Profiler {
9366
9726
  inspector: any;
9367
9727
  hasSession(): boolean;
9368
9728
  startProfiling(): Promise<void> | Promise<[any, any, any]>;
9369
- sendCommand(method?: any, params?: any): Promise<any>;
9729
+ sendCommand(method: string, params?: object): Promise<any>;
9370
9730
  destroy(): Promise<void>;
9371
9731
  stopProfiling(): Promise<{ profile: any }>;
9372
9732
  }
9373
9733
  declare class ProfilingPlugin {
9374
9734
  constructor(options?: ProfilingPluginOptions);
9375
9735
  outputPath: string;
9376
- apply(compiler?: any): void;
9736
+
9737
+ /**
9738
+ * Apply the plugin
9739
+ */
9740
+ apply(compiler: Compiler): void;
9377
9741
  static Profiler: typeof Profiler;
9378
9742
  }
9379
9743
  declare interface ProfilingPluginOptions {
@@ -9561,14 +9925,20 @@ declare interface RawSourceMap {
9561
9925
  file: string;
9562
9926
  }
9563
9927
  declare class ReadFileCompileWasmPlugin {
9564
- constructor(options?: any);
9565
- options: any;
9928
+ constructor(options?: ReadFileCompileWasmPluginOptions);
9929
+ options: ReadFileCompileWasmPluginOptions;
9566
9930
 
9567
9931
  /**
9568
9932
  * Apply the plugin
9569
9933
  */
9570
9934
  apply(compiler: Compiler): void;
9571
9935
  }
9936
+ declare interface ReadFileCompileWasmPluginOptions {
9937
+ /**
9938
+ * mangle imports
9939
+ */
9940
+ mangleImports?: boolean;
9941
+ }
9572
9942
  declare interface ReaddirOptions {
9573
9943
  encoding?:
9574
9944
  | null
@@ -9581,6 +9951,7 @@ declare interface ReaddirOptions {
9581
9951
  | "utf-8"
9582
9952
  | "ucs-2"
9583
9953
  | "base64"
9954
+ | "base64url"
9584
9955
  | "hex"
9585
9956
  | "buffer";
9586
9957
  withFileTypes?: boolean;
@@ -10094,23 +10465,7 @@ declare interface ResolvedContextTimestampAndHash {
10094
10465
  declare abstract class Resolver {
10095
10466
  fileSystem: FileSystem;
10096
10467
  options: ResolveOptionsTypes;
10097
- hooks: {
10098
- resolveStep: SyncHook<
10099
- [
10100
- AsyncSeriesBailHook<
10101
- [ResolveRequest, ResolveContext],
10102
- null | ResolveRequest
10103
- >,
10104
- ResolveRequest
10105
- ]
10106
- >;
10107
- noResolve: SyncHook<[ResolveRequest, Error]>;
10108
- resolve: AsyncSeriesBailHook<
10109
- [ResolveRequest, ResolveContext],
10110
- null | ResolveRequest
10111
- >;
10112
- result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
10113
- };
10468
+ hooks: KnownHooks;
10114
10469
  ensureHook(
10115
10470
  name:
10116
10471
  | string
@@ -10146,18 +10501,21 @@ declare abstract class Resolver {
10146
10501
  ) => void
10147
10502
  ): void;
10148
10503
  doResolve(
10149
- hook?: any,
10150
- request?: any,
10151
- message?: any,
10152
- resolveContext?: any,
10153
- callback?: any
10154
- ): any;
10504
+ hook: AsyncSeriesBailHook<
10505
+ [ResolveRequest, ResolveContext],
10506
+ null | ResolveRequest
10507
+ >,
10508
+ request: ResolveRequest,
10509
+ message: null | string,
10510
+ resolveContext: ResolveContext,
10511
+ callback: (err?: null | Error, result?: ResolveRequest) => void
10512
+ ): void;
10155
10513
  parse(identifier: string): ParsedIdentifier;
10156
- isModule(path?: any): boolean;
10157
- isPrivate(path?: any): boolean;
10514
+ isModule(path: string): boolean;
10515
+ isPrivate(path: string): boolean;
10158
10516
  isDirectory(path: string): boolean;
10159
- join(path?: any, request?: any): string;
10160
- normalize(path?: any): string;
10517
+ join(path: string, request: string): string;
10518
+ normalize(path: string): string;
10161
10519
  }
10162
10520
  declare interface ResolverCache {
10163
10521
  direct: WeakMap<Object, ResolverWithOptions>;
@@ -10570,9 +10928,9 @@ declare class RuntimeModule extends Module {
10570
10928
  constructor(name: string, stage?: number);
10571
10929
  name: string;
10572
10930
  stage: number;
10573
- compilation: Compilation;
10574
- chunk: Chunk;
10575
- chunkGraph: ChunkGraph;
10931
+ compilation?: Compilation;
10932
+ chunk?: Chunk;
10933
+ chunkGraph?: ChunkGraph;
10576
10934
  fullHash: boolean;
10577
10935
  dependentHash: boolean;
10578
10936
  attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
@@ -10941,7 +11299,7 @@ declare abstract class RuntimeTemplate {
10941
11299
  /**
10942
11300
  * when false, call context will not be preserved
10943
11301
  */
10944
- callContext: boolean;
11302
+ callContext: null | boolean;
10945
11303
  /**
10946
11304
  * when true and accessing the default exports, interop code will be generated
10947
11305
  */
@@ -11077,7 +11435,7 @@ declare interface RuntimeValueOptions {
11077
11435
  declare interface ScopeInfo {
11078
11436
  definitions: StackedMap<string, ScopeInfo | VariableInfo>;
11079
11437
  topLevelScope: boolean | "arrow";
11080
- inShorthand: boolean;
11438
+ inShorthand: string | boolean;
11081
11439
  isStrict: boolean;
11082
11440
  isAsmJs: boolean;
11083
11441
  inTry: boolean;
@@ -11359,7 +11717,10 @@ declare interface SourceMap {
11359
11717
  declare class SourceMapDevToolPlugin {
11360
11718
  constructor(options?: SourceMapDevToolPluginOptions);
11361
11719
  sourceMapFilename: string | false;
11362
- sourceMappingURLComment: string | false;
11720
+ sourceMappingURLComment:
11721
+ | string
11722
+ | false
11723
+ | ((arg0: PathData, arg1?: AssetInfo) => string);
11363
11724
  moduleFilenameTemplate: string | Function;
11364
11725
  fallbackModuleFilenameTemplate: string | Function;
11365
11726
  namespace: string;
@@ -11374,7 +11735,11 @@ declare interface SourceMapDevToolPluginOptions {
11374
11735
  /**
11375
11736
  * 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.
11376
11737
  */
11377
- append?: null | string | false;
11738
+ append?:
11739
+ | null
11740
+ | string
11741
+ | false
11742
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
11378
11743
 
11379
11744
  /**
11380
11745
  * Indicates whether column mappings should be used (defaults to true).
@@ -12140,7 +12505,7 @@ declare class Template {
12140
12505
  modules: Module[],
12141
12506
  renderModule: (arg0: Module) => Source,
12142
12507
  prefix?: string
12143
- ): Source;
12508
+ ): null | Source;
12144
12509
  static renderRuntimeModules(
12145
12510
  runtimeModules: RuntimeModule[],
12146
12511
  renderContext: RenderContext & {
@@ -12850,7 +13215,7 @@ declare interface WithOptions {
12850
13215
  ) => ResolverWithOptions;
12851
13216
  }
12852
13217
  declare interface WriteOnlySet<T> {
12853
- add: (T?: any) => void;
13218
+ add: (item: T) => void;
12854
13219
  }
12855
13220
  type __TypeWebpackOptions = (data: object) =>
12856
13221
  | string
@@ -13194,7 +13559,7 @@ declare namespace exports {
13194
13559
  export { ProfilingPlugin };
13195
13560
  }
13196
13561
  export namespace util {
13197
- export const createHash: (algorithm: string | typeof Hash) => Hash;
13562
+ export const createHash: (algorithm?: string | typeof Hash) => Hash;
13198
13563
  export namespace comparators {
13199
13564
  export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
13200
13565
  export let compareModulesByIdentifier: (
@@ -13318,8 +13683,8 @@ declare namespace exports {
13318
13683
  export const NOT_SERIALIZABLE: object;
13319
13684
  export const buffersSerializer: Serializer;
13320
13685
  export let createFileSerializer: (
13321
- fs?: any,
13322
- hashFunction?: any
13686
+ fs: IntermediateFileSystem,
13687
+ hashFunction: string | typeof Hash
13323
13688
  ) => Serializer;
13324
13689
  export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
13325
13690
  }