webpack 5.99.9 → 5.100.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.
Files changed (306) hide show
  1. package/bin/webpack.js +8 -2
  2. package/hot/log.js +15 -15
  3. package/hot/poll.js +1 -0
  4. package/lib/APIPlugin.js +3 -3
  5. package/lib/AbstractMethodError.js +1 -0
  6. package/lib/AutomaticPrefetchPlugin.js +1 -0
  7. package/lib/BannerPlugin.js +1 -1
  8. package/lib/CaseSensitiveModulesWarning.js +4 -4
  9. package/lib/Chunk.js +6 -6
  10. package/lib/ChunkGraph.js +37 -31
  11. package/lib/ChunkGroup.js +4 -4
  12. package/lib/ChunkTemplate.js +1 -1
  13. package/lib/CleanPlugin.js +94 -17
  14. package/lib/CodeGenerationResults.js +1 -1
  15. package/lib/CompatibilityPlugin.js +5 -2
  16. package/lib/Compilation.js +67 -45
  17. package/lib/Compiler.js +46 -16
  18. package/lib/ConcatenationScope.js +15 -6
  19. package/lib/ConstPlugin.js +5 -3
  20. package/lib/ContextModule.js +16 -12
  21. package/lib/ContextModuleFactory.js +4 -3
  22. package/lib/ContextReplacementPlugin.js +4 -2
  23. package/lib/CssModule.js +2 -2
  24. package/lib/DefinePlugin.js +111 -3
  25. package/lib/DelegatedModuleFactoryPlugin.js +18 -18
  26. package/lib/Dependency.js +6 -1
  27. package/lib/DependencyTemplate.js +1 -0
  28. package/lib/DllEntryPlugin.js +3 -1
  29. package/lib/DllPlugin.js +4 -3
  30. package/lib/DllReferencePlugin.js +2 -2
  31. package/lib/DynamicEntryPlugin.js +1 -1
  32. package/lib/EntryOptionPlugin.js +5 -0
  33. package/lib/ErrorHelpers.js +4 -4
  34. package/lib/EvalDevToolModulePlugin.js +3 -3
  35. package/lib/EvalSourceMapDevToolPlugin.js +7 -7
  36. package/lib/ExportsInfo.js +48 -39
  37. package/lib/ExternalModule.js +15 -11
  38. package/lib/ExternalModuleFactoryPlugin.js +5 -2
  39. package/lib/FileSystemInfo.js +51 -36
  40. package/lib/FlagDependencyExportsPlugin.js +14 -7
  41. package/lib/FlagDependencyUsagePlugin.js +1 -1
  42. package/lib/Generator.js +14 -1
  43. package/lib/HookWebpackError.js +1 -0
  44. package/lib/HotModuleReplacementPlugin.js +77 -50
  45. package/lib/IgnorePlugin.js +1 -1
  46. package/lib/InvalidDependenciesModuleWarning.js +1 -1
  47. package/lib/JavascriptMetaInfoPlugin.js +0 -1
  48. package/lib/LibManifestPlugin.js +4 -2
  49. package/lib/LoaderOptionsPlugin.js +6 -4
  50. package/lib/MainTemplate.js +2 -2
  51. package/lib/Module.js +21 -6
  52. package/lib/ModuleFactory.js +1 -0
  53. package/lib/ModuleGraph.js +24 -2
  54. package/lib/ModuleGraphConnection.js +5 -5
  55. package/lib/ModuleInfoHeaderPlugin.js +2 -1
  56. package/lib/ModuleParseError.js +1 -0
  57. package/lib/ModuleSourceTypesConstants.js +12 -12
  58. package/lib/ModuleTemplate.js +1 -1
  59. package/lib/ModuleTypeConstants.js +21 -21
  60. package/lib/MultiCompiler.js +6 -6
  61. package/lib/NormalModule.js +31 -44
  62. package/lib/NormalModuleFactory.js +29 -19
  63. package/lib/NormalModuleReplacementPlugin.js +1 -1
  64. package/lib/NullFactory.js +1 -0
  65. package/lib/OptimizationStages.js +1 -1
  66. package/lib/Parser.js +1 -0
  67. package/lib/ProgressPlugin.js +12 -5
  68. package/lib/ProvidePlugin.js +5 -1
  69. package/lib/RecordIdsPlugin.js +3 -3
  70. package/lib/RuntimeGlobals.js +175 -155
  71. package/lib/RuntimeModule.js +1 -0
  72. package/lib/RuntimePlugin.js +33 -7
  73. package/lib/RuntimeTemplate.js +111 -11
  74. package/lib/SourceMapDevToolModuleOptionsPlugin.js +15 -25
  75. package/lib/SourceMapDevToolPlugin.js +19 -17
  76. package/lib/Template.js +2 -2
  77. package/lib/TemplatedPathPlugin.js +1 -1
  78. package/lib/WarnDeprecatedOptionPlugin.js +7 -8
  79. package/lib/WatchIgnorePlugin.js +4 -3
  80. package/lib/WebpackIsIncludedPlugin.js +2 -1
  81. package/lib/WebpackOptionsApply.js +115 -27
  82. package/lib/asset/AssetGenerator.js +15 -11
  83. package/lib/asset/AssetModulesPlugin.js +19 -17
  84. package/lib/asset/AssetSourceGenerator.js +4 -4
  85. package/lib/asset/RawDataUrlModule.js +4 -2
  86. package/lib/async-modules/AwaitDependenciesInitFragment.js +1 -1
  87. package/lib/buildChunkGraph.js +6 -3
  88. package/lib/cache/AddBuildDependenciesPlugin.js +5 -6
  89. package/lib/cache/IdleFileCachePlugin.js +7 -4
  90. package/lib/cache/MemoryCachePlugin.js +1 -0
  91. package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
  92. package/lib/cache/PackFileCacheStrategy.js +26 -20
  93. package/lib/cache/ResolverCachePlugin.js +16 -8
  94. package/lib/cli.js +15 -10
  95. package/lib/config/browserslistTargetHandler.js +3 -3
  96. package/lib/config/defaults.js +25 -17
  97. package/lib/config/normalization.js +2 -1
  98. package/lib/config/target.js +6 -5
  99. package/lib/container/ContainerPlugin.js +1 -1
  100. package/lib/container/ContainerReferencePlugin.js +1 -1
  101. package/lib/container/FallbackModule.js +2 -1
  102. package/lib/container/HoistContainerReferencesPlugin.js +1 -1
  103. package/lib/container/ModuleFederationPlugin.js +2 -2
  104. package/lib/container/RemoteModule.js +1 -1
  105. package/lib/css/CssGenerator.js +9 -6
  106. package/lib/css/CssModulesPlugin.js +44 -31
  107. package/lib/css/CssParser.js +6 -4
  108. package/lib/css/walkCssTokens.js +33 -37
  109. package/lib/debug/ProfilingPlugin.js +6 -6
  110. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +8 -8
  111. package/lib/dependencies/AMDPlugin.js +12 -8
  112. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +28 -26
  113. package/lib/dependencies/CachedConstDependency.js +1 -5
  114. package/lib/dependencies/CommonJsExportRequireDependency.js +6 -4
  115. package/lib/dependencies/CommonJsExportsParserPlugin.js +22 -25
  116. package/lib/dependencies/CommonJsFullRequireDependency.js +1 -9
  117. package/lib/dependencies/CommonJsImportsParserPlugin.js +100 -114
  118. package/lib/dependencies/CommonJsPlugin.js +15 -16
  119. package/lib/dependencies/ContextDependencyHelpers.js +2 -1
  120. package/lib/dependencies/ContextDependencyTemplateAsId.js +1 -0
  121. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +1 -0
  122. package/lib/dependencies/CssIcssExportDependency.js +1 -1
  123. package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
  124. package/lib/dependencies/CssSelfLocalIdentifierDependency.js +2 -1
  125. package/lib/dependencies/DynamicExports.js +9 -9
  126. package/lib/dependencies/ExportsInfoDependency.js +1 -1
  127. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +122 -101
  128. package/lib/dependencies/HarmonyExportExpressionDependency.js +1 -1
  129. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +95 -19
  130. package/lib/dependencies/HarmonyExportInitFragment.js +1 -1
  131. package/lib/dependencies/HarmonyImportDependency.js +11 -5
  132. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +238 -162
  133. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -1
  134. package/lib/dependencies/HarmonyImportSpecifierDependency.js +20 -9
  135. package/lib/dependencies/HarmonyModulesPlugin.js +23 -12
  136. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -0
  137. package/lib/dependencies/ImportMetaContextPlugin.js +2 -1
  138. package/lib/dependencies/ImportMetaPlugin.js +2 -2
  139. package/lib/dependencies/ImportParserPlugin.js +40 -9
  140. package/lib/dependencies/ImportPlugin.js +3 -1
  141. package/lib/dependencies/LoaderPlugin.js +1 -0
  142. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +1 -0
  143. package/lib/dependencies/RequireContextPlugin.js +3 -1
  144. package/lib/dependencies/RequireEnsurePlugin.js +6 -6
  145. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +33 -34
  146. package/lib/dependencies/RequireIncludePlugin.js +1 -0
  147. package/lib/dependencies/RuntimeRequirementsDependency.js +1 -1
  148. package/lib/dependencies/SystemPlugin.js +1 -1
  149. package/lib/dependencies/URLContextDependency.js +65 -0
  150. package/lib/dependencies/URLPlugin.js +17 -157
  151. package/lib/dependencies/WorkerPlugin.js +23 -10
  152. package/lib/dependencies/processExportInfo.js +2 -1
  153. package/lib/esm/ModuleChunkFormatPlugin.js +269 -185
  154. package/lib/esm/ModuleChunkLoadingPlugin.js +39 -1
  155. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +70 -3
  156. package/lib/hmr/HotModuleReplacement.runtime.js +0 -1
  157. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  158. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +37 -0
  159. package/lib/hmr/LazyCompilationPlugin.js +4 -2
  160. package/lib/hmr/lazyCompilationBackend.js +4 -2
  161. package/lib/ids/ChunkModuleIdRangePlugin.js +6 -3
  162. package/lib/ids/DeterministicChunkIdsPlugin.js +30 -35
  163. package/lib/ids/DeterministicModuleIdsPlugin.js +4 -3
  164. package/lib/ids/HashedModuleIdsPlugin.js +5 -4
  165. package/lib/ids/IdHelpers.js +21 -17
  166. package/lib/ids/NamedChunkIdsPlugin.js +5 -5
  167. package/lib/ids/NamedModuleIdsPlugin.js +4 -4
  168. package/lib/ids/NaturalChunkIdsPlugin.js +2 -1
  169. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  170. package/lib/ids/OccurrenceChunkIdsPlugin.js +3 -2
  171. package/lib/ids/OccurrenceModuleIdsPlugin.js +1 -1
  172. package/lib/ids/SyncModuleIdsPlugin.js +1 -1
  173. package/lib/index.js +13 -3
  174. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +113 -119
  175. package/lib/javascript/BasicEvaluatedExpression.js +2 -1
  176. package/lib/javascript/ChunkHelpers.js +1 -0
  177. package/lib/javascript/CommonJsChunkFormatPlugin.js +121 -136
  178. package/lib/javascript/EnableChunkLoadingPlugin.js +6 -3
  179. package/lib/javascript/JavascriptGenerator.js +14 -2
  180. package/lib/javascript/JavascriptModulesPlugin.js +68 -27
  181. package/lib/javascript/JavascriptParser.js +117 -76
  182. package/lib/javascript/JavascriptParserHelpers.js +41 -41
  183. package/lib/javascript/StartupHelpers.js +17 -17
  184. package/lib/json/JsonGenerator.js +4 -2
  185. package/lib/json/JsonModulesPlugin.js +2 -2
  186. package/lib/json/JsonParser.js +1 -1
  187. package/lib/library/AbstractLibraryPlugin.js +6 -2
  188. package/lib/library/AssignLibraryPlugin.js +21 -6
  189. package/lib/library/EnableLibraryPlugin.js +23 -3
  190. package/lib/library/UmdLibraryPlugin.js +15 -6
  191. package/lib/logging/createConsoleLogger.js +3 -3
  192. package/lib/logging/runtime.js +9 -9
  193. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +4 -22
  194. package/lib/node/RequireChunkLoadingRuntimeModule.js +4 -22
  195. package/lib/node/nodeConsole.js +4 -2
  196. package/lib/optimize/AggressiveMergingPlugin.js +45 -46
  197. package/lib/optimize/AggressiveSplittingPlugin.js +13 -12
  198. package/lib/optimize/ConcatenatedModule.js +227 -57
  199. package/lib/optimize/EnsureChunkConditionsPlugin.js +58 -58
  200. package/lib/optimize/FlagIncludedChunksPlugin.js +3 -1
  201. package/lib/optimize/InnerGraph.js +115 -112
  202. package/lib/optimize/InnerGraphPlugin.js +2 -2
  203. package/lib/optimize/LimitChunkCountPlugin.js +4 -2
  204. package/lib/optimize/MangleExportsPlugin.js +4 -3
  205. package/lib/optimize/MergeDuplicateChunksPlugin.js +80 -81
  206. package/lib/optimize/MinChunkSizePlugin.js +6 -3
  207. package/lib/optimize/ModuleConcatenationPlugin.js +31 -22
  208. package/lib/optimize/RealContentHashPlugin.js +26 -20
  209. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -1
  210. package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
  211. package/lib/optimize/SideEffectsFlagPlugin.js +3 -2
  212. package/lib/optimize/SplitChunksPlugin.js +16 -13
  213. package/lib/rules/BasicEffectRulePlugin.js +4 -2
  214. package/lib/rules/BasicMatcherRulePlugin.js +3 -1
  215. package/lib/rules/ObjectMatcherRulePlugin.js +3 -1
  216. package/lib/rules/RuleSetCompiler.js +6 -3
  217. package/lib/rules/UseEffectRulePlugin.js +3 -1
  218. package/lib/runtime/AsyncModuleRuntimeModule.js +64 -9
  219. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +1 -1
  220. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +214 -0
  221. package/lib/runtime/RuntimeIdRuntimeModule.js +2 -1
  222. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +8 -7
  223. package/lib/schemes/FileUriPlugin.js +1 -1
  224. package/lib/schemes/HttpUriPlugin.js +27 -19
  225. package/lib/schemes/VirtualUrlPlugin.js +222 -0
  226. package/lib/serialization/AggregateErrorSerializer.js +1 -1
  227. package/lib/serialization/BinaryMiddleware.js +5 -4
  228. package/lib/serialization/FileMiddleware.js +7 -4
  229. package/lib/serialization/ObjectMiddleware.js +14 -8
  230. package/lib/serialization/Serializer.js +5 -3
  231. package/lib/serialization/SerializerMiddleware.js +2 -0
  232. package/lib/sharing/ConsumeSharedModule.js +1 -1
  233. package/lib/sharing/ConsumeSharedPlugin.js +3 -3
  234. package/lib/sharing/ConsumeSharedRuntimeModule.js +2 -2
  235. package/lib/sharing/ProvideSharedModule.js +1 -1
  236. package/lib/sharing/ProvideSharedPlugin.js +3 -2
  237. package/lib/sharing/SharePlugin.js +2 -1
  238. package/lib/sharing/ShareRuntimeModule.js +3 -5
  239. package/lib/sharing/utils.js +34 -34
  240. package/lib/stats/DefaultStatsFactoryPlugin.js +49 -46
  241. package/lib/stats/DefaultStatsPresetPlugin.js +4 -2
  242. package/lib/stats/DefaultStatsPrinterPlugin.js +15 -9
  243. package/lib/stats/StatsFactory.js +4 -2
  244. package/lib/stats/StatsPrinter.js +3 -2
  245. package/lib/url/URLParserPlugin.js +266 -0
  246. package/lib/util/ArrayQueue.js +1 -1
  247. package/lib/util/AsyncQueue.js +1 -1
  248. package/lib/util/Hash.js +2 -0
  249. package/lib/util/IterableHelpers.js +1 -1
  250. package/lib/util/LazyBucketSortedSet.js +2 -1
  251. package/lib/util/LazySet.js +11 -6
  252. package/lib/util/ParallelismFactorCalculator.js +1 -1
  253. package/lib/util/SetHelpers.js +3 -3
  254. package/lib/util/SortableSet.js +2 -2
  255. package/lib/util/StackedCacheMap.js +3 -1
  256. package/lib/util/StackedMap.js +2 -2
  257. package/lib/util/StringXor.js +1 -0
  258. package/lib/util/TupleSet.js +1 -0
  259. package/lib/util/URLAbsoluteSpecifier.js +1 -1
  260. package/lib/util/cleverMerge.js +12 -8
  261. package/lib/util/comparators.js +154 -127
  262. package/lib/util/compileBooleanMatcher.js +8 -3
  263. package/lib/util/concatenate.js +8 -7
  264. package/lib/util/conventions.js +72 -73
  265. package/lib/util/create-schema-validation.js +2 -1
  266. package/lib/util/createHash.js +10 -4
  267. package/lib/util/deprecation.js +69 -66
  268. package/lib/util/deterministicGrouping.js +4 -2
  269. package/lib/util/extractUrlAndGlobal.js +1 -1
  270. package/lib/util/findGraphRoots.js +2 -2
  271. package/lib/util/fs.js +30 -23
  272. package/lib/util/hash/md4.js +2 -2
  273. package/lib/util/hash/wasm-hash.js +4 -2
  274. package/lib/util/identifier.js +13 -12
  275. package/lib/util/internalSerializables.js +2 -0
  276. package/lib/util/magicComment.js +5 -5
  277. package/lib/util/processAsyncTree.js +1 -1
  278. package/lib/util/propertyAccess.js +1 -1
  279. package/lib/util/propertyName.js +1 -1
  280. package/lib/util/registerExternalSerializer.js +1 -2
  281. package/lib/util/removeBOM.js +1 -1
  282. package/lib/util/runtime.js +29 -21
  283. package/lib/util/semver.js +1 -1
  284. package/lib/util/serialization.js +3 -0
  285. package/lib/util/source.js +3 -2
  286. package/lib/validateSchema.js +1 -0
  287. package/lib/wasm/EnableWasmLoadingPlugin.js +6 -3
  288. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -1
  289. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +46 -49
  290. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
  291. package/lib/wasm-sync/WebAssemblyGenerator.js +2 -3
  292. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +3 -2
  293. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +3 -0
  294. package/lib/wasm-sync/WebAssemblyUtils.js +1 -1
  295. package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -22
  296. package/lib/webpack.js +4 -5
  297. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +1 -0
  298. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -24
  299. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -0
  300. package/package.json +119 -113
  301. package/schemas/WebpackOptions.check.js +1 -1
  302. package/schemas/WebpackOptions.json +17 -0
  303. package/schemas/plugins/schemes/VirtualUrlPlugin.check.d.ts +7 -0
  304. package/schemas/plugins/schemes/VirtualUrlPlugin.check.js +6 -0
  305. package/schemas/plugins/schemes/VirtualUrlPlugin.json +77 -0
  306. package/types.d.ts +1230 -360
package/types.d.ts CHANGED
@@ -263,6 +263,7 @@ type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
263
263
  | Int32Array
264
264
  | BigUint64Array
265
265
  | BigInt64Array
266
+ | Float16Array
266
267
  | Float32Array
267
268
  | Float64Array
268
269
  | DataView;
@@ -529,16 +530,59 @@ declare interface BannerPluginOptions {
529
530
  test?: string | RegExp | Rule[];
530
531
  }
531
532
  declare interface BaseResolveRequest {
533
+ /**
534
+ * path
535
+ */
532
536
  path: string | false;
537
+
538
+ /**
539
+ * content
540
+ */
533
541
  context?: object;
542
+
543
+ /**
544
+ * description file path
545
+ */
534
546
  descriptionFilePath?: string;
547
+
548
+ /**
549
+ * description file root
550
+ */
535
551
  descriptionFileRoot?: string;
552
+
553
+ /**
554
+ * description file data
555
+ */
536
556
  descriptionFileData?: JsonObjectTypes;
557
+
558
+ /**
559
+ * relative path
560
+ */
537
561
  relativePath?: string;
562
+
563
+ /**
564
+ * true when need to ignore symlinks, otherwise false
565
+ */
538
566
  ignoreSymlinks?: boolean;
567
+
568
+ /**
569
+ * true when full specified, otherwise false
570
+ */
539
571
  fullySpecified?: boolean;
572
+
573
+ /**
574
+ * inner request for internal usage
575
+ */
540
576
  __innerRequest?: string;
577
+
578
+ /**
579
+ * inner request for internal usage
580
+ */
541
581
  __innerRequest_request?: string;
582
+
583
+ /**
584
+ * inner relative path for internal usage
585
+ */
542
586
  __innerRequest_relativePath?: string;
543
587
  }
544
588
  declare abstract class BasicEvaluatedExpression {
@@ -895,6 +939,46 @@ type BufferEncoding =
895
939
  | "binary"
896
940
  | "hex";
897
941
  type BufferEncodingOption = "buffer" | { encoding: "buffer" };
942
+ declare interface BufferEntry {
943
+ map?: null | RawSourceMap;
944
+ bufferedMap?: null | BufferedMap;
945
+ }
946
+ declare interface BufferedMap {
947
+ /**
948
+ * version
949
+ */
950
+ version: number;
951
+
952
+ /**
953
+ * sources
954
+ */
955
+ sources: string[];
956
+
957
+ /**
958
+ * name
959
+ */
960
+ names: string[];
961
+
962
+ /**
963
+ * source root
964
+ */
965
+ sourceRoot?: string;
966
+
967
+ /**
968
+ * sources content
969
+ */
970
+ sourcesContent?: ("" | Buffer)[];
971
+
972
+ /**
973
+ * mappings
974
+ */
975
+ mappings?: Buffer;
976
+
977
+ /**
978
+ * file
979
+ */
980
+ file: string;
981
+ }
898
982
  type BuildInfo = KnownBuildInfo & Record<string, any>;
899
983
  type BuildMeta = KnownBuildMeta & Record<string, any>;
900
984
  declare abstract class ByTypeGenerator extends Generator {
@@ -906,7 +990,7 @@ declare abstract class ByTypeGenerator extends Generator {
906
990
  ) => null | Source;
907
991
  }
908
992
  declare const CIRCULAR_CONNECTION: unique symbol;
909
- declare class Cache {
993
+ declare class CacheClass {
910
994
  constructor();
911
995
  hooks: {
912
996
  get: AsyncSeriesBailHook<
@@ -1014,12 +1098,64 @@ declare interface CacheGroupsContext {
1014
1098
  chunkGraph: ChunkGraph;
1015
1099
  }
1016
1100
  type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
1101
+ declare interface CacheTypes {
1102
+ [index: string]: undefined | ResolveRequest | ResolveRequest[];
1103
+ }
1104
+ declare interface CachedData {
1105
+ /**
1106
+ * source
1107
+ */
1108
+ source?: boolean;
1109
+
1110
+ /**
1111
+ * buffer
1112
+ */
1113
+ buffer: Buffer;
1114
+
1115
+ /**
1116
+ * size
1117
+ */
1118
+ size?: number;
1119
+
1120
+ /**
1121
+ * maps
1122
+ */
1123
+ maps: Map<string, BufferEntry>;
1124
+
1125
+ /**
1126
+ * hash
1127
+ */
1128
+ hash?: (string | Buffer)[];
1129
+ }
1017
1130
  declare class CachedSource extends Source {
1018
- constructor(source: Source);
1019
- constructor(source: Source | (() => Source), cachedData?: any);
1020
- original(): Source;
1131
+ constructor(source: Source | (() => Source), cachedData?: CachedData);
1132
+ getCachedData(): CachedData;
1021
1133
  originalLazy(): Source | (() => Source);
1022
- getCachedData(): any;
1134
+ original(): Source;
1135
+ streamChunks(
1136
+ options: StreamChunksOptions,
1137
+ onChunk: (
1138
+ chunk: undefined | string,
1139
+ generatedLine: number,
1140
+ generatedColumn: number,
1141
+ sourceIndex: number,
1142
+ originalLine: number,
1143
+ originalColumn: number,
1144
+ nameIndex: number
1145
+ ) => void,
1146
+ onSource: (
1147
+ sourceIndex: number,
1148
+ source: null | string,
1149
+ sourceContent?: string
1150
+ ) => void,
1151
+ onName: (nameIndex: number, name: string) => void
1152
+ ): GeneratedSourceInfo;
1153
+ }
1154
+ declare interface CalculatedStringResult {
1155
+ range?: [number, number];
1156
+ value: string;
1157
+ code: boolean;
1158
+ conditional: false | CalculatedStringResult[];
1023
1159
  }
1024
1160
  type CallExpression = SimpleCallExpression | NewExpression;
1025
1161
  declare interface CallExpressionInfo {
@@ -1444,12 +1580,19 @@ declare interface ChunkHashContext {
1444
1580
  */
1445
1581
  chunkGraph: ChunkGraph;
1446
1582
  }
1583
+ declare interface ChunkHashes {
1584
+ [index: number]: string;
1585
+ [index: string]: string;
1586
+ }
1447
1587
  type ChunkId = string | number;
1448
1588
  declare interface ChunkMaps {
1449
1589
  hash: Record<string | number, string>;
1450
1590
  contentHash: Record<string | number, Record<string, string>>;
1451
1591
  name: Record<string | number, string>;
1452
1592
  }
1593
+ declare interface ChunkModuleHashes {
1594
+ [index: string]: string;
1595
+ }
1453
1596
  declare class ChunkModuleIdRangePlugin {
1454
1597
  constructor(options: ChunkModuleIdRangePluginOptions);
1455
1598
  options: ChunkModuleIdRangePluginOptions;
@@ -1480,6 +1623,10 @@ declare interface ChunkModuleIdRangePluginOptions {
1480
1623
  */
1481
1624
  end?: number;
1482
1625
  }
1626
+ declare interface ChunkModuleIds {
1627
+ [index: number]: ModuleId[];
1628
+ [index: string]: ModuleId[];
1629
+ }
1483
1630
  declare interface ChunkModuleMaps {
1484
1631
  id: Record<string | number, (string | number)[]>;
1485
1632
  hash: Record<string | number, string>;
@@ -1564,6 +1711,10 @@ declare interface ChunkRenderContextJavascriptModulesPlugin {
1564
1711
  */
1565
1712
  strictMode?: boolean;
1566
1713
  }
1714
+ declare interface ChunkRuntime {
1715
+ [index: number]: string;
1716
+ [index: string]: string;
1717
+ }
1567
1718
  declare interface ChunkSizeOptions {
1568
1719
  /**
1569
1720
  * constant overhead for a chunk
@@ -1973,7 +2124,7 @@ declare class Compilation {
1973
2124
  statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
1974
2125
  statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
1975
2126
  get normalModuleLoader(): SyncHook<
1976
- [LoaderContextNormalModule<any>, NormalModule]
2127
+ [LoaderContextObject<any>, NormalModule]
1977
2128
  >;
1978
2129
  }>;
1979
2130
  name?: string;
@@ -2461,7 +2612,7 @@ declare class Compiler {
2461
2612
  watchFileSystem: null | WatchFileSystem;
2462
2613
  recordsInputPath: null | string;
2463
2614
  recordsOutputPath: null | string;
2464
- records: Record<string, any>;
2615
+ records: Records;
2465
2616
  managedPaths: Set<string | RegExp>;
2466
2617
  unmanagedPaths: Set<string | RegExp>;
2467
2618
  immutablePaths: Set<string | RegExp>;
@@ -2480,7 +2631,7 @@ declare class Compiler {
2480
2631
  options: WebpackOptionsNormalized;
2481
2632
  context: string;
2482
2633
  requestShortener: RequestShortener;
2483
- cache: Cache;
2634
+ cache: CacheClass;
2484
2635
  moduleMemCaches?: Map<Module, ModuleMemCachesItem>;
2485
2636
  compilerPath: string;
2486
2637
  running: boolean;
@@ -2524,11 +2675,30 @@ declare class Compiler {
2524
2675
  close(callback: RunCallback<void>): void;
2525
2676
  }
2526
2677
  declare class ConcatSource extends Source {
2527
- constructor(...args: (string | Source)[]);
2678
+ constructor(...args: ConcatSourceChild[]);
2528
2679
  getChildren(): Source[];
2529
- add(item: string | Source): void;
2530
- addAllSkipOptimizing(items: Source[]): void;
2680
+ add(item: ConcatSourceChild): void;
2681
+ addAllSkipOptimizing(items: ConcatSourceChild[]): void;
2682
+ streamChunks(
2683
+ options: StreamChunksOptions,
2684
+ onChunk: (
2685
+ chunk: undefined | string,
2686
+ generatedLine: number,
2687
+ generatedColumn: number,
2688
+ sourceIndex: number,
2689
+ originalLine: number,
2690
+ originalColumn: number,
2691
+ nameIndex: number
2692
+ ) => void,
2693
+ onSource: (
2694
+ sourceIndex: number,
2695
+ source: null | string,
2696
+ sourceContent?: string
2697
+ ) => void,
2698
+ onName: (nameIndex: number, name: string) => void
2699
+ ): GeneratedSourceInfo;
2531
2700
  }
2701
+ type ConcatSourceChild = string | Source | SourceLike;
2532
2702
  declare interface ConcatenatedModuleInfo {
2533
2703
  type: "concatenated";
2534
2704
  module: Module;
@@ -2545,11 +2715,35 @@ declare interface ConcatenatedModuleInfo {
2545
2715
  rawExportMap?: Map<string, string>;
2546
2716
  namespaceExportSymbol?: string;
2547
2717
  namespaceObjectName?: string;
2718
+
2719
+ /**
2720
+ * "default-with-named" namespace
2721
+ */
2548
2722
  interopNamespaceObjectUsed: boolean;
2723
+
2724
+ /**
2725
+ * "default-with-named" namespace
2726
+ */
2549
2727
  interopNamespaceObjectName?: string;
2728
+
2729
+ /**
2730
+ * "default-only" namespace
2731
+ */
2550
2732
  interopNamespaceObject2Used: boolean;
2733
+
2734
+ /**
2735
+ * "default-only" namespace
2736
+ */
2551
2737
  interopNamespaceObject2Name?: string;
2738
+
2739
+ /**
2740
+ * runtime namespace object that detects "__esModule"
2741
+ */
2552
2742
  interopDefaultAccessUsed: boolean;
2743
+
2744
+ /**
2745
+ * runtime namespace object that detects "__esModule"
2746
+ */
2553
2747
  interopDefaultAccessName?: string;
2554
2748
  }
2555
2749
  declare interface ConcatenationBailoutReasonContext {
@@ -2838,8 +3032,8 @@ declare interface Configuration {
2838
3032
  }
2839
3033
  type ConnectionState =
2840
3034
  | boolean
2841
- | typeof TRANSITIVE_ONLY
2842
- | typeof CIRCULAR_CONNECTION;
3035
+ | typeof CIRCULAR_CONNECTION
3036
+ | typeof TRANSITIVE_ONLY;
2843
3037
  declare class ConstDependency extends NullDependency {
2844
3038
  constructor(
2845
3039
  expression: string,
@@ -3293,7 +3487,7 @@ declare abstract class CssModule extends NormalModule {
3293
3487
  cssLayer: CssLayer;
3294
3488
  supports: Supports;
3295
3489
  media: Media;
3296
- inheritance: [CssLayer, Supports, Media][];
3490
+ inheritance?: [CssLayer, Supports, Media][];
3297
3491
  }
3298
3492
 
3299
3493
  /**
@@ -3463,7 +3657,8 @@ declare interface DependenciesBlockLike {
3463
3657
  declare class Dependency {
3464
3658
  constructor();
3465
3659
  weak: boolean;
3466
- optional: boolean;
3660
+ defer?: boolean;
3661
+ optional?: boolean;
3467
3662
  get type(): string;
3468
3663
  get category(): string;
3469
3664
  loc: DependencyLocation;
@@ -3685,16 +3880,59 @@ declare interface DeterministicModuleIdsPluginOptions {
3685
3880
  failOnConflict?: boolean;
3686
3881
  }
3687
3882
  type DevtoolModuleFilenameTemplate = string | ((context?: any) => string);
3688
- declare interface Dirent {
3883
+ declare interface Dirent<T extends string | Buffer = string> {
3884
+ /**
3885
+ * true when is file, otherwise false
3886
+ */
3689
3887
  isFile: () => boolean;
3888
+
3889
+ /**
3890
+ * true when is directory, otherwise false
3891
+ */
3690
3892
  isDirectory: () => boolean;
3893
+
3894
+ /**
3895
+ * true when is block device, otherwise false
3896
+ */
3691
3897
  isBlockDevice: () => boolean;
3898
+
3899
+ /**
3900
+ * true when is character device, otherwise false
3901
+ */
3692
3902
  isCharacterDevice: () => boolean;
3903
+
3904
+ /**
3905
+ * true when is symbolic link, otherwise false
3906
+ */
3693
3907
  isSymbolicLink: () => boolean;
3908
+
3909
+ /**
3910
+ * true when is FIFO, otherwise false
3911
+ */
3694
3912
  isFIFO: () => boolean;
3913
+
3914
+ /**
3915
+ * true when is socket, otherwise false
3916
+ */
3695
3917
  isSocket: () => boolean;
3696
- name: string;
3697
- path: string;
3918
+
3919
+ /**
3920
+ * name
3921
+ */
3922
+ name: T;
3923
+
3924
+ /**
3925
+ * path
3926
+ */
3927
+ parentPath: string;
3928
+
3929
+ /**
3930
+ * path
3931
+ */
3932
+ path?: string;
3933
+ }
3934
+ declare interface Disposable {
3935
+ [Symbol.dispose](): void;
3698
3936
  }
3699
3937
  declare class DllPlugin {
3700
3938
  constructor(options: DllPluginOptions);
@@ -4492,6 +4730,11 @@ declare interface ExperimentsExtra {
4492
4730
  */
4493
4731
  css?: boolean;
4494
4732
 
4733
+ /**
4734
+ * Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
4735
+ */
4736
+ deferImport?: boolean;
4737
+
4495
4738
  /**
4496
4739
  * Compile entrypoints and import()s only when they are accessed.
4497
4740
  */
@@ -4513,6 +4756,11 @@ declare interface ExperimentsNormalizedExtra {
4513
4756
  */
4514
4757
  css?: boolean;
4515
4758
 
4759
+ /**
4760
+ * Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
4761
+ */
4762
+ deferImport?: boolean;
4763
+
4516
4764
  /**
4517
4765
  * Compile entrypoints and import()s only when they are accessed.
4518
4766
  */
@@ -4746,6 +4994,11 @@ declare interface ExportsSpec {
4746
4994
  */
4747
4995
  dependencies?: Module[];
4748
4996
  }
4997
+ type ExportsType =
4998
+ | "namespace"
4999
+ | "default-only"
5000
+ | "default-with-named"
5001
+ | "dynamic";
4749
5002
  type Exposes = (string | ExposesObject)[] | ExposesObject;
4750
5003
 
4751
5004
  /**
@@ -4926,12 +5179,60 @@ declare interface ExternalModuleInfo {
4926
5179
  module: Module;
4927
5180
  runtimeCondition?: string | boolean | SortableSet<string>;
4928
5181
  index: number;
5182
+
5183
+ /**
5184
+ * module.exports / harmony namespace object
5185
+ */
4929
5186
  name?: string;
5187
+
5188
+ /**
5189
+ * deferred module.exports / harmony namespace object
5190
+ */
5191
+ deferredName?: string;
5192
+
5193
+ /**
5194
+ * the module is deferred at least once
5195
+ */
5196
+ deferred: boolean;
5197
+
5198
+ /**
5199
+ * deferred namespace object that being used in a not-analyzable way so it must be materialized
5200
+ */
5201
+ deferredNamespaceObjectUsed: boolean;
5202
+
5203
+ /**
5204
+ * deferred namespace object that being used in a not-analyzable way so it must be materialized
5205
+ */
5206
+ deferredNamespaceObjectName?: string;
5207
+
5208
+ /**
5209
+ * "default-with-named" namespace
5210
+ */
4930
5211
  interopNamespaceObjectUsed: boolean;
5212
+
5213
+ /**
5214
+ * "default-with-named" namespace
5215
+ */
4931
5216
  interopNamespaceObjectName?: string;
5217
+
5218
+ /**
5219
+ * "default-only" namespace
5220
+ */
4932
5221
  interopNamespaceObject2Used: boolean;
5222
+
5223
+ /**
5224
+ * "default-only" namespace
5225
+ */
4933
5226
  interopNamespaceObject2Name?: string;
5227
+
5228
+ /**
5229
+ * runtime namespace object that detects "__esModule"
5230
+ */
4934
5231
  interopDefaultAccessUsed: boolean;
5232
+
5233
+ /**
5234
+ * runtime namespace object that detects "__esModule"
5235
+ */
4935
5236
  interopDefaultAccessName?: string;
4936
5237
  }
4937
5238
  type Externals =
@@ -5183,18 +5484,45 @@ declare interface FileCacheOptions {
5183
5484
  version?: string;
5184
5485
  }
5185
5486
  declare interface FileSystem {
5487
+ /**
5488
+ * read file method
5489
+ */
5186
5490
  readFile: ReadFileTypes;
5491
+
5492
+ /**
5493
+ * readdir method
5494
+ */
5187
5495
  readdir: ReaddirTypes;
5496
+
5497
+ /**
5498
+ * read json method
5499
+ */
5188
5500
  readJson?: (
5189
- arg0: PathOrFileDescriptorTypes,
5190
- arg1: (
5191
- arg0: null | Error | NodeJS.ErrnoException,
5192
- arg1?: JsonObjectTypes
5501
+ pathOrFileDescription: PathOrFileDescriptorTypes,
5502
+ callback: (
5503
+ err: null | Error | NodeJS.ErrnoException,
5504
+ result?: JsonObjectTypes
5193
5505
  ) => void
5194
5506
  ) => void;
5507
+
5508
+ /**
5509
+ * read link method
5510
+ */
5195
5511
  readlink: ReadlinkTypes;
5512
+
5513
+ /**
5514
+ * lstat method
5515
+ */
5196
5516
  lstat?: LStatTypes;
5517
+
5518
+ /**
5519
+ * stat method
5520
+ */
5197
5521
  stat: StatTypes;
5522
+
5523
+ /**
5524
+ * realpath method
5525
+ */
5198
5526
  realpath?: RealPathTypes;
5199
5527
  }
5200
5528
  declare abstract class FileSystemInfo {
@@ -5294,6 +5622,9 @@ type FilterItemTypes = string | RegExp | ((value: string) => boolean);
5294
5622
  declare interface Flags {
5295
5623
  [index: string]: Argument;
5296
5624
  }
5625
+ declare interface FullHashChunkModuleHashes {
5626
+ [index: string]: string;
5627
+ }
5297
5628
  declare interface GenerateContext {
5298
5629
  /**
5299
5630
  * mapping from dependencies to templates
@@ -5343,7 +5674,30 @@ declare interface GenerateContext {
5343
5674
  /**
5344
5675
  * get access to the code generation data
5345
5676
  */
5346
- getData?: () => Map<string, any>;
5677
+ getData?: () => GenerateContextData;
5678
+ }
5679
+ type GenerateContextData = Map<"url", { [index: string]: string }> &
5680
+ Map<"fullContentHash", string> &
5681
+ Map<"contentHash", string> &
5682
+ Map<"filename", string> &
5683
+ Map<"assetInfo", AssetInfo> &
5684
+ Map<"chunkInitFragments", InitFragment<GenerateContext>[]> &
5685
+ Record<string, any>;
5686
+ declare interface GeneratedSourceInfo {
5687
+ /**
5688
+ * generated line
5689
+ */
5690
+ generatedLine?: number;
5691
+
5692
+ /**
5693
+ * generated column
5694
+ */
5695
+ generatedColumn?: number;
5696
+
5697
+ /**
5698
+ * source
5699
+ */
5700
+ source?: string;
5347
5701
  }
5348
5702
  declare class Generator {
5349
5703
  constructor();
@@ -5595,6 +5949,17 @@ declare class Hash {
5595
5949
  digest(encoding?: string): string | Buffer;
5596
5950
  }
5597
5951
  type HashFunction = string | typeof Hash;
5952
+ declare interface HashLike {
5953
+ /**
5954
+ * make hash update
5955
+ */
5956
+ update: (data: string | Buffer, inputEncoding?: string) => HashLike;
5957
+
5958
+ /**
5959
+ * get hash digest
5960
+ */
5961
+ digest: (encoding?: string) => string | Buffer;
5962
+ }
5598
5963
  declare interface HashableObject {
5599
5964
  updateHash: (hash: Hash) => void;
5600
5965
  }
@@ -5793,6 +6158,7 @@ type ImportAttribute = BaseNode & {
5793
6158
  type ImportAttributes = Record<string, string> & {};
5794
6159
  type ImportDeclarationJavascriptParser = ImportDeclarationImport & {
5795
6160
  attributes?: ImportAttribute[];
6161
+ phase?: "defer";
5796
6162
  };
5797
6163
  declare interface ImportDependencyMeta {
5798
6164
  attributes?: ImportAttributes;
@@ -5828,6 +6194,7 @@ type ImportExpressionJavascriptParser = ImportExpressionImport & {
5828
6194
  | ThisExpression
5829
6195
  | UpdateExpression
5830
6196
  | YieldExpression;
6197
+ phase?: "defer";
5831
6198
  };
5832
6199
  declare interface ImportModuleOptions {
5833
6200
  /**
@@ -6009,6 +6376,12 @@ declare abstract class ItemCacheFacade {
6009
6376
  ): void;
6010
6377
  providePromise<T>(computer: () => T | Promise<T>): Promise<T>;
6011
6378
  }
6379
+ declare interface IteratorObject<T, TReturn = unknown, TNext = unknown>
6380
+ extends Iterator<T, TReturn, TNext>,
6381
+ Disposable {
6382
+ [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
6383
+ [Symbol.dispose](): void;
6384
+ }
6012
6385
  declare class JavascriptModulesPlugin {
6013
6386
  constructor(options?: object);
6014
6387
  options: object;
@@ -6403,10 +6776,11 @@ declare class JavascriptParser extends Parser {
6403
6776
  boolean | void
6404
6777
  >;
6405
6778
  declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
6406
- varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
6407
- varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
6408
- varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
6409
- varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
6779
+ varDeclaration: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6780
+ varDeclarationLet: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6781
+ varDeclarationConst: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6782
+ varDeclarationUsing: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6783
+ varDeclarationVar: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6410
6784
  pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
6411
6785
  canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
6412
6786
  rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
@@ -6815,7 +7189,7 @@ declare class JavascriptParser extends Parser {
6815
7189
  */
6816
7190
  walkNestedStatement(statement: Statement): void;
6817
7191
  preWalkBlockStatement(statement: BlockStatement): void;
6818
- walkBlockStatement(statement: BlockStatement): void;
7192
+ walkBlockStatement(statement: BlockStatement | StaticBlock): void;
6819
7193
  walkExpressionStatement(statement: ExpressionStatement): void;
6820
7194
  preWalkIfStatement(statement: IfStatement): void;
6821
7195
  walkIfStatement(statement: IfStatement): void;
@@ -7059,7 +7433,7 @@ declare class JavascriptParser extends Parser {
7059
7433
  name: string,
7060
7434
  rootInfo: string | VariableInfo | ScopeInfo,
7061
7435
  getMembers: () => string[]
7062
- ) => any),
7436
+ ) => R),
7063
7437
  defined: undefined | ((result?: string) => undefined | R),
7064
7438
  ...args: AsArray<T>
7065
7439
  ): undefined | R;
@@ -7076,7 +7450,7 @@ declare class JavascriptParser extends Parser {
7076
7450
  callHooksForInfoWithFallback<T, R>(
7077
7451
  hookMap: HookMap<SyncBailHook<T, R>>,
7078
7452
  info: ExportedVariableInfo,
7079
- fallback: undefined | ((name: string) => any),
7453
+ fallback: undefined | ((name: string) => undefined | R),
7080
7454
  defined: undefined | ((result?: string) => any),
7081
7455
  ...args: AsArray<T>
7082
7456
  ): undefined | R;
@@ -7224,12 +7598,7 @@ declare class JavascriptParser extends Parser {
7224
7598
  | Super
7225
7599
  ): BasicEvaluatedExpression;
7226
7600
  parseString(expression: Expression): string;
7227
- parseCalculatedString(expression: Expression): {
7228
- range?: [number, number];
7229
- value: string;
7230
- code: boolean;
7231
- conditional: any;
7232
- };
7601
+ parseCalculatedString(expression: Expression): CalculatedStringResult;
7233
7602
  evaluate(source: string): BasicEvaluatedExpression;
7234
7603
  isPure(
7235
7604
  expr:
@@ -7396,8 +7765,9 @@ declare class JavascriptParser extends Parser {
7396
7765
  getMembers: () => string[];
7397
7766
  };
7398
7767
  static ALLOWED_MEMBER_TYPES_ALL: 3;
7399
- static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
7400
7768
  static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
7769
+ static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
7770
+ static VariableInfo: typeof VariableInfo;
7401
7771
  static getImportAttributes: (
7402
7772
  node:
7403
7773
  | ImportDeclarationJavascriptParser
@@ -7405,7 +7775,6 @@ declare class JavascriptParser extends Parser {
7405
7775
  | ExportAllDeclarationJavascriptParser
7406
7776
  | ImportExpressionJavascriptParser
7407
7777
  ) => undefined | ImportAttributes;
7408
- static VariableInfo: typeof VariableInfo;
7409
7778
  }
7410
7779
 
7411
7780
  /**
@@ -7459,6 +7828,11 @@ declare interface JavascriptParserOptions {
7459
7828
  */
7460
7829
  dynamicImportPreload?: number | boolean;
7461
7830
 
7831
+ /**
7832
+ * Enable/disable parsing of dynamic URL.
7833
+ */
7834
+ dynamicUrl?: boolean;
7835
+
7462
7836
  /**
7463
7837
  * Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
7464
7838
  */
@@ -7604,6 +7978,17 @@ declare interface JavascriptParserOptions {
7604
7978
  */
7605
7979
  wrappedContextRegExp?: RegExp;
7606
7980
  }
7981
+ declare abstract class JsonData {
7982
+ get():
7983
+ | undefined
7984
+ | null
7985
+ | string
7986
+ | number
7987
+ | boolean
7988
+ | JsonObjectFs
7989
+ | JsonValueFs[];
7990
+ updateHash(hash: Hash): void;
7991
+ }
7607
7992
 
7608
7993
  /**
7609
7994
  * Generator options for json modules.
@@ -7827,6 +8212,11 @@ declare interface KnownBuildInfo {
7827
8212
  */
7828
8213
  assets?: Record<string, Source>;
7829
8214
 
8215
+ /**
8216
+ * using in NormalModule
8217
+ */
8218
+ assetsInfo?: Map<string, undefined | AssetInfo>;
8219
+
7830
8220
  /**
7831
8221
  * using in NormalModule
7832
8222
  */
@@ -7850,19 +8240,39 @@ declare interface KnownBuildInfo {
7850
8240
  /**
7851
8241
  * for assets modules
7852
8242
  */
7853
- assetsInfo?: Map<string, undefined | AssetInfo>;
8243
+ dataUrl?: boolean;
7854
8244
 
7855
8245
  /**
7856
8246
  * for assets modules
7857
8247
  */
7858
- dataUrl?: boolean;
8248
+ assetInfo?: AssetInfo;
7859
8249
 
7860
8250
  /**
7861
- * for css modules
8251
+ * for external modules
7862
8252
  */
7863
- cssData?: CssData;
7864
- }
7865
- declare interface KnownBuildMeta {
8253
+ javascriptModule?: boolean;
8254
+
8255
+ /**
8256
+ * for lazy compilation modules
8257
+ */
8258
+ active?: boolean;
8259
+
8260
+ /**
8261
+ * for css modules
8262
+ */
8263
+ cssData?: CssData;
8264
+
8265
+ /**
8266
+ * for json modules
8267
+ */
8268
+ jsonData?: JsonData;
8269
+
8270
+ /**
8271
+ * top level declaration names
8272
+ */
8273
+ topLevelDeclarations?: Set<string>;
8274
+ }
8275
+ declare interface KnownBuildMeta {
7866
8276
  exportsType?: "namespace" | "dynamic" | "default" | "flagged";
7867
8277
  defaultObject?: false | "redirect" | "redirect-warn";
7868
8278
  strictHarmonyModule?: boolean;
@@ -7870,11 +8280,15 @@ declare interface KnownBuildMeta {
7870
8280
  sideEffectFree?: boolean;
7871
8281
  exportsFinalName?: Record<string, string>;
7872
8282
  isCSSModule?: boolean;
8283
+ jsIncompatibleExports?: Record<string, string>;
7873
8284
  }
7874
8285
  declare interface KnownCreateStatsOptionsContext {
7875
8286
  forToString?: boolean;
7876
8287
  }
7877
8288
  declare interface KnownHooks {
8289
+ /**
8290
+ * resolve step hook
8291
+ */
7878
8292
  resolveStep: SyncHook<
7879
8293
  [
7880
8294
  AsyncSeriesBailHook<
@@ -7884,11 +8298,23 @@ declare interface KnownHooks {
7884
8298
  ResolveRequest
7885
8299
  ]
7886
8300
  >;
8301
+
8302
+ /**
8303
+ * no resolve hook
8304
+ */
7887
8305
  noResolve: SyncHook<[ResolveRequest, Error]>;
8306
+
8307
+ /**
8308
+ * resolve hook
8309
+ */
7888
8310
  resolve: AsyncSeriesBailHook<
7889
8311
  [ResolveRequest, ResolveContext],
7890
8312
  null | ResolveRequest
7891
8313
  >;
8314
+
8315
+ /**
8316
+ * result hook
8317
+ */
7892
8318
  result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
7893
8319
  }
7894
8320
  declare interface KnownNormalizedStatsOptions {
@@ -7934,6 +8360,18 @@ declare interface KnownNormalizedStatsOptions {
7934
8360
  loggingDebug: ((value: string) => boolean)[];
7935
8361
  loggingTrace: boolean;
7936
8362
  }
8363
+ declare interface KnownRecords {
8364
+ aggressiveSplits?: SplitData[];
8365
+ chunks?: RecordsChunks;
8366
+ modules?: RecordsModules;
8367
+ hash?: string;
8368
+ hotIndex?: number;
8369
+ fullHashChunkModuleHashes?: FullHashChunkModuleHashes;
8370
+ chunkModuleHashes?: ChunkModuleHashes;
8371
+ chunkHashes?: ChunkHashes;
8372
+ chunkRuntime?: ChunkRuntime;
8373
+ chunkModuleIds?: ChunkModuleIds;
8374
+ }
7937
8375
  declare interface KnownStatsAsset {
7938
8376
  type: string;
7939
8377
  name: string;
@@ -8249,24 +8687,24 @@ declare interface LStatSync {
8249
8687
  declare interface LStatTypes {
8250
8688
  (
8251
8689
  path: PathLikeTypes,
8252
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
8690
+ callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
8253
8691
  ): void;
8254
8692
  (
8255
8693
  path: PathLikeTypes,
8256
8694
  options: undefined | (StatOptions & { bigint?: false }),
8257
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
8695
+ callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
8258
8696
  ): void;
8259
8697
  (
8260
8698
  path: PathLikeTypes,
8261
8699
  options: StatOptions & { bigint: true },
8262
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
8700
+ callback: (err: null | NodeJS.ErrnoException, result?: IBigIntStats) => void
8263
8701
  ): void;
8264
8702
  (
8265
8703
  path: PathLikeTypes,
8266
8704
  options: undefined | StatOptions,
8267
8705
  callback: (
8268
- arg0: null | NodeJS.ErrnoException,
8269
- arg1?: IStats | IBigIntStats
8706
+ err: null | NodeJS.ErrnoException,
8707
+ result?: IStats | IBigIntStats
8270
8708
  ) => void
8271
8709
  ): void;
8272
8710
  }
@@ -8350,16 +8788,16 @@ declare class LazySet<T> {
8350
8788
  addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
8351
8789
  clear(): void;
8352
8790
  delete(value: T): boolean;
8353
- entries(): IterableIterator<[T, T]>;
8791
+ entries(): SetIterator<[T, T]>;
8354
8792
  forEach<K>(
8355
8793
  callbackFn: (value: T, value2: T, set: Set<T>) => void,
8356
8794
  thisArg: K
8357
8795
  ): void;
8358
8796
  has(item: T): boolean;
8359
- keys(): IterableIterator<T>;
8360
- values(): IterableIterator<T>;
8797
+ keys(): SetIterator<T>;
8798
+ values(): SetIterator<T>;
8361
8799
  serialize(__0: ObjectSerializerContext): void;
8362
- [Symbol.iterator](): IterableIterator<T>;
8800
+ [Symbol.iterator](): SetIterator<T>;
8363
8801
  static deserialize<T>(__0: ObjectDeserializerContext): LazySet<T>;
8364
8802
  }
8365
8803
  declare interface LibIdentOptions {
@@ -8584,7 +9022,7 @@ type LoaderContextDeclarationsIndex<OptionsType> =
8584
9022
  LoaderRunnerLoaderContext<OptionsType> &
8585
9023
  LoaderPluginLoaderContext &
8586
9024
  HotModuleReplacementPluginLoaderContext;
8587
- type LoaderContextNormalModule<T> = NormalModuleLoaderContext<T> &
9025
+ type LoaderContextObject<T> = NormalModuleLoaderContext<T> &
8588
9026
  LoaderRunnerLoaderContext<T> &
8589
9027
  LoaderPluginLoaderContext &
8590
9028
  HotModuleReplacementPluginLoaderContext;
@@ -8606,7 +9044,7 @@ declare interface LoaderDefinitionFunction<
8606
9044
  HotModuleReplacementPluginLoaderContext &
8607
9045
  ContextAdditions,
8608
9046
  content: string,
8609
- sourceMap?: string | SourceMap,
9047
+ sourceMap?: string | RawSourceMap,
8610
9048
  additionalData?: AdditionalData
8611
9049
  ): string | void | Buffer | Promise<string | Buffer>;
8612
9050
  }
@@ -8707,7 +9145,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
8707
9145
  async(): (
8708
9146
  err?: null | Error,
8709
9147
  content?: string | Buffer,
8710
- sourceMap?: null | string | SourceMap,
9148
+ sourceMap?: null | string | RawSourceMap,
8711
9149
  additionalData?: AdditionalData
8712
9150
  ) => void;
8713
9151
 
@@ -8721,7 +9159,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
8721
9159
  callback: (
8722
9160
  err?: null | Error,
8723
9161
  content?: string | Buffer,
8724
- sourceMap?: null | string | SourceMap,
9162
+ sourceMap?: null | string | RawSourceMap,
8725
9163
  additionalData?: AdditionalData
8726
9164
  ) => void;
8727
9165
 
@@ -9005,7 +9443,14 @@ declare interface MakeDirectoryOptions {
9005
9443
  mode?: string | number;
9006
9444
  }
9007
9445
  declare interface MapOptions {
9446
+ /**
9447
+ * need columns?
9448
+ */
9008
9449
  columns?: boolean;
9450
+
9451
+ /**
9452
+ * is module
9453
+ */
9009
9454
  module?: boolean;
9010
9455
  }
9011
9456
  declare interface MatchObject {
@@ -9163,10 +9608,7 @@ declare class Module extends DependenciesBlock {
9163
9608
  isProvided(exportName: string): null | boolean;
9164
9609
  get exportsArgument(): string;
9165
9610
  get moduleArgument(): string;
9166
- getExportsType(
9167
- moduleGraph: ModuleGraph,
9168
- strict?: boolean
9169
- ): "namespace" | "default-only" | "default-with-named" | "dynamic";
9611
+ getExportsType(moduleGraph: ModuleGraph, strict?: boolean): ExportsType;
9170
9612
  addPresentationalDependency(presentationalDependency: Dependency): void;
9171
9613
  addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
9172
9614
  addWarning(warning: WebpackError): void;
@@ -9505,6 +9947,7 @@ declare class ModuleGraph {
9505
9947
  setDepth(module: Module, depth: number): void;
9506
9948
  setDepthIfLower(module: Module, depth: number): boolean;
9507
9949
  isAsync(module: Module): boolean;
9950
+ isDeferred(module: Module): boolean;
9508
9951
  setAsync(module: Module): void;
9509
9952
  getMeta(thing: object): any;
9510
9953
  getMetaIfExisting(thing: object): any;
@@ -9577,12 +10020,12 @@ declare class ModuleGraphConnection {
9577
10020
  getActiveState(runtime: RuntimeSpec): ConnectionState;
9578
10021
  setActive(value: boolean): void;
9579
10022
  active: void;
10023
+ static CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION;
10024
+ static TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY;
9580
10025
  static addConnectionStates: (
9581
10026
  a: ConnectionState,
9582
10027
  b: ConnectionState
9583
10028
  ) => ConnectionState;
9584
- static TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY;
9585
- static CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION;
9586
10029
  }
9587
10030
  type ModuleId = string | number;
9588
10031
  type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
@@ -9797,6 +10240,11 @@ declare interface ModuleReferenceOptions {
9797
10240
  */
9798
10241
  directImport: boolean;
9799
10242
 
10243
+ /**
10244
+ * true, when this referenced export is deferred
10245
+ */
10246
+ deferredImport: boolean;
10247
+
9800
10248
  /**
9801
10249
  * if the position is ASI safe or unknown
9802
10250
  */
@@ -9937,7 +10385,7 @@ declare class MultiCompiler {
9937
10385
  runWithDependencies(
9938
10386
  compilers: Compiler[],
9939
10387
  fn: (compiler: Compiler, callback: CallbackFunction_1<MultiStats>) => any,
9940
- callback: CallbackFunction_1<MultiStats>
10388
+ callback: CallbackFunction_1<Stats[]>
9941
10389
  ): void;
9942
10390
  watch(
9943
10391
  watchOptions: WatchOptions | WatchOptions[],
@@ -10127,17 +10575,17 @@ declare class NormalModule extends Module {
10127
10575
  context: string,
10128
10576
  name: string,
10129
10577
  content: string | Buffer,
10130
- sourceMap?: string | SourceMap,
10578
+ sourceMap?: string | RawSourceMap,
10131
10579
  associatedObjectForCache?: object
10132
10580
  ): Source;
10133
10581
  getCurrentLoader(
10134
- loaderContext: LoaderContextNormalModule<any>,
10582
+ loaderContext: LoaderContextObject<any>,
10135
10583
  index?: number
10136
10584
  ): null | LoaderItem;
10137
10585
  createSource(
10138
10586
  context: string,
10139
10587
  content: string | Buffer,
10140
- sourceMap?: null | string | SourceMapSource,
10588
+ sourceMap?: null | string | RawSourceMap,
10141
10589
  associatedObjectForCache?: object
10142
10590
  ): Source;
10143
10591
  markModuleAsErrored(error: WebpackError): void;
@@ -10157,9 +10605,9 @@ declare class NormalModule extends Module {
10157
10605
  static deserialize(context: ObjectDeserializerContext): NormalModule;
10158
10606
  }
10159
10607
  declare interface NormalModuleCompilationHooks {
10160
- loader: SyncHook<[LoaderContextNormalModule<any>, NormalModule]>;
10608
+ loader: SyncHook<[LoaderContextObject<any>, NormalModule]>;
10161
10609
  beforeLoaders: SyncHook<
10162
- [LoaderItem[], NormalModule, LoaderContextNormalModule<any>]
10610
+ [LoaderItem[], NormalModule, LoaderContextObject<any>]
10163
10611
  >;
10164
10612
  beforeParse: SyncHook<[NormalModule]>;
10165
10613
  beforeSnapshot: SyncHook<[NormalModule]>;
@@ -10169,13 +10617,17 @@ declare interface NormalModuleCompilationHooks {
10169
10617
  >
10170
10618
  >;
10171
10619
  readResource: HookMap<
10172
- AsyncSeriesBailHook<
10173
- [LoaderContextNormalModule<any>],
10174
- null | string | Buffer
10175
- >
10620
+ AsyncSeriesBailHook<[LoaderContextObject<any>], null | string | Buffer>
10176
10621
  >;
10177
10622
  processResult: SyncWaterfallHook<
10178
- [[string | Buffer, string | SourceMapSource, PreparsedAst], NormalModule]
10623
+ [
10624
+ [
10625
+ string | Buffer,
10626
+ undefined | string | RawSourceMap,
10627
+ undefined | PreparsedAst
10628
+ ],
10629
+ NormalModule
10630
+ ]
10179
10631
  >;
10180
10632
  needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
10181
10633
  }
@@ -10188,7 +10640,7 @@ declare interface NormalModuleCreateData {
10188
10640
  /**
10189
10641
  * module type. When deserializing, this is set to an empty string "".
10190
10642
  */
10191
- type: "" | "javascript/auto" | "javascript/dynamic" | "javascript/esm";
10643
+ type: string;
10192
10644
 
10193
10645
  /**
10194
10646
  * request string
@@ -10287,7 +10739,15 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
10287
10739
  SyncBailHook<[GeneratorOptions], void | Generator>
10288
10740
  >;
10289
10741
  generator: HookMap<SyncBailHook<[any, GeneratorOptions], void>>;
10290
- createModuleClass: HookMap<SyncBailHook<[any, ResolveData], void | Module>>;
10742
+ createModuleClass: HookMap<
10743
+ SyncBailHook<
10744
+ [
10745
+ Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
10746
+ ResolveData
10747
+ ],
10748
+ void | Module
10749
+ >
10750
+ >;
10291
10751
  }>;
10292
10752
  resolverFactory: ResolverFactory;
10293
10753
  ruleSet: RuleSet;
@@ -10451,6 +10911,9 @@ declare class NullDependency extends Dependency {
10451
10911
  declare class NullDependencyTemplate extends DependencyTemplate {
10452
10912
  constructor();
10453
10913
  }
10914
+ declare interface ObjectConfiguration {
10915
+ [index: string]: any;
10916
+ }
10454
10917
  declare interface ObjectDeserializerContext {
10455
10918
  read: () => any;
10456
10919
  setCircularReference: (value: ReferenceableItem) => void;
@@ -11153,8 +11616,26 @@ declare interface OriginRecord {
11153
11616
  request: string;
11154
11617
  }
11155
11618
  declare class OriginalSource extends Source {
11156
- constructor(source: string | Buffer, name: string);
11619
+ constructor(value: string | Buffer, name: string);
11157
11620
  getName(): string;
11621
+ streamChunks(
11622
+ options: StreamChunksOptions,
11623
+ onChunk: (
11624
+ chunk: undefined | string,
11625
+ generatedLine: number,
11626
+ generatedColumn: number,
11627
+ sourceIndex: number,
11628
+ originalLine: number,
11629
+ originalColumn: number,
11630
+ nameIndex: number
11631
+ ) => void,
11632
+ onSource: (
11633
+ sourceIndex: number,
11634
+ source: null | string,
11635
+ sourceContent?: string
11636
+ ) => void,
11637
+ _onName: (nameIndex: number, name: string) => void
11638
+ ): GeneratedSourceInfo;
11158
11639
  }
11159
11640
 
11160
11641
  /**
@@ -11727,12 +12208,39 @@ declare interface ParameterizedComparator<TArg extends object, T> {
11727
12208
  (tArg: TArg): Comparator<T>;
11728
12209
  }
11729
12210
  declare interface ParsedIdentifier {
12211
+ /**
12212
+ * request
12213
+ */
11730
12214
  request: string;
12215
+
12216
+ /**
12217
+ * query
12218
+ */
11731
12219
  query: string;
12220
+
12221
+ /**
12222
+ * fragment
12223
+ */
11732
12224
  fragment: string;
12225
+
12226
+ /**
12227
+ * is directory
12228
+ */
11733
12229
  directory: boolean;
12230
+
12231
+ /**
12232
+ * is module
12233
+ */
11734
12234
  module: boolean;
12235
+
12236
+ /**
12237
+ * is file
12238
+ */
11735
12239
  file: boolean;
12240
+
12241
+ /**
12242
+ * is internal
12243
+ */
11736
12244
  internal: boolean;
11737
12245
  }
11738
12246
  declare class Parser {
@@ -11945,13 +12453,16 @@ type Plugin =
11945
12453
  | false
11946
12454
  | ""
11947
12455
  | 0
11948
- | { apply: (arg0: Resolver) => void }
11949
- | ((this: Resolver, arg1: Resolver) => void);
12456
+ | { apply: (this: Resolver, resolver: Resolver) => void }
12457
+ | ((this: Resolver, resolver: Resolver) => void);
11950
12458
  declare interface PnpApi {
12459
+ /**
12460
+ * resolve to unqualified
12461
+ */
11951
12462
  resolveToUnqualified: (
11952
- arg0: string,
11953
- arg1: string,
11954
- arg2: object
12463
+ packageName: string,
12464
+ issuer: string,
12465
+ options: { considerBuiltins: boolean }
11955
12466
  ) => null | string;
11956
12467
  }
11957
12468
  declare class PrefetchPlugin {
@@ -11965,9 +12476,27 @@ declare class PrefetchPlugin {
11965
12476
  apply(compiler: Compiler): void;
11966
12477
  }
11967
12478
  declare class PrefixSource extends Source {
11968
- constructor(prefix: string, source: string | Source);
11969
- original(): Source;
12479
+ constructor(prefix: string, source: string | Source | Buffer);
11970
12480
  getPrefix(): string;
12481
+ original(): Source;
12482
+ streamChunks(
12483
+ options: StreamChunksOptions,
12484
+ onChunk: (
12485
+ chunk: undefined | string,
12486
+ generatedLine: number,
12487
+ generatedColumn: number,
12488
+ sourceIndex: number,
12489
+ originalLine: number,
12490
+ originalColumn: number,
12491
+ nameIndex: number
12492
+ ) => void,
12493
+ onSource: (
12494
+ sourceIndex: number,
12495
+ source: null | string,
12496
+ sourceContent?: string
12497
+ ) => void,
12498
+ onName: (nameIndex: number, name: string) => void
12499
+ ): GeneratedSourceInfo;
11971
12500
  }
11972
12501
  declare interface PreparsedAst {
11973
12502
  [index: string]: any;
@@ -12185,22 +12714,77 @@ declare interface RawLoaderDefinitionFunction<
12185
12714
  HotModuleReplacementPluginLoaderContext &
12186
12715
  ContextAdditions,
12187
12716
  content: Buffer,
12188
- sourceMap?: string | SourceMap,
12717
+ sourceMap?: string | RawSourceMap,
12189
12718
  additionalData?: AdditionalData
12190
12719
  ): string | void | Buffer | Promise<string | Buffer>;
12191
12720
  }
12192
12721
  declare class RawSource extends Source {
12193
- constructor(source: string | Buffer, convertToString?: boolean);
12722
+ constructor(value: string | Buffer, convertToString?: boolean);
12194
12723
  isBuffer(): boolean;
12724
+ streamChunks(
12725
+ options: StreamChunksOptions,
12726
+ onChunk: (
12727
+ chunk: undefined | string,
12728
+ generatedLine: number,
12729
+ generatedColumn: number,
12730
+ sourceIndex: number,
12731
+ originalLine: number,
12732
+ originalColumn: number,
12733
+ nameIndex: number
12734
+ ) => void,
12735
+ onSource: (
12736
+ sourceIndex: number,
12737
+ source: null | string,
12738
+ sourceContent?: string
12739
+ ) => void,
12740
+ onName: (nameIndex: number, name: string) => void
12741
+ ): GeneratedSourceInfo;
12195
12742
  }
12196
12743
  declare interface RawSourceMap {
12744
+ /**
12745
+ * version
12746
+ */
12197
12747
  version: number;
12748
+
12749
+ /**
12750
+ * sources
12751
+ */
12198
12752
  sources: string[];
12753
+
12754
+ /**
12755
+ * names
12756
+ */
12199
12757
  names: string[];
12758
+
12759
+ /**
12760
+ * source root
12761
+ */
12200
12762
  sourceRoot?: string;
12763
+
12764
+ /**
12765
+ * sources content
12766
+ */
12201
12767
  sourcesContent?: string[];
12768
+
12769
+ /**
12770
+ * mappings
12771
+ */
12202
12772
  mappings: string;
12773
+
12774
+ /**
12775
+ * file
12776
+ */
12203
12777
  file: string;
12778
+
12779
+ /**
12780
+ * debug id
12781
+ */
12782
+ debugId?: string;
12783
+
12784
+ /**
12785
+ * ignore list
12786
+ */
12787
+ ignoreList?: number[];
12204
12788
  }
12205
12789
  declare interface Read<
12206
12790
  TBuffer extends
@@ -12381,7 +12965,7 @@ declare interface ReadFileTypes {
12381
12965
  | undefined
12382
12966
  | null
12383
12967
  | ({ encoding?: null; flag?: string } & Abortable),
12384
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
12968
+ callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
12385
12969
  ): void;
12386
12970
  (
12387
12971
  path: PathOrFileDescriptorTypes,
@@ -12399,7 +12983,7 @@ declare interface ReadFileTypes {
12399
12983
  | "binary"
12400
12984
  | "hex"
12401
12985
  | ({ encoding: BufferEncoding; flag?: string } & Abortable),
12402
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
12986
+ callback: (err: null | NodeJS.ErrnoException, result?: string) => void
12403
12987
  ): void;
12404
12988
  (
12405
12989
  path: PathOrFileDescriptorTypes,
@@ -12420,13 +13004,13 @@ declare interface ReadFileTypes {
12420
13004
  | "hex"
12421
13005
  | (ObjectEncodingOptions & { flag?: string } & Abortable),
12422
13006
  callback: (
12423
- arg0: null | NodeJS.ErrnoException,
12424
- arg1?: string | Buffer
13007
+ err: null | NodeJS.ErrnoException,
13008
+ result?: string | Buffer
12425
13009
  ) => void
12426
13010
  ): void;
12427
13011
  (
12428
13012
  path: PathOrFileDescriptorTypes,
12429
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
13013
+ callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
12430
13014
  ): void;
12431
13015
  }
12432
13016
  declare interface ReaddirFs {
@@ -12465,18 +13049,14 @@ declare interface ReaddirFs {
12465
13049
  withFileTypes?: false;
12466
13050
  recursive?: boolean;
12467
13051
  },
12468
- callback: (err: null | NodeJS.ErrnoException, result?: string[]) => void
13052
+ callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void
12469
13053
  ): void;
12470
13054
  (
12471
13055
  path: PathLikeFs,
12472
13056
  options:
12473
13057
  | "buffer"
12474
13058
  | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
12475
- callback: (err: null | NodeJS.ErrnoException, result?: Buffer[]) => void
12476
- ): void;
12477
- (
12478
- path: PathLikeFs,
12479
- callback: (err: null | NodeJS.ErrnoException, result?: string[]) => void
13059
+ callback: (err: null | NodeJS.ErrnoException, files?: Buffer[]) => void
12480
13060
  ): void;
12481
13061
  (
12482
13062
  path: PathLikeFs,
@@ -12501,16 +13081,31 @@ declare interface ReaddirFs {
12501
13081
  }),
12502
13082
  callback: (
12503
13083
  err: null | NodeJS.ErrnoException,
12504
- result?: string[] | Buffer[]
13084
+ files?: string[] | Buffer[]
12505
13085
  ) => void
12506
13086
  ): void;
13087
+ (
13088
+ path: PathLikeFs,
13089
+ callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void
13090
+ ): void;
12507
13091
  (
12508
13092
  path: PathLikeFs,
12509
13093
  options: ObjectEncodingOptions & {
12510
13094
  withFileTypes: true;
12511
13095
  recursive?: boolean;
12512
13096
  },
12513
- callback: (err: null | NodeJS.ErrnoException, result?: Dirent[]) => void
13097
+ callback: (
13098
+ err: null | NodeJS.ErrnoException,
13099
+ files?: Dirent<string>[]
13100
+ ) => void
13101
+ ): void;
13102
+ (
13103
+ path: PathLikeFs,
13104
+ options: { encoding: "buffer"; withFileTypes: true; recursive?: boolean },
13105
+ callback: (
13106
+ err: null | NodeJS.ErrnoException,
13107
+ files: Dirent<Buffer>[]
13108
+ ) => void
12514
13109
  ): void;
12515
13110
  }
12516
13111
  declare interface ReaddirSync {
@@ -12579,7 +13174,11 @@ declare interface ReaddirSync {
12579
13174
  withFileTypes: true;
12580
13175
  recursive?: boolean;
12581
13176
  }
12582
- ): Dirent[];
13177
+ ): Dirent<string>[];
13178
+ (
13179
+ path: PathLikeFs,
13180
+ options: { encoding: "buffer"; withFileTypes: true; recursive?: boolean }
13181
+ ): Dirent<Buffer>[];
12583
13182
  }
12584
13183
  declare interface ReaddirTypes {
12585
13184
  (
@@ -12617,18 +13216,14 @@ declare interface ReaddirTypes {
12617
13216
  withFileTypes?: false;
12618
13217
  recursive?: boolean;
12619
13218
  },
12620
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
13219
+ callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void
12621
13220
  ): void;
12622
13221
  (
12623
13222
  path: PathLikeTypes,
12624
13223
  options:
12625
13224
  | "buffer"
12626
13225
  | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
12627
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
12628
- ): void;
12629
- (
12630
- path: PathLikeTypes,
12631
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
13226
+ callback: (err: null | NodeJS.ErrnoException, files?: Buffer[]) => void
12632
13227
  ): void;
12633
13228
  (
12634
13229
  path: PathLikeTypes,
@@ -12652,17 +13247,32 @@ declare interface ReaddirTypes {
12652
13247
  recursive?: boolean;
12653
13248
  }),
12654
13249
  callback: (
12655
- arg0: null | NodeJS.ErrnoException,
12656
- arg1?: string[] | Buffer[]
13250
+ err: null | NodeJS.ErrnoException,
13251
+ files?: string[] | Buffer[]
12657
13252
  ) => void
12658
13253
  ): void;
13254
+ (
13255
+ path: PathLikeTypes,
13256
+ callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void
13257
+ ): void;
12659
13258
  (
12660
13259
  path: PathLikeTypes,
12661
13260
  options: ObjectEncodingOptions & {
12662
13261
  withFileTypes: true;
12663
13262
  recursive?: boolean;
12664
13263
  },
12665
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
13264
+ callback: (
13265
+ err: null | NodeJS.ErrnoException,
13266
+ files?: Dirent<string>[]
13267
+ ) => void
13268
+ ): void;
13269
+ (
13270
+ path: PathLikeTypes,
13271
+ options: { encoding: "buffer"; withFileTypes: true; recursive?: boolean },
13272
+ callback: (
13273
+ err: null | NodeJS.ErrnoException,
13274
+ files: Dirent<Buffer>[]
13275
+ ) => void
12666
13276
  ): void;
12667
13277
  }
12668
13278
  declare interface ReadlinkFs {
@@ -12698,24 +13308,24 @@ declare interface ReadlinkTypes {
12698
13308
  (
12699
13309
  path: PathLikeTypes,
12700
13310
  options: EncodingOption,
12701
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
13311
+ callback: (err: null | NodeJS.ErrnoException, result?: string) => void
12702
13312
  ): void;
12703
13313
  (
12704
13314
  path: PathLikeTypes,
12705
13315
  options: BufferEncodingOption,
12706
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
13316
+ callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
12707
13317
  ): void;
12708
13318
  (
12709
13319
  path: PathLikeTypes,
12710
13320
  options: EncodingOption,
12711
13321
  callback: (
12712
- arg0: null | NodeJS.ErrnoException,
12713
- arg1?: string | Buffer
13322
+ err: null | NodeJS.ErrnoException,
13323
+ result?: string | Buffer
12714
13324
  ) => void
12715
13325
  ): void;
12716
13326
  (
12717
13327
  path: PathLikeTypes,
12718
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
13328
+ callback: (err: null | NodeJS.ErrnoException, result?: string) => void
12719
13329
  ): void;
12720
13330
  }
12721
13331
  declare class RealContentHashPlugin {
@@ -12778,28 +13388,37 @@ declare interface RealPathTypes {
12778
13388
  (
12779
13389
  path: PathLikeTypes,
12780
13390
  options: EncodingOption,
12781
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
13391
+ callback: (err: null | NodeJS.ErrnoException, result?: string) => void
12782
13392
  ): void;
12783
13393
  (
12784
13394
  path: PathLikeTypes,
12785
13395
  options: BufferEncodingOption,
12786
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
13396
+ callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
12787
13397
  ): void;
12788
13398
  (
12789
13399
  path: PathLikeTypes,
12790
13400
  options: EncodingOption,
12791
13401
  callback: (
12792
- arg0: null | NodeJS.ErrnoException,
12793
- arg1?: string | Buffer
13402
+ err: null | NodeJS.ErrnoException,
13403
+ result?: string | Buffer
12794
13404
  ) => void
12795
13405
  ): void;
12796
13406
  (
12797
13407
  path: PathLikeTypes,
12798
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
13408
+ callback: (err: null | NodeJS.ErrnoException, result?: string) => void
12799
13409
  ): void;
12800
13410
  }
12801
- declare interface Records {
12802
- [index: string]: any;
13411
+ type Records = KnownRecords &
13412
+ Record<string, KnownRecords[]> &
13413
+ Record<string, any>;
13414
+ declare interface RecordsChunks {
13415
+ byName?: Record<string, number>;
13416
+ bySource?: Record<string, number>;
13417
+ usedIds?: number[];
13418
+ }
13419
+ declare interface RecordsModules {
13420
+ byIdentifier?: Record<string, number>;
13421
+ usedIds?: number[];
12803
13422
  }
12804
13423
  type RecursiveArrayOrRecord<T> =
12805
13424
  | { [index: string]: RecursiveArrayOrRecord<T> }
@@ -12980,17 +13599,38 @@ declare interface RenderManifestOptions {
12980
13599
  }
12981
13600
  declare class ReplaceSource extends Source {
12982
13601
  constructor(source: Source, name?: string);
13602
+ getName(): undefined | string;
13603
+ getReplacements(): Replacement[];
12983
13604
  replace(start: number, end: number, newValue: string, name?: string): void;
12984
13605
  insert(pos: number, newValue: string, name?: string): void;
12985
- getName(): string;
12986
- original(): string;
12987
- getReplacements(): {
12988
- start: number;
12989
- end: number;
12990
- content: string;
12991
- insertIndex: number;
12992
- name: string;
12993
- }[];
13606
+ original(): Source;
13607
+ streamChunks(
13608
+ options: StreamChunksOptions,
13609
+ onChunk: (
13610
+ chunk: undefined | string,
13611
+ generatedLine: number,
13612
+ generatedColumn: number,
13613
+ sourceIndex: number,
13614
+ originalLine: number,
13615
+ originalColumn: number,
13616
+ nameIndex: number
13617
+ ) => void,
13618
+ onSource: (
13619
+ sourceIndex: number,
13620
+ source: null | string,
13621
+ sourceContent?: string
13622
+ ) => void,
13623
+ onName: (nameIndex: number, name: string) => void
13624
+ ): GeneratedSourceInfo;
13625
+ static Replacement: typeof Replacement;
13626
+ }
13627
+ declare class Replacement {
13628
+ constructor(start: number, end: number, content: string, name?: string);
13629
+ start: number;
13630
+ end: number;
13631
+ content: string;
13632
+ name?: string;
13633
+ index?: number;
12994
13634
  }
12995
13635
  declare interface RequestRecord {
12996
13636
  [index: string]: string | string[];
@@ -13026,6 +13666,9 @@ declare interface ResolveBuildDependenciesResult {
13026
13666
  resolveDependencies: ResolveDependencies;
13027
13667
  }
13028
13668
  declare interface ResolveContext {
13669
+ /**
13670
+ * directories that was found on file system
13671
+ */
13029
13672
  contextDependencies?: WriteOnlySet<string>;
13030
13673
 
13031
13674
  /**
@@ -13046,12 +13689,12 @@ declare interface ResolveContext {
13046
13689
  /**
13047
13690
  * log function
13048
13691
  */
13049
- log?: (arg0: string) => void;
13692
+ log?: (str: string) => void;
13050
13693
 
13051
13694
  /**
13052
13695
  * yield result, if provided plugins can return several results
13053
13696
  */
13054
- yield?: (arg0: ResolveRequest) => void;
13697
+ yield?: (request: ResolveRequest) => void;
13055
13698
  }
13056
13699
  declare interface ResolveData {
13057
13700
  contextInfo: ModuleFactoryCreateDataContextInfo;
@@ -13279,123 +13922,226 @@ declare interface ResolveOptions {
13279
13922
  useSyncFileSystemCalls?: boolean;
13280
13923
  }
13281
13924
  declare interface ResolveOptionsResolverFactoryObject1 {
13282
- alias: AliasOption[];
13283
- fallback: AliasOption[];
13284
- aliasFields: Set<string | string[]>;
13285
- extensionAlias: ExtensionAliasOption[];
13286
- cachePredicate: (arg0: ResolveRequest) => boolean;
13287
- cacheWithContext: boolean;
13288
-
13289
- /**
13290
- * A list of exports field condition names.
13291
- */
13292
- conditionNames: Set<string>;
13293
- descriptionFiles: string[];
13294
- enforceExtension: boolean;
13295
- exportsFields: Set<string | string[]>;
13296
- importsFields: Set<string | string[]>;
13297
- extensions: Set<string>;
13298
- fileSystem: FileSystem;
13299
- unsafeCache: false | object;
13300
- symlinks: boolean;
13301
- resolver?: Resolver;
13302
- modules: (string | string[])[];
13303
- mainFields: { name: string[]; forceRelative: boolean }[];
13304
- mainFiles: Set<string>;
13305
- plugins: Plugin[];
13306
- pnpApi: null | PnpApi;
13307
- roots: Set<string>;
13308
- fullySpecified: boolean;
13309
- resolveToContext: boolean;
13310
- restrictions: Set<string | RegExp>;
13311
- preferRelative: boolean;
13312
- preferAbsolute: boolean;
13313
- }
13314
- declare interface ResolveOptionsResolverFactoryObject2 {
13315
13925
  /**
13316
- * A list of module alias configurations or an object which maps key to value
13926
+ * alias
13317
13927
  */
13318
- alias?: AliasOption[] | AliasOptions;
13928
+ alias: AliasOption[];
13319
13929
 
13320
13930
  /**
13321
- * A list of module alias configurations or an object which maps key to value, applied only after modules option
13931
+ * fallback
13322
13932
  */
13323
- fallback?: AliasOption[] | AliasOptions;
13933
+ fallback: AliasOption[];
13324
13934
 
13325
13935
  /**
13326
- * An object which maps extension to extension aliases
13936
+ * alias fields
13327
13937
  */
13328
- extensionAlias?: ExtensionAliasOptions;
13938
+ aliasFields: Set<string | string[]>;
13329
13939
 
13330
13940
  /**
13331
- * A list of alias fields in description files
13941
+ * extension alias
13332
13942
  */
13333
- aliasFields?: (string | string[])[];
13943
+ extensionAlias: ExtensionAliasOption[];
13334
13944
 
13335
13945
  /**
13336
- * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
13946
+ * cache predicate
13337
13947
  */
13338
- cachePredicate?: (arg0: ResolveRequest) => boolean;
13948
+ cachePredicate: (predicate: ResolveRequest) => boolean;
13339
13949
 
13340
13950
  /**
13341
- * Whether or not the unsafeCache should include request context as part of the cache key.
13951
+ * cache with context
13342
13952
  */
13343
- cacheWithContext?: boolean;
13953
+ cacheWithContext: boolean;
13344
13954
 
13345
13955
  /**
13346
- * A list of description files to read from
13956
+ * A list of exports field condition names.
13347
13957
  */
13348
- descriptionFiles?: string[];
13958
+ conditionNames: Set<string>;
13349
13959
 
13350
13960
  /**
13351
- * A list of exports field condition names.
13961
+ * description files
13352
13962
  */
13353
- conditionNames?: string[];
13963
+ descriptionFiles: string[];
13354
13964
 
13355
13965
  /**
13356
- * Enforce that a extension from extensions must be used
13966
+ * enforce extension
13357
13967
  */
13358
- enforceExtension?: boolean;
13968
+ enforceExtension: boolean;
13359
13969
 
13360
13970
  /**
13361
- * A list of exports fields in description files
13971
+ * exports fields
13362
13972
  */
13363
- exportsFields?: (string | string[])[];
13973
+ exportsFields: Set<string | string[]>;
13364
13974
 
13365
13975
  /**
13366
- * A list of imports fields in description files
13976
+ * imports fields
13367
13977
  */
13368
- importsFields?: (string | string[])[];
13978
+ importsFields: Set<string | string[]>;
13369
13979
 
13370
13980
  /**
13371
- * A list of extensions which should be tried for files
13981
+ * extensions
13372
13982
  */
13373
- extensions?: string[];
13983
+ extensions: Set<string>;
13374
13984
 
13375
13985
  /**
13376
- * The file system which should be used
13986
+ * fileSystem
13377
13987
  */
13378
13988
  fileSystem: FileSystem;
13379
13989
 
13380
13990
  /**
13381
- * Use this cache object to unsafely cache the successful requests
13991
+ * unsafe cache
13382
13992
  */
13383
- unsafeCache?: boolean | object;
13993
+ unsafeCache: false | CacheTypes;
13384
13994
 
13385
13995
  /**
13386
- * Resolve symlinks to their symlinked location
13996
+ * symlinks
13387
13997
  */
13388
- symlinks?: boolean;
13998
+ symlinks: boolean;
13389
13999
 
13390
14000
  /**
13391
- * A prepared Resolver to which the plugins are attached
14001
+ * resolver
13392
14002
  */
13393
14003
  resolver?: Resolver;
13394
14004
 
13395
14005
  /**
13396
- * A list of directories to resolve modules from, can be absolute path or folder name
14006
+ * modules
13397
14007
  */
13398
- modules?: string | string[];
14008
+ modules: (string | string[])[];
14009
+
14010
+ /**
14011
+ * main fields
14012
+ */
14013
+ mainFields: { name: string[]; forceRelative: boolean }[];
14014
+
14015
+ /**
14016
+ * main files
14017
+ */
14018
+ mainFiles: Set<string>;
14019
+
14020
+ /**
14021
+ * plugins
14022
+ */
14023
+ plugins: Plugin[];
14024
+
14025
+ /**
14026
+ * pnp API
14027
+ */
14028
+ pnpApi: null | PnpApi;
14029
+
14030
+ /**
14031
+ * roots
14032
+ */
14033
+ roots: Set<string>;
14034
+
14035
+ /**
14036
+ * fully specified
14037
+ */
14038
+ fullySpecified: boolean;
14039
+
14040
+ /**
14041
+ * resolve to context
14042
+ */
14043
+ resolveToContext: boolean;
14044
+
14045
+ /**
14046
+ * restrictions
14047
+ */
14048
+ restrictions: Set<string | RegExp>;
14049
+
14050
+ /**
14051
+ * prefer relative
14052
+ */
14053
+ preferRelative: boolean;
14054
+
14055
+ /**
14056
+ * prefer absolute
14057
+ */
14058
+ preferAbsolute: boolean;
14059
+ }
14060
+ declare interface ResolveOptionsResolverFactoryObject2 {
14061
+ /**
14062
+ * A list of module alias configurations or an object which maps key to value
14063
+ */
14064
+ alias?: AliasOption[] | AliasOptions;
14065
+
14066
+ /**
14067
+ * A list of module alias configurations or an object which maps key to value, applied only after modules option
14068
+ */
14069
+ fallback?: AliasOption[] | AliasOptions;
14070
+
14071
+ /**
14072
+ * An object which maps extension to extension aliases
14073
+ */
14074
+ extensionAlias?: ExtensionAliasOptions;
14075
+
14076
+ /**
14077
+ * A list of alias fields in description files
14078
+ */
14079
+ aliasFields?: (string | string[])[];
14080
+
14081
+ /**
14082
+ * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
14083
+ */
14084
+ cachePredicate?: (predicate: ResolveRequest) => boolean;
14085
+
14086
+ /**
14087
+ * Whether or not the unsafeCache should include request context as part of the cache key.
14088
+ */
14089
+ cacheWithContext?: boolean;
14090
+
14091
+ /**
14092
+ * A list of description files to read from
14093
+ */
14094
+ descriptionFiles?: string[];
14095
+
14096
+ /**
14097
+ * A list of exports field condition names.
14098
+ */
14099
+ conditionNames?: string[];
14100
+
14101
+ /**
14102
+ * Enforce that a extension from extensions must be used
14103
+ */
14104
+ enforceExtension?: boolean;
14105
+
14106
+ /**
14107
+ * A list of exports fields in description files
14108
+ */
14109
+ exportsFields?: (string | string[])[];
14110
+
14111
+ /**
14112
+ * A list of imports fields in description files
14113
+ */
14114
+ importsFields?: (string | string[])[];
14115
+
14116
+ /**
14117
+ * A list of extensions which should be tried for files
14118
+ */
14119
+ extensions?: string[];
14120
+
14121
+ /**
14122
+ * The file system which should be used
14123
+ */
14124
+ fileSystem: FileSystem;
14125
+
14126
+ /**
14127
+ * Use this cache object to unsafely cache the successful requests
14128
+ */
14129
+ unsafeCache?: boolean | CacheTypes;
14130
+
14131
+ /**
14132
+ * Resolve symlinks to their symlinked location
14133
+ */
14134
+ symlinks?: boolean;
14135
+
14136
+ /**
14137
+ * A prepared Resolver to which the plugins are attached
14138
+ */
14139
+ resolver?: Resolver;
14140
+
14141
+ /**
14142
+ * A list of directories to resolve modules from, can be absolute path or folder name
14143
+ */
14144
+ modules?: string | string[];
13399
14145
 
13400
14146
  /**
13401
14147
  * A list of main fields in description files
@@ -14389,6 +15135,10 @@ declare abstract class RuntimeTemplate {
14389
15135
  * the module
14390
15136
  */
14391
15137
  module: Module;
15138
+ /**
15139
+ * the module graph
15140
+ */
15141
+ moduleGraph: ModuleGraph;
14392
15142
  /**
14393
15143
  * the chunk graph
14394
15144
  */
@@ -14413,12 +15163,20 @@ declare abstract class RuntimeTemplate {
14413
15163
  * if set, will be filled with runtime requirements
14414
15164
  */
14415
15165
  runtimeRequirements: Set<string>;
15166
+ /**
15167
+ * if set, the module will be deferred
15168
+ */
15169
+ defer?: boolean;
14416
15170
  }): [string, string];
14417
15171
  exportFromImport<GenerateContext>(__0: {
14418
15172
  /**
14419
15173
  * the module graph
14420
15174
  */
14421
15175
  moduleGraph: ModuleGraph;
15176
+ /**
15177
+ * the chunk graph
15178
+ */
15179
+ chunkGraph: ChunkGraph;
14422
15180
  /**
14423
15181
  * the module
14424
15182
  */
@@ -14467,6 +15225,10 @@ declare abstract class RuntimeTemplate {
14467
15225
  * if set, will be filled with runtime requirements
14468
15226
  */
14469
15227
  runtimeRequirements: Set<string>;
15228
+ /**
15229
+ * if true, the module will be deferred.
15230
+ */
15231
+ defer?: boolean;
14470
15232
  }): string;
14471
15233
  blockPromise(__0: {
14472
15234
  /**
@@ -14601,6 +15363,10 @@ declare abstract class SerializerMiddleware<
14601
15363
  context: Context
14602
15364
  ): DeserializedType | Promise<DeserializedType>;
14603
15365
  }
15366
+ declare interface SetIterator<T> extends IteratorObject<T, undefined> {
15367
+ [Symbol.iterator](): SetIterator<T>;
15368
+ [Symbol.dispose](): void;
15369
+ }
14604
15370
  declare class SharePlugin {
14605
15371
  constructor(options: SharePluginOptions);
14606
15372
 
@@ -14861,25 +15627,54 @@ declare abstract class SortableSet<T> extends Set<T> {
14861
15627
  }
14862
15628
  declare class Source {
14863
15629
  constructor();
15630
+ source(): SourceValue;
15631
+ buffer(): Buffer;
14864
15632
  size(): number;
14865
15633
  map(options?: MapOptions): null | RawSourceMap;
14866
- sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
14867
- updateHash(hash: Hash): void;
14868
- source(): string | Buffer;
14869
- buffer(): Buffer;
15634
+ sourceAndMap(options?: MapOptions): SourceAndMap;
15635
+ updateHash(hash: HashLike): void;
14870
15636
  }
14871
- declare interface SourceLike {
14872
- source(): string | Buffer;
15637
+ declare interface SourceAndMap {
15638
+ /**
15639
+ * source
15640
+ */
15641
+ source: SourceValue;
15642
+
15643
+ /**
15644
+ * map
15645
+ */
15646
+ map: null | RawSourceMap;
14873
15647
  }
14874
- declare interface SourceMap {
14875
- version: number;
14876
- sources: string[];
14877
- mappings: string;
14878
- file?: string;
14879
- sourceRoot?: string;
14880
- sourcesContent?: string[];
14881
- names?: string[];
14882
- debugId?: string;
15648
+ declare interface SourceLike {
15649
+ /**
15650
+ * source
15651
+ */
15652
+ source: () => SourceValue;
15653
+
15654
+ /**
15655
+ * buffer
15656
+ */
15657
+ buffer?: () => Buffer;
15658
+
15659
+ /**
15660
+ * size
15661
+ */
15662
+ size?: () => number;
15663
+
15664
+ /**
15665
+ * map
15666
+ */
15667
+ map?: (options?: MapOptions) => null | RawSourceMap;
15668
+
15669
+ /**
15670
+ * source and map
15671
+ */
15672
+ sourceAndMap?: (options?: MapOptions) => SourceAndMap;
15673
+
15674
+ /**
15675
+ * hash updater
15676
+ */
15677
+ updateHash?: (hash: HashLike) => void;
14883
15678
  }
14884
15679
  declare class SourceMapDevToolPlugin {
14885
15680
  constructor(options?: SourceMapDevToolPluginOptions);
@@ -14980,11 +15775,11 @@ declare interface SourceMapDevToolPluginOptions {
14980
15775
  }
14981
15776
  declare class SourceMapSource extends Source {
14982
15777
  constructor(
14983
- source: string | Buffer,
15778
+ value: string | Buffer,
14984
15779
  name: string,
14985
- sourceMap: string | Object | Buffer,
15780
+ sourceMap?: string | Buffer | RawSourceMap,
14986
15781
  originalSource?: string | Buffer,
14987
- innerSourceMap?: string | Object | Buffer,
15782
+ innerSourceMap?: string | Buffer | RawSourceMap,
14988
15783
  removeOriginalSource?: boolean
14989
15784
  );
14990
15785
  getArgsAsBuffers(): [
@@ -14993,13 +15788,32 @@ declare class SourceMapSource extends Source {
14993
15788
  Buffer,
14994
15789
  undefined | Buffer,
14995
15790
  undefined | Buffer,
14996
- boolean
15791
+ undefined | boolean
14997
15792
  ];
15793
+ streamChunks(
15794
+ options: StreamChunksOptions,
15795
+ onChunk: (
15796
+ chunk: undefined | string,
15797
+ generatedLine: number,
15798
+ generatedColumn: number,
15799
+ sourceIndex: number,
15800
+ originalLine: number,
15801
+ originalColumn: number,
15802
+ nameIndex: number
15803
+ ) => void,
15804
+ onSource: (
15805
+ sourceIndex: number,
15806
+ source: null | string,
15807
+ sourceContent?: string
15808
+ ) => void,
15809
+ onName: (nameIndex: number, name: string) => void
15810
+ ): GeneratedSourceInfo;
14998
15811
  }
14999
15812
  declare interface SourcePosition {
15000
15813
  line: number;
15001
15814
  column?: number;
15002
15815
  }
15816
+ type SourceValue = string | Buffer;
15003
15817
  declare interface SplitChunksOptions {
15004
15818
  chunksFilter: (chunk: Chunk) => undefined | boolean;
15005
15819
  defaultSizeTypes: string[];
@@ -15035,6 +15849,12 @@ declare class SplitChunksPlugin {
15035
15849
  declare interface SplitChunksSizes {
15036
15850
  [index: string]: number;
15037
15851
  }
15852
+ declare interface SplitData {
15853
+ id?: string | number;
15854
+ hash?: string;
15855
+ modules: Module[];
15856
+ size: number;
15857
+ }
15038
15858
  declare abstract class StackedMap<K, V> {
15039
15859
  map: Map<K, InternalCell<V>>;
15040
15860
  stack: Map<K, InternalCell<V>>[];
@@ -15107,24 +15927,24 @@ declare interface StatSyncOptions {
15107
15927
  declare interface StatTypes {
15108
15928
  (
15109
15929
  path: PathLikeTypes,
15110
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
15930
+ callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
15111
15931
  ): void;
15112
15932
  (
15113
15933
  path: PathLikeTypes,
15114
15934
  options: undefined | (StatOptions & { bigint?: false }),
15115
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
15935
+ callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
15116
15936
  ): void;
15117
15937
  (
15118
15938
  path: PathLikeTypes,
15119
15939
  options: StatOptions & { bigint: true },
15120
- callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
15940
+ callback: (err: null | NodeJS.ErrnoException, result?: IBigIntStats) => void
15121
15941
  ): void;
15122
15942
  (
15123
15943
  path: PathLikeTypes,
15124
15944
  options: undefined | StatOptions,
15125
15945
  callback: (
15126
- arg0: null | NodeJS.ErrnoException,
15127
- arg1?: IStats | IBigIntStats
15946
+ err: null | NodeJS.ErrnoException,
15947
+ result?: IStats | IBigIntStats
15128
15948
  ) => void
15129
15949
  ): void;
15130
15950
  }
@@ -15778,6 +16598,11 @@ type StatsValue =
15778
16598
  | "minimal"
15779
16599
  | "normal"
15780
16600
  | "detailed";
16601
+ declare interface StreamChunksOptions {
16602
+ source?: boolean;
16603
+ finalSource?: boolean;
16604
+ columns?: boolean;
16605
+ }
15781
16606
  type Supports = undefined | string;
15782
16607
  declare class SyncModuleIdsPlugin {
15783
16608
  constructor(__0: SyncModuleIdsPluginOptions);
@@ -15831,6 +16656,7 @@ declare interface TargetItemWithConnection {
15831
16656
  declare interface TargetItemWithoutConnection {
15832
16657
  module: Module;
15833
16658
  export: string[];
16659
+ deferred: boolean;
15834
16660
  }
15835
16661
  declare class Template {
15836
16662
  constructor();
@@ -15861,8 +16687,8 @@ declare class Template {
15861
16687
  runtimeModules: RuntimeModule[],
15862
16688
  renderContext: RenderContextJavascriptModulesPlugin
15863
16689
  ): Source;
15864
- static NUMBER_OF_IDENTIFIER_START_CHARS: number;
15865
16690
  static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
16691
+ static NUMBER_OF_IDENTIFIER_START_CHARS: number;
15866
16692
  }
15867
16693
  type TemplatePath =
15868
16694
  | string
@@ -15892,11 +16718,6 @@ declare interface TrustedTypes {
15892
16718
  policyName?: string;
15893
16719
  }
15894
16720
  declare const UNDEFINED_MARKER: unique symbol;
15895
-
15896
- /**
15897
- * `URL` class is a global reference for `require('url').URL`
15898
- * https://nodejs.org/api/url.html#the-whatwg-url-api
15899
- */
15900
16721
  declare interface URL_url extends URL {}
15901
16722
  type UnsafeCacheData = KnownUnsafeCacheData & Record<string, any>;
15902
16723
  declare interface UpdateHashContextDependency {
@@ -15917,6 +16738,9 @@ type UsageStateType = 0 | 1 | 2 | 3 | 4;
15917
16738
  type UsedName = string | false | string[];
15918
16739
  type Value = string | number | boolean | RegExp;
15919
16740
  type ValueCacheVersion = string | Set<string>;
16741
+ declare interface Values {
16742
+ [index: string]: Value[];
16743
+ }
15920
16744
  declare class VariableInfo {
15921
16745
  constructor(
15922
16746
  declaredScope: ScopeInfo,
@@ -15927,6 +16751,46 @@ declare class VariableInfo {
15927
16751
  freeName?: string | true;
15928
16752
  tagInfo?: TagInfo;
15929
16753
  }
16754
+ declare interface VirtualModuleConfig {
16755
+ /**
16756
+ * - The module type
16757
+ */
16758
+ type?: string;
16759
+
16760
+ /**
16761
+ * - The source function
16762
+ */
16763
+ source: (loaderContext: LoaderContextObject<any>) => string | Promise<string>;
16764
+
16765
+ /**
16766
+ * - Optional version function or value
16767
+ */
16768
+ version?: string | true | (() => string);
16769
+ }
16770
+ type VirtualModuleInput =
16771
+ | string
16772
+ | ((loaderContext: LoaderContextObject<any>) => string | Promise<string>)
16773
+ | VirtualModuleConfig;
16774
+ declare interface VirtualModules {
16775
+ [index: string]: VirtualModuleInput;
16776
+ }
16777
+ declare class VirtualUrlPlugin {
16778
+ constructor(modules: VirtualModules, scheme?: string);
16779
+ scheme: string;
16780
+ modules: { [index: string]: VirtualModuleConfig };
16781
+
16782
+ /**
16783
+ * Apply the plugin
16784
+ */
16785
+ apply(compiler: Compiler): void;
16786
+ findVirtualModuleConfigById(id: string): VirtualModuleConfig;
16787
+
16788
+ /**
16789
+ * Get the cache version for a given version value
16790
+ */
16791
+ getCacheVersion(version: string | true | (() => string)): undefined | string;
16792
+ static DEFAULT_SCHEME: string;
16793
+ }
15930
16794
  type WarningFilterItemTypes =
15931
16795
  | string
15932
16796
  | RegExp
@@ -16467,6 +17331,7 @@ declare interface WriteFile {
16467
17331
  | Int32Array
16468
17332
  | BigUint64Array
16469
17333
  | BigInt64Array
17334
+ | Float16Array
16470
17335
  | Float32Array
16471
17336
  | Float64Array
16472
17337
  | DataView,
@@ -16486,6 +17351,7 @@ declare interface WriteFile {
16486
17351
  | Int32Array
16487
17352
  | BigUint64Array
16488
17353
  | BigInt64Array
17354
+ | Float16Array
16489
17355
  | Float32Array
16490
17356
  | Float64Array
16491
17357
  | DataView,
@@ -16599,8 +17465,8 @@ declare namespace exports {
16599
17465
  ) => Flags;
16600
17466
  export let processArguments: (
16601
17467
  args: Flags,
16602
- config: any,
16603
- values: Record<string, Value[]>
17468
+ config: ObjectConfiguration,
17469
+ values: Values
16604
17470
  ) => null | Problem[];
16605
17471
  }
16606
17472
  export namespace ModuleFilenameHelpers {
@@ -16651,81 +17517,85 @@ declare namespace exports {
16651
17517
  export let matchObject: (obj: MatchObject, str: string) => boolean;
16652
17518
  }
16653
17519
  export namespace OptimizationStages {
17520
+ export let STAGE_ADVANCED: 10;
16654
17521
  export let STAGE_BASIC: -10;
16655
17522
  export let STAGE_DEFAULT: 0;
16656
- export let STAGE_ADVANCED: 10;
16657
17523
  }
16658
17524
  export namespace RuntimeGlobals {
16659
- export let require: "__webpack_require__";
16660
- export let requireScope: "__webpack_require__.*";
17525
+ export let amdDefine: "__webpack_require__.amdD";
17526
+ export let amdOptions: "__webpack_require__.amdO";
17527
+ export let asyncModule: "__webpack_require__.a";
17528
+ export let asyncModuleDoneSymbol: "__webpack_require__.aD";
17529
+ export let asyncModuleExportSymbol: "__webpack_require__.aE";
17530
+ export let baseURI: "__webpack_require__.b";
17531
+ export let chunkCallback: "webpackChunk";
17532
+ export let chunkName: "__webpack_require__.cn";
17533
+ export let compatGetDefaultExport: "__webpack_require__.n";
17534
+ export let createFakeNamespaceObject: "__webpack_require__.t";
17535
+ export let createScript: "__webpack_require__.ts";
17536
+ export let createScriptUrl: "__webpack_require__.tu";
17537
+ export let currentRemoteGetScope: "__webpack_require__.R";
17538
+ export let definePropertyGetters: "__webpack_require__.d";
17539
+ export let ensureChunk: "__webpack_require__.e";
17540
+ export let ensureChunkHandlers: "__webpack_require__.f";
17541
+ export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
17542
+ export let entryModuleId: "__webpack_require__.s";
16661
17543
  export let exports: "__webpack_exports__";
16662
- export let thisAsExports: "top-level-this-exports";
16663
- export let returnExportsFromRuntime: "return-exports-from-runtime";
17544
+ export let externalInstallChunk: "__webpack_require__.C";
17545
+ export let getChunkCssFilename: "__webpack_require__.k";
17546
+ export let getChunkScriptFilename: "__webpack_require__.u";
17547
+ export let getChunkUpdateCssFilename: "__webpack_require__.hk";
17548
+ export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
17549
+ export let getFullHash: "__webpack_require__.h";
17550
+ export let getTrustedTypesPolicy: "__webpack_require__.tt";
17551
+ export let getUpdateManifestFilename: "__webpack_require__.hmrF";
17552
+ export let global: "__webpack_require__.g";
17553
+ export let harmonyModuleDecorator: "__webpack_require__.hmd";
17554
+ export let hasCssModules: "has css modules";
17555
+ export let hasFetchPriority: "has fetch priority";
17556
+ export let hasOwnProperty: "__webpack_require__.o";
17557
+ export let hmrDownloadManifest: "__webpack_require__.hmrM";
17558
+ export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
17559
+ export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
17560
+ export let hmrModuleData: "__webpack_require__.hmrD";
17561
+ export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
17562
+ export let initializeSharing: "__webpack_require__.I";
17563
+ export let instantiateWasm: "__webpack_require__.v";
17564
+ export let interceptModuleExecution: "__webpack_require__.i";
17565
+ export let loadScript: "__webpack_require__.l";
17566
+ export let makeDeferredNamespaceObject: "__webpack_require__.z";
17567
+ export let makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS";
17568
+ export let makeNamespaceObject: "__webpack_require__.r";
16664
17569
  export let module: "module";
16665
- export let moduleId: "module.id";
16666
- export let moduleLoaded: "module.loaded";
16667
- export let publicPath: "__webpack_require__.p";
16668
- export let entryModuleId: "__webpack_require__.s";
16669
17570
  export let moduleCache: "__webpack_require__.c";
16670
17571
  export let moduleFactories: "__webpack_require__.m";
16671
17572
  export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
16672
- export let ensureChunk: "__webpack_require__.e";
16673
- export let ensureChunkHandlers: "__webpack_require__.f";
16674
- export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
17573
+ export let moduleId: "module.id";
17574
+ export let moduleLoaded: "module.loaded";
17575
+ export let nodeModuleDecorator: "__webpack_require__.nmd";
17576
+ export let onChunksLoaded: "__webpack_require__.O";
16675
17577
  export let prefetchChunk: "__webpack_require__.E";
16676
17578
  export let prefetchChunkHandlers: "__webpack_require__.F";
16677
17579
  export let preloadChunk: "__webpack_require__.G";
16678
17580
  export let preloadChunkHandlers: "__webpack_require__.H";
16679
- export let definePropertyGetters: "__webpack_require__.d";
16680
- export let makeNamespaceObject: "__webpack_require__.r";
16681
- export let createFakeNamespaceObject: "__webpack_require__.t";
16682
- export let compatGetDefaultExport: "__webpack_require__.n";
16683
- export let harmonyModuleDecorator: "__webpack_require__.hmd";
16684
- export let nodeModuleDecorator: "__webpack_require__.nmd";
16685
- export let getFullHash: "__webpack_require__.h";
16686
- export let wasmInstances: "__webpack_require__.w";
16687
- export let instantiateWasm: "__webpack_require__.v";
16688
- export let uncaughtErrorHandler: "__webpack_require__.oe";
16689
- export let scriptNonce: "__webpack_require__.nc";
16690
- export let loadScript: "__webpack_require__.l";
16691
- export let createScript: "__webpack_require__.ts";
16692
- export let createScriptUrl: "__webpack_require__.tu";
16693
- export let getTrustedTypesPolicy: "__webpack_require__.tt";
16694
- export let hasFetchPriority: "has fetch priority";
16695
- export let chunkName: "__webpack_require__.cn";
17581
+ export let publicPath: "__webpack_require__.p";
17582
+ export let relativeUrl: "__webpack_require__.U";
17583
+ export let require: "__webpack_require__";
17584
+ export let requireScope: "__webpack_require__.*";
17585
+ export let returnExportsFromRuntime: "return-exports-from-runtime";
16696
17586
  export let runtimeId: "__webpack_require__.j";
16697
- export let getChunkScriptFilename: "__webpack_require__.u";
16698
- export let getChunkCssFilename: "__webpack_require__.k";
16699
- export let hasCssModules: "has css modules";
16700
- export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
16701
- export let getChunkUpdateCssFilename: "__webpack_require__.hk";
17587
+ export let scriptNonce: "__webpack_require__.nc";
17588
+ export let shareScopeMap: "__webpack_require__.S";
16702
17589
  export let startup: "__webpack_require__.x";
17590
+ export let startupEntrypoint: "__webpack_require__.X";
16703
17591
  export let startupNoDefault: "__webpack_require__.x (no default handler)";
16704
17592
  export let startupOnlyAfter: "__webpack_require__.x (only after)";
16705
17593
  export let startupOnlyBefore: "__webpack_require__.x (only before)";
16706
- export let chunkCallback: "webpackChunk";
16707
- export let startupEntrypoint: "__webpack_require__.X";
16708
- export let onChunksLoaded: "__webpack_require__.O";
16709
- export let externalInstallChunk: "__webpack_require__.C";
16710
- export let interceptModuleExecution: "__webpack_require__.i";
16711
- export let global: "__webpack_require__.g";
16712
- export let shareScopeMap: "__webpack_require__.S";
16713
- export let initializeSharing: "__webpack_require__.I";
16714
- export let currentRemoteGetScope: "__webpack_require__.R";
16715
- export let getUpdateManifestFilename: "__webpack_require__.hmrF";
16716
- export let hmrDownloadManifest: "__webpack_require__.hmrM";
16717
- export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
16718
- export let hmrModuleData: "__webpack_require__.hmrD";
16719
- export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
16720
- export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
16721
- export let amdDefine: "__webpack_require__.amdD";
16722
- export let amdOptions: "__webpack_require__.amdO";
16723
17594
  export let system: "__webpack_require__.System";
16724
- export let hasOwnProperty: "__webpack_require__.o";
16725
17595
  export let systemContext: "__webpack_require__.y";
16726
- export let baseURI: "__webpack_require__.b";
16727
- export let relativeUrl: "__webpack_require__.U";
16728
- export let asyncModule: "__webpack_require__.a";
17596
+ export let thisAsExports: "top-level-this-exports";
17597
+ export let uncaughtErrorHandler: "__webpack_require__.oe";
17598
+ export let wasmInstances: "__webpack_require__.w";
16729
17599
  }
16730
17600
  export const UsageState: Readonly<{
16731
17601
  Unused: 0;
@@ -16776,9 +17646,6 @@ declare namespace exports {
16776
17646
  }
16777
17647
  export namespace optimize {
16778
17648
  export namespace InnerGraph {
16779
- export let bailout: (parserState: ParserState) => void;
16780
- export let enable: (parserState: ParserState) => void;
16781
- export let isEnabled: (parserState: ParserState) => boolean;
16782
17649
  export let addUsage: (
16783
17650
  state: ParserState,
16784
17651
  symbol: null | TopLevelSymbol,
@@ -16789,7 +17656,30 @@ declare namespace exports {
16789
17656
  name: string,
16790
17657
  usage: string | true | TopLevelSymbol
16791
17658
  ) => void;
17659
+ export let bailout: (parserState: ParserState) => void;
17660
+ export let enable: (parserState: ParserState) => void;
17661
+ export let getDependencyUsedByExportsCondition: (
17662
+ dependency: Dependency,
17663
+ usedByExports: undefined | boolean | Set<string>,
17664
+ moduleGraph: ModuleGraph
17665
+ ) =>
17666
+ | null
17667
+ | false
17668
+ | ((
17669
+ moduleGraphConnection: ModuleGraphConnection,
17670
+ runtime: RuntimeSpec
17671
+ ) => ConnectionState);
17672
+ export let getTopLevelSymbol: (
17673
+ state: ParserState
17674
+ ) => void | TopLevelSymbol;
16792
17675
  export let inferDependencyUsage: (state: ParserState) => void;
17676
+ export let isDependencyUsedByExports: (
17677
+ dependency: Dependency,
17678
+ usedByExports: boolean | Set<string>,
17679
+ moduleGraph: ModuleGraph,
17680
+ runtime: RuntimeSpec
17681
+ ) => boolean;
17682
+ export let isEnabled: (parserState: ParserState) => boolean;
16793
17683
  export let onUsage: (
16794
17684
  state: ParserState,
16795
17685
  onUsageCallback: (value?: boolean | Set<string>) => void
@@ -16798,30 +17688,10 @@ declare namespace exports {
16798
17688
  state: ParserState,
16799
17689
  symbol?: TopLevelSymbol
16800
17690
  ) => void;
16801
- export let getTopLevelSymbol: (
16802
- state: ParserState
16803
- ) => void | TopLevelSymbol;
16804
17691
  export let tagTopLevelSymbol: (
16805
17692
  parser: JavascriptParser,
16806
17693
  name: string
16807
17694
  ) => undefined | TopLevelSymbol;
16808
- export let isDependencyUsedByExports: (
16809
- dependency: Dependency,
16810
- usedByExports: boolean | Set<string>,
16811
- moduleGraph: ModuleGraph,
16812
- runtime: RuntimeSpec
16813
- ) => boolean;
16814
- export let getDependencyUsedByExportsCondition: (
16815
- dependency: Dependency,
16816
- usedByExports: undefined | boolean | Set<string>,
16817
- moduleGraph: ModuleGraph
16818
- ) =>
16819
- | null
16820
- | false
16821
- | ((
16822
- moduleGraphConnection: ModuleGraphConnection,
16823
- runtime: RuntimeSpec
16824
- ) => ConnectionState);
16825
17695
  export { TopLevelSymbol, topLevelSymbolTag };
16826
17696
  }
16827
17697
  export {
@@ -16904,17 +17774,38 @@ declare namespace exports {
16904
17774
  export namespace util {
16905
17775
  export const createHash: (algorithm: HashFunction) => Hash;
16906
17776
  export namespace comparators {
17777
+ export let compareChunkGroupsByIndex: (
17778
+ a: ChunkGroup,
17779
+ b: ChunkGroup
17780
+ ) => 0 | 1 | -1;
17781
+ export let compareChunks: ParameterizedComparator<ChunkGraph, Chunk>;
16907
17782
  export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
16908
- export let compareModulesByIdentifier: (
16909
- a: Module,
16910
- b: Module
17783
+ export let compareChunksNatural: (
17784
+ chunkGraph: ChunkGraph
17785
+ ) => Comparator<Chunk>;
17786
+ export let compareIds: (
17787
+ a: string | number,
17788
+ b: string | number
17789
+ ) => 0 | 1 | -1;
17790
+ export let compareIterables: <T>(
17791
+ elementComparator: Comparator<T>
17792
+ ) => Comparator<Iterable<T>>;
17793
+ export let compareLocations: (
17794
+ a: DependencyLocation,
17795
+ b: DependencyLocation
16911
17796
  ) => 0 | 1 | -1;
16912
17797
  export let compareModulesById: ParameterizedComparator<
16913
17798
  ChunkGraph,
16914
17799
  Module
16915
17800
  >;
16916
- export let compareNumbers: (a: number, b: number) => 0 | 1 | -1;
16917
- export let compareStringsNumeric: (a: string, b: string) => 0 | 1 | -1;
17801
+ export let compareModulesByIdOrIdentifier: ParameterizedComparator<
17802
+ ChunkGraph,
17803
+ Module
17804
+ >;
17805
+ export let compareModulesByIdentifier: (
17806
+ a: Module,
17807
+ b: Module
17808
+ ) => 0 | 1 | -1;
16918
17809
  export let compareModulesByPostOrderIndexOrIdentifier: ParameterizedComparator<
16919
17810
  ModuleGraph,
16920
17811
  Module
@@ -16923,60 +17814,42 @@ declare namespace exports {
16923
17814
  ModuleGraph,
16924
17815
  Module
16925
17816
  >;
16926
- export let compareModulesByIdOrIdentifier: ParameterizedComparator<
16927
- ChunkGraph,
16928
- Module
16929
- >;
16930
- export let compareChunks: ParameterizedComparator<ChunkGraph, Chunk>;
16931
- export let compareIds: (
16932
- a: string | number,
16933
- b: string | number
16934
- ) => 0 | 1 | -1;
17817
+ export let compareNumbers: (a: number, b: number) => 0 | 1 | -1;
17818
+ export let compareSelect: <T, R>(
17819
+ getter: Selector<T, R>,
17820
+ comparator: Comparator<R>
17821
+ ) => Comparator<T>;
16935
17822
  export let compareStrings: (a: string, b: string) => 0 | 1 | -1;
16936
- export let compareChunkGroupsByIndex: (
16937
- a: ChunkGroup,
16938
- b: ChunkGroup
16939
- ) => 0 | 1 | -1;
17823
+ export let compareStringsNumeric: (a: string, b: string) => 0 | 1 | -1;
16940
17824
  export let concatComparators: <T>(
16941
17825
  c1: Comparator<T>,
16942
17826
  c2: Comparator<T>,
16943
17827
  ...cRest: Comparator<T>[]
16944
17828
  ) => Comparator<T>;
16945
- export let compareSelect: <T, R>(
16946
- getter: Selector<T, R>,
16947
- comparator: Comparator<R>
16948
- ) => Comparator<T>;
16949
- export let compareIterables: <T>(
16950
- elementComparator: Comparator<T>
16951
- ) => Comparator<Iterable<T>>;
16952
17829
  export let keepOriginalOrder: <T>(iterable: Iterable<T>) => Comparator<T>;
16953
- export let compareChunksNatural: (
16954
- chunkGraph: ChunkGraph
16955
- ) => Comparator<Chunk>;
16956
- export let compareLocations: (
16957
- a: DependencyLocation,
16958
- b: DependencyLocation
16959
- ) => 0 | 1 | -1;
16960
17830
  }
16961
17831
  export namespace runtime {
16962
- export let getEntryRuntime: (
16963
- compilation: Compilation,
16964
- name: string,
16965
- options?: EntryOptions
16966
- ) => RuntimeSpec;
17832
+ export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
17833
+ export let filterRuntime: (
17834
+ runtime: RuntimeSpec,
17835
+ filter: (runtime?: RuntimeSpec) => boolean
17836
+ ) => undefined | string | boolean | SortableSet<string>;
16967
17837
  export let forEachRuntime: (
16968
17838
  runtime: RuntimeSpec,
16969
17839
  fn: (runtime?: string) => void,
16970
17840
  deterministicOrder?: boolean
16971
17841
  ) => void;
17842
+ export let getEntryRuntime: (
17843
+ compilation: Compilation,
17844
+ name: string,
17845
+ options?: EntryOptions
17846
+ ) => RuntimeSpec;
16972
17847
  export let getRuntimeKey: (runtime: RuntimeSpec) => string;
17848
+ export let intersectRuntime: (
17849
+ a: RuntimeSpec,
17850
+ b: RuntimeSpec
17851
+ ) => RuntimeSpec;
16973
17852
  export let keyToRuntime: (key: string) => RuntimeSpec;
16974
- export let runtimeToString: (runtime: RuntimeSpec) => string;
16975
- export let runtimeConditionToString: (
16976
- runtimeCondition: RuntimeCondition
16977
- ) => string;
16978
- export let runtimeEqual: (a: RuntimeSpec, b: RuntimeSpec) => boolean;
16979
- export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
16980
17853
  export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
16981
17854
  export let mergeRuntimeCondition: (
16982
17855
  a: RuntimeCondition,
@@ -16992,10 +17865,11 @@ declare namespace exports {
16992
17865
  a: RuntimeSpec,
16993
17866
  b: RuntimeSpec
16994
17867
  ) => RuntimeSpec;
16995
- export let intersectRuntime: (
16996
- a: RuntimeSpec,
16997
- b: RuntimeSpec
16998
- ) => RuntimeSpec;
17868
+ export let runtimeConditionToString: (
17869
+ runtimeCondition: RuntimeCondition
17870
+ ) => string;
17871
+ export let runtimeEqual: (a: RuntimeSpec, b: RuntimeSpec) => boolean;
17872
+ export let runtimeToString: (runtime: RuntimeSpec) => string;
16999
17873
  export let subtractRuntime: (
17000
17874
  a: RuntimeSpec,
17001
17875
  b: RuntimeSpec
@@ -17005,10 +17879,6 @@ declare namespace exports {
17005
17879
  b: RuntimeCondition,
17006
17880
  runtime: RuntimeSpec
17007
17881
  ) => RuntimeCondition;
17008
- export let filterRuntime: (
17009
- runtime: RuntimeSpec,
17010
- filter: (runtime?: RuntimeSpec) => boolean
17011
- ) => undefined | string | boolean | SortableSet<string>;
17012
17882
  export { RuntimeSpecMap, RuntimeSpecSet };
17013
17883
  }
17014
17884
  export namespace serialization {
@@ -17063,7 +17933,7 @@ declare namespace exports {
17063
17933
  }
17064
17934
  export namespace experiments {
17065
17935
  export namespace schemes {
17066
- export { HttpUriPlugin };
17936
+ export { HttpUriPlugin, VirtualUrlPlugin };
17067
17937
  }
17068
17938
  export namespace ids {
17069
17939
  export { SyncModuleIdsPlugin };
@@ -17152,7 +18022,7 @@ declare namespace exports {
17152
18022
  AutomaticPrefetchPlugin,
17153
18023
  AsyncDependenciesBlock,
17154
18024
  BannerPlugin,
17155
- Cache,
18025
+ CacheClass as Cache,
17156
18026
  Chunk,
17157
18027
  ChunkGraph,
17158
18028
  CleanPlugin,