webpack 5.106.1 → 5.107.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 (600) hide show
  1. package/README.md +2 -2
  2. package/lib/APIPlugin.js +4 -2
  3. package/lib/AsyncDependenciesBlock.js +3 -0
  4. package/lib/AutomaticPrefetchPlugin.js +6 -1
  5. package/lib/BannerPlugin.js +10 -1
  6. package/lib/Cache.js +27 -5
  7. package/lib/CacheFacade.js +26 -0
  8. package/lib/Chunk.js +46 -0
  9. package/lib/ChunkGraph.js +111 -0
  10. package/lib/ChunkGroup.js +57 -13
  11. package/lib/ChunkTemplate.js +9 -0
  12. package/lib/CleanPlugin.js +14 -1
  13. package/lib/CodeGenerationResults.js +19 -0
  14. package/lib/CompatibilityPlugin.js +23 -8
  15. package/lib/Compilation.js +161 -27
  16. package/lib/Compiler.js +41 -17
  17. package/lib/ConcatenationScope.js +24 -1
  18. package/lib/ConditionalInitFragment.js +6 -0
  19. package/lib/ConstPlugin.js +4 -1
  20. package/lib/ContextExclusionPlugin.js +2 -1
  21. package/lib/ContextModule.js +14 -2
  22. package/lib/ContextModuleFactory.js +10 -0
  23. package/lib/ContextReplacementPlugin.js +4 -1
  24. package/lib/DefinePlugin.js +22 -9
  25. package/lib/DependenciesBlock.js +6 -1
  26. package/lib/Dependency.js +48 -4
  27. package/lib/DependencyTemplate.js +7 -1
  28. package/lib/DependencyTemplates.js +4 -0
  29. package/lib/DotenvPlugin.js +3 -0
  30. package/lib/DynamicEntryPlugin.js +3 -1
  31. package/lib/EntryOptionPlugin.js +3 -0
  32. package/lib/EntryPlugin.js +2 -1
  33. package/lib/Entrypoint.js +4 -0
  34. package/lib/EnvironmentPlugin.js +3 -2
  35. package/lib/ErrorHelpers.js +7 -0
  36. package/lib/EvalDevToolModulePlugin.js +3 -1
  37. package/lib/EvalSourceMapDevToolPlugin.js +11 -10
  38. package/lib/ExportsInfo.js +56 -2
  39. package/lib/ExportsInfoApiPlugin.js +2 -1
  40. package/lib/ExternalModule.js +114 -15
  41. package/lib/ExternalModuleFactoryPlugin.js +15 -0
  42. package/lib/ExternalsPlugin.js +2 -1
  43. package/lib/FileSystemInfo.js +291 -71
  44. package/lib/FlagAllModulesAsUsedPlugin.js +2 -1
  45. package/lib/FlagDependencyExportsPlugin.js +4 -1
  46. package/lib/FlagDependencyUsagePlugin.js +5 -1
  47. package/lib/FlagEntryExportAsUsedPlugin.js +2 -1
  48. package/lib/Generator.js +16 -3
  49. package/lib/HotModuleReplacementPlugin.js +35 -9
  50. package/lib/IgnorePlugin.js +4 -2
  51. package/lib/IgnoreWarningsPlugin.js +2 -1
  52. package/lib/InitFragment.js +10 -0
  53. package/lib/JavascriptMetaInfoPlugin.js +2 -1
  54. package/lib/LibraryTemplatePlugin.js +2 -1
  55. package/lib/LoaderOptionsPlugin.js +3 -1
  56. package/lib/LoaderTargetPlugin.js +2 -1
  57. package/lib/MainTemplate.js +15 -0
  58. package/lib/ManifestPlugin.js +9 -2
  59. package/lib/Module.js +101 -19
  60. package/lib/ModuleFactory.js +6 -1
  61. package/lib/ModuleFilenameHelpers.js +3 -0
  62. package/lib/ModuleGraph.js +66 -0
  63. package/lib/ModuleGraphConnection.js +9 -0
  64. package/lib/ModuleInfoHeaderPlugin.js +5 -0
  65. package/lib/ModuleSourceTypeConstants.js +32 -1
  66. package/lib/ModuleTemplate.js +8 -0
  67. package/lib/ModuleTypeConstants.js +12 -3
  68. package/lib/MultiCompiler.js +30 -2
  69. package/lib/MultiStats.js +8 -0
  70. package/lib/MultiWatching.js +3 -0
  71. package/lib/NoEmitOnErrorsPlugin.js +1 -1
  72. package/lib/NodeStuffPlugin.js +11 -2
  73. package/lib/NormalModule.js +43 -33
  74. package/lib/NormalModuleFactory.js +35 -2
  75. package/lib/NormalModuleReplacementPlugin.js +1 -1
  76. package/lib/NullFactory.js +1 -0
  77. package/lib/OptionsApply.js +1 -0
  78. package/lib/Parser.js +3 -1
  79. package/lib/PlatformPlugin.js +2 -1
  80. package/lib/PrefetchPlugin.js +2 -1
  81. package/lib/ProgressPlugin.js +158 -68
  82. package/lib/ProvidePlugin.js +3 -1
  83. package/lib/RawModule.js +12 -0
  84. package/lib/RecordIdsPlugin.js +8 -0
  85. package/lib/RequestShortener.js +8 -0
  86. package/lib/ResolverFactory.js +5 -0
  87. package/lib/RuntimeGlobals.js +6 -5
  88. package/lib/RuntimeModule.js +22 -7
  89. package/lib/RuntimePlugin.js +13 -0
  90. package/lib/RuntimeTemplate.js +35 -1
  91. package/lib/SelfModuleFactory.js +2 -0
  92. package/lib/SourceMapDevToolModuleOptionsPlugin.js +2 -0
  93. package/lib/SourceMapDevToolPlugin.js +3 -1
  94. package/lib/Stats.js +5 -0
  95. package/lib/Template.js +20 -0
  96. package/lib/TemplatedPathPlugin.js +10 -3
  97. package/lib/UseStrictPlugin.js +2 -1
  98. package/lib/WarnCaseSensitiveModulesPlugin.js +71 -3
  99. package/lib/WarnDeprecatedOptionPlugin.js +2 -2
  100. package/lib/WarnNoModeSetPlugin.js +17 -2
  101. package/lib/WatchIgnorePlugin.js +4 -1
  102. package/lib/Watching.js +16 -3
  103. package/lib/WebpackError.js +3 -74
  104. package/lib/WebpackIsIncludedPlugin.js +3 -1
  105. package/lib/WebpackOptionsApply.js +14 -1
  106. package/lib/WebpackOptionsDefaulter.js +1 -0
  107. package/lib/asset/AssetBytesGenerator.js +12 -2
  108. package/lib/asset/AssetBytesParser.js +1 -0
  109. package/lib/asset/AssetGenerator.js +42 -10
  110. package/lib/asset/AssetModulesPlugin.js +7 -2
  111. package/lib/asset/AssetParser.js +2 -0
  112. package/lib/asset/AssetSourceGenerator.js +12 -2
  113. package/lib/asset/AssetSourceParser.js +1 -0
  114. package/lib/asset/RawDataUrlModule.js +11 -0
  115. package/lib/async-modules/AsyncModuleHelpers.js +1 -0
  116. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -0
  117. package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
  118. package/lib/buildChunkGraph.js +19 -6
  119. package/lib/cache/AddBuildDependenciesPlugin.js +2 -1
  120. package/lib/cache/AddManagedPathsPlugin.js +2 -1
  121. package/lib/cache/IdleFileCachePlugin.js +2 -1
  122. package/lib/cache/MemoryCachePlugin.js +1 -1
  123. package/lib/cache/MemoryWithGcCachePlugin.js +3 -1
  124. package/lib/cache/PackFileCacheStrategy.js +33 -4
  125. package/lib/cache/ResolverCachePlugin.js +10 -1
  126. package/lib/cache/getLazyHashedEtag.js +4 -0
  127. package/lib/cache/mergeEtags.js +2 -0
  128. package/lib/cli.js +33 -1
  129. package/lib/config/browserslistTargetHandler.js +2 -0
  130. package/lib/config/defaults.js +232 -12
  131. package/lib/config/normalization.js +15 -1
  132. package/lib/config/target.js +11 -0
  133. package/lib/container/ContainerEntryDependency.js +2 -0
  134. package/lib/container/ContainerEntryModule.js +12 -0
  135. package/lib/container/ContainerEntryModuleFactory.js +1 -0
  136. package/lib/container/ContainerExposedDependency.js +4 -0
  137. package/lib/container/ContainerPlugin.js +2 -1
  138. package/lib/container/ContainerReferencePlugin.js +2 -1
  139. package/lib/container/FallbackDependency.js +4 -0
  140. package/lib/container/FallbackItemDependency.js +1 -0
  141. package/lib/container/FallbackModule.js +12 -0
  142. package/lib/container/FallbackModuleFactory.js +1 -0
  143. package/lib/container/ModuleFederationPlugin.js +3 -1
  144. package/lib/container/RemoteModule.js +13 -0
  145. package/lib/container/RemoteRuntimeModule.js +1 -0
  146. package/lib/container/RemoteToExternalDependency.js +1 -0
  147. package/lib/container/options.js +7 -0
  148. package/lib/css/CssGenerator.js +336 -100
  149. package/lib/css/CssInjectStyleRuntimeModule.js +45 -42
  150. package/lib/css/CssLoadingRuntimeModule.js +23 -4
  151. package/lib/{CssModule.js → css/CssModule.js} +21 -15
  152. package/lib/css/CssModulesPlugin.js +235 -89
  153. package/lib/css/CssParser.js +616 -261
  154. package/lib/css/walkCssTokens.js +179 -2
  155. package/lib/debug/ProfilingPlugin.js +19 -1
  156. package/lib/dependencies/AMDDefineDependency.js +7 -0
  157. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +12 -0
  158. package/lib/dependencies/AMDPlugin.js +4 -1
  159. package/lib/dependencies/AMDRequireArrayDependency.js +6 -0
  160. package/lib/dependencies/AMDRequireContextDependency.js +3 -0
  161. package/lib/dependencies/AMDRequireDependenciesBlock.js +1 -0
  162. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +14 -1
  163. package/lib/dependencies/AMDRequireDependency.js +4 -0
  164. package/lib/dependencies/AMDRequireItemDependency.js +1 -0
  165. package/lib/dependencies/AMDRuntimeModules.js +3 -0
  166. package/lib/dependencies/CachedConstDependency.js +6 -1
  167. package/lib/dependencies/CommonJsDependencyHelpers.js +64 -0
  168. package/lib/dependencies/CommonJsExportRequireDependency.js +62 -10
  169. package/lib/dependencies/CommonJsExportsDependency.js +4 -0
  170. package/lib/dependencies/CommonJsExportsParserPlugin.js +9 -1
  171. package/lib/dependencies/CommonJsFullRequireDependency.js +36 -9
  172. package/lib/dependencies/CommonJsImportsParserPlugin.js +24 -3
  173. package/lib/dependencies/CommonJsPlugin.js +4 -1
  174. package/lib/dependencies/CommonJsRequireContextDependency.js +3 -0
  175. package/lib/dependencies/CommonJsRequireDependency.js +70 -4
  176. package/lib/dependencies/CommonJsSelfReferenceDependency.js +5 -0
  177. package/lib/dependencies/ConstDependency.js +6 -1
  178. package/lib/dependencies/ContextDependency.js +9 -2
  179. package/lib/dependencies/ContextDependencyHelpers.js +4 -1
  180. package/lib/dependencies/ContextDependencyTemplateAsId.js +1 -0
  181. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +1 -0
  182. package/lib/dependencies/ContextElementDependency.js +4 -0
  183. package/lib/dependencies/CreateRequireParserPlugin.js +7 -1
  184. package/lib/dependencies/CreateScriptUrlDependency.js +4 -0
  185. package/lib/dependencies/CriticalDependencyWarning.js +2 -1
  186. package/lib/dependencies/CssIcssExportDependency.js +339 -66
  187. package/lib/dependencies/CssIcssImportDependency.js +53 -8
  188. package/lib/dependencies/CssIcssSymbolDependency.js +16 -4
  189. package/lib/dependencies/CssImportDependency.js +12 -0
  190. package/lib/dependencies/CssUrlDependency.js +32 -0
  191. package/lib/dependencies/DelegatedSourceDependency.js +1 -0
  192. package/lib/dependencies/DllEntryDependency.js +3 -0
  193. package/lib/dependencies/DynamicExports.js +5 -0
  194. package/lib/dependencies/EntryDependency.js +1 -0
  195. package/lib/dependencies/ExportsInfoDependency.js +6 -0
  196. package/lib/dependencies/ExternalModuleDependency.js +5 -0
  197. package/lib/dependencies/ExternalModuleInitFragment.js +3 -0
  198. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +4 -0
  199. package/lib/dependencies/HarmonyAcceptDependency.js +6 -0
  200. package/lib/dependencies/HarmonyAcceptImportDependency.js +1 -0
  201. package/lib/dependencies/HarmonyCompatibilityDependency.js +1 -0
  202. package/lib/dependencies/HarmonyDetectionParserPlugin.js +4 -1
  203. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -0
  204. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +10 -7
  205. package/lib/dependencies/HarmonyExportExpressionDependency.js +27 -14
  206. package/lib/dependencies/HarmonyExportHeaderDependency.js +4 -0
  207. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +143 -5
  208. package/lib/dependencies/HarmonyExportInitFragment.js +6 -0
  209. package/lib/dependencies/HarmonyExportSpecifierDependency.js +5 -0
  210. package/lib/dependencies/HarmonyExports.js +2 -0
  211. package/lib/dependencies/HarmonyImportDependency.js +21 -2
  212. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +31 -1
  213. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -0
  214. package/lib/dependencies/HarmonyImportSpecifierDependency.js +18 -3
  215. package/lib/{HarmonyLinkingError.js → dependencies/HarmonyLinkingError.js} +5 -3
  216. package/lib/dependencies/HarmonyModulesPlugin.js +4 -1
  217. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -0
  218. package/lib/dependencies/HtmlInlineScriptDependency.js +133 -0
  219. package/lib/dependencies/HtmlInlineStyleDependency.js +101 -0
  220. package/lib/dependencies/HtmlScriptSrcDependency.js +318 -0
  221. package/lib/dependencies/HtmlSourceDependency.js +127 -0
  222. package/lib/dependencies/ImportContextDependency.js +4 -0
  223. package/lib/dependencies/ImportDependency.js +5 -0
  224. package/lib/dependencies/ImportEagerDependency.js +2 -0
  225. package/lib/dependencies/ImportMetaContextDependency.js +1 -0
  226. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +4 -1
  227. package/lib/dependencies/ImportMetaContextPlugin.js +2 -1
  228. package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -0
  229. package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -0
  230. package/lib/dependencies/ImportMetaPlugin.js +6 -0
  231. package/lib/dependencies/ImportParserPlugin.js +9 -2
  232. package/lib/dependencies/ImportPhase.js +7 -3
  233. package/lib/dependencies/ImportPlugin.js +2 -1
  234. package/lib/dependencies/ImportWeakDependency.js +2 -0
  235. package/lib/dependencies/JsonExportsDependency.js +6 -1
  236. package/lib/dependencies/LoaderDependency.js +2 -0
  237. package/lib/dependencies/LoaderImportDependency.js +2 -0
  238. package/lib/dependencies/LoaderPlugin.js +4 -1
  239. package/lib/dependencies/LocalModule.js +4 -0
  240. package/lib/dependencies/LocalModuleDependency.js +4 -0
  241. package/lib/dependencies/LocalModulesHelpers.js +3 -0
  242. package/lib/dependencies/ModuleDecoratorDependency.js +7 -1
  243. package/lib/dependencies/ModuleDependency.js +7 -0
  244. package/lib/dependencies/ModuleDependencyTemplateAsId.js +1 -0
  245. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +1 -0
  246. package/lib/dependencies/ModuleHotAcceptDependency.js +1 -0
  247. package/lib/dependencies/ModuleHotDeclineDependency.js +1 -0
  248. package/lib/dependencies/ModuleInitFragmentDependency.js +4 -0
  249. package/lib/dependencies/NullDependency.js +2 -0
  250. package/lib/dependencies/PrefetchDependency.js +1 -0
  251. package/lib/dependencies/ProvidedDependency.js +6 -1
  252. package/lib/dependencies/PureExpressionDependency.js +7 -1
  253. package/lib/dependencies/RequireContextDependency.js +1 -0
  254. package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -0
  255. package/lib/dependencies/RequireContextPlugin.js +2 -1
  256. package/lib/dependencies/RequireEnsureDependenciesBlock.js +1 -0
  257. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -0
  258. package/lib/dependencies/RequireEnsureDependency.js +4 -0
  259. package/lib/dependencies/RequireEnsureItemDependency.js +1 -0
  260. package/lib/dependencies/RequireEnsurePlugin.js +2 -1
  261. package/lib/dependencies/RequireHeaderDependency.js +4 -0
  262. package/lib/dependencies/RequireIncludeDependency.js +2 -0
  263. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +4 -1
  264. package/lib/dependencies/RequireIncludePlugin.js +2 -1
  265. package/lib/{RequireJsStuffPlugin.js → dependencies/RequireJsStuffPlugin.js} +9 -8
  266. package/lib/dependencies/RequireResolveContextDependency.js +3 -0
  267. package/lib/dependencies/RequireResolveDependency.js +1 -0
  268. package/lib/dependencies/RequireResolveHeaderDependency.js +5 -0
  269. package/lib/dependencies/RuntimeRequirementsDependency.js +5 -1
  270. package/lib/dependencies/StaticExportsDependency.js +3 -0
  271. package/lib/dependencies/SystemPlugin.js +5 -2
  272. package/lib/dependencies/SystemRuntimeModule.js +1 -0
  273. package/lib/dependencies/URLContextDependency.js +3 -0
  274. package/lib/dependencies/URLDependency.js +6 -0
  275. package/lib/dependencies/URLPlugin.js +2 -0
  276. package/lib/dependencies/UnsupportedDependency.js +4 -0
  277. package/lib/dependencies/WebAssemblyExportImportedDependency.js +4 -0
  278. package/lib/dependencies/WebAssemblyImportDependency.js +5 -2
  279. package/lib/dependencies/WebpackIsIncludedDependency.js +2 -0
  280. package/lib/dependencies/WorkerDependency.js +6 -1
  281. package/lib/dependencies/WorkerPlugin.js +11 -3
  282. package/lib/dependencies/getFunctionExpression.js +1 -0
  283. package/lib/dependencies/processExportInfo.js +1 -0
  284. package/lib/{DelegatedModule.js → dll/DelegatedModule.js} +44 -31
  285. package/lib/{DelegatedModuleFactoryPlugin.js → dll/DelegatedModuleFactoryPlugin.js} +7 -4
  286. package/lib/{DelegatedPlugin.js → dll/DelegatedPlugin.js} +4 -3
  287. package/lib/{DllEntryPlugin.js → dll/DllEntryPlugin.js} +6 -5
  288. package/lib/{DllModule.js → dll/DllModule.js} +35 -24
  289. package/lib/{DllModuleFactory.js → dll/DllModuleFactory.js} +5 -4
  290. package/lib/{DllPlugin.js → dll/DllPlugin.js} +8 -6
  291. package/lib/{DllReferencePlugin.js → dll/DllReferencePlugin.js} +23 -18
  292. package/lib/{LibManifestPlugin.js → dll/LibManifestPlugin.js} +13 -10
  293. package/lib/electron/ElectronTargetPlugin.js +2 -1
  294. package/lib/{AbstractMethodError.js → errors/AbstractMethodError.js} +10 -1
  295. package/lib/{AsyncDependencyToInitialChunkError.js → errors/AsyncDependencyToInitialChunkError.js} +8 -3
  296. package/lib/errors/BuildCycleError.js +1 -1
  297. package/lib/{ChunkRenderError.js → errors/ChunkRenderError.js} +1 -1
  298. package/lib/{CodeGenerationError.js → errors/CodeGenerationError.js} +1 -1
  299. package/lib/{CommentCompilationWarning.js → errors/CommentCompilationWarning.js} +9 -3
  300. package/lib/{ConcurrentCompilationError.js → errors/ConcurrentCompilationError.js} +4 -2
  301. package/lib/{EnvironmentNotSupportAsyncWarning.js → errors/EnvironmentNotSupportAsyncWarning.js} +4 -4
  302. package/lib/{HookWebpackError.js → errors/HookWebpackError.js} +11 -5
  303. package/lib/{IgnoreErrorModuleFactory.js → errors/IgnoreErrorModuleFactory.js} +6 -4
  304. package/lib/{InvalidDependenciesModuleWarning.js → errors/InvalidDependenciesModuleWarning.js} +4 -3
  305. package/lib/errors/JSONParseError.js +114 -0
  306. package/lib/{ModuleBuildError.js → errors/ModuleBuildError.js} +8 -5
  307. package/lib/{ModuleDependencyError.js → errors/ModuleDependencyError.js} +2 -2
  308. package/lib/{ModuleDependencyWarning.js → errors/ModuleDependencyWarning.js} +5 -4
  309. package/lib/{ModuleError.js → errors/ModuleError.js} +7 -5
  310. package/lib/{ModuleHashingError.js → errors/ModuleHashingError.js} +1 -1
  311. package/lib/{ModuleNotFoundError.js → errors/ModuleNotFoundError.js} +3 -2
  312. package/lib/{ModuleParseError.js → errors/ModuleParseError.js} +11 -6
  313. package/lib/{ModuleRestoreError.js → errors/ModuleRestoreError.js} +2 -1
  314. package/lib/{ModuleStoreError.js → errors/ModuleStoreError.js} +2 -1
  315. package/lib/{ModuleWarning.js → errors/ModuleWarning.js} +8 -5
  316. package/lib/{NodeStuffInWebError.js → errors/NodeStuffInWebError.js} +5 -4
  317. package/lib/errors/NonErrorEmittedError.js +28 -0
  318. package/lib/{UnhandledSchemeError.js → errors/UnhandledSchemeError.js} +8 -2
  319. package/lib/{UnsupportedFeatureWarning.js → errors/UnsupportedFeatureWarning.js} +4 -3
  320. package/lib/errors/WebpackError.js +84 -0
  321. package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -0
  322. package/lib/esm/ModuleChunkFormatPlugin.js +5 -1
  323. package/lib/esm/ModuleChunkLoadingPlugin.js +3 -1
  324. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +5 -0
  325. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -0
  326. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +1 -0
  327. package/lib/hmr/LazyCompilationPlugin.js +20 -1
  328. package/lib/hmr/lazyCompilationBackend.js +2 -0
  329. package/lib/html/HtmlGenerator.js +379 -0
  330. package/lib/html/HtmlModulesPlugin.js +433 -0
  331. package/lib/html/HtmlParser.js +1489 -0
  332. package/lib/html/walkHtmlTokens.js +2733 -0
  333. package/lib/ids/ChunkModuleIdRangePlugin.js +3 -1
  334. package/lib/ids/DeterministicChunkIdsPlugin.js +3 -1
  335. package/lib/ids/DeterministicModuleIdsPlugin.js +3 -1
  336. package/lib/ids/HashedModuleIdsPlugin.js +2 -1
  337. package/lib/ids/IdHelpers.js +22 -1
  338. package/lib/ids/NamedChunkIdsPlugin.js +3 -1
  339. package/lib/ids/NamedModuleIdsPlugin.js +3 -1
  340. package/lib/ids/NaturalChunkIdsPlugin.js +1 -1
  341. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  342. package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -1
  343. package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -1
  344. package/lib/ids/SyncModuleIdsPlugin.js +3 -1
  345. package/lib/index.js +39 -15
  346. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -1
  347. package/lib/javascript/BasicEvaluatedExpression.js +4 -2
  348. package/lib/javascript/ChunkFormatHelpers.js +2 -1
  349. package/lib/javascript/ChunkHelpers.js +1 -0
  350. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
  351. package/lib/javascript/EnableChunkLoadingPlugin.js +5 -1
  352. package/lib/javascript/JavascriptGenerator.js +10 -0
  353. package/lib/javascript/JavascriptModulesPlugin.js +112 -9
  354. package/lib/javascript/JavascriptParser.js +360 -16
  355. package/lib/javascript/JavascriptParserHelpers.js +7 -1
  356. package/lib/javascript/StartupHelpers.js +5 -0
  357. package/lib/json/JsonData.js +5 -0
  358. package/lib/json/JsonGenerator.js +21 -0
  359. package/lib/json/JsonModulesPlugin.js +1 -1
  360. package/lib/json/JsonParser.js +14 -25
  361. package/lib/library/AbstractLibraryPlugin.js +17 -2
  362. package/lib/library/AmdLibraryPlugin.js +8 -0
  363. package/lib/library/AssignLibraryPlugin.js +16 -0
  364. package/lib/library/EnableLibraryPlugin.js +8 -2
  365. package/lib/library/ExportPropertyLibraryPlugin.js +9 -0
  366. package/lib/{FalseIIFEUmdWarning.js → library/FalseIIFEUmdWarning.js} +1 -1
  367. package/lib/library/JsonpLibraryPlugin.js +8 -0
  368. package/lib/library/ModuleLibraryPlugin.js +86 -1
  369. package/lib/library/SystemLibraryPlugin.js +8 -0
  370. package/lib/library/UmdLibraryPlugin.js +16 -0
  371. package/lib/logging/Logger.js +17 -0
  372. package/lib/logging/createConsoleLogger.js +7 -0
  373. package/lib/logging/runtime.js +2 -0
  374. package/lib/logging/truncateArgs.js +2 -0
  375. package/lib/node/CommonJsChunkLoadingPlugin.js +5 -1
  376. package/lib/node/NodeEnvironmentPlugin.js +7 -3
  377. package/lib/node/NodeSourcePlugin.js +1 -1
  378. package/lib/node/NodeTargetPlugin.js +2 -1
  379. package/lib/node/NodeTemplatePlugin.js +3 -1
  380. package/lib/node/NodeWatchFileSystem.js +2 -0
  381. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +3 -0
  382. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +4 -1
  383. package/lib/node/ReadFileCompileWasmPlugin.js +4 -1
  384. package/lib/node/RequireChunkLoadingRuntimeModule.js +3 -0
  385. package/lib/node/nodeConsole.js +116 -64
  386. package/lib/optimize/AggressiveMergingPlugin.js +3 -1
  387. package/lib/optimize/AggressiveSplittingPlugin.js +6 -1
  388. package/lib/optimize/ConcatenatedModule.js +62 -6
  389. package/lib/optimize/EnsureChunkConditionsPlugin.js +2 -1
  390. package/lib/optimize/FlagIncludedChunksPlugin.js +2 -1
  391. package/lib/optimize/InnerGraph.js +16 -1
  392. package/lib/optimize/InnerGraphPlugin.js +14 -2
  393. package/lib/optimize/LimitChunkCountPlugin.js +9 -0
  394. package/lib/optimize/MangleExportsPlugin.js +5 -1
  395. package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -0
  396. package/lib/optimize/MinChunkSizePlugin.js +2 -1
  397. package/lib/optimize/MinMaxSizeWarning.js +5 -4
  398. package/lib/optimize/ModuleConcatenationPlugin.js +36 -8
  399. package/lib/optimize/RealContentHashPlugin.js +104 -26
  400. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -1
  401. package/lib/optimize/RemoveParentModulesPlugin.js +3 -1
  402. package/lib/optimize/RuntimeChunkPlugin.js +2 -1
  403. package/lib/optimize/SideEffectsFlagPlugin.js +118 -4
  404. package/lib/optimize/SplitChunksPlugin.js +50 -2
  405. package/lib/performance/AssetsOverSizeLimitWarning.js +3 -2
  406. package/lib/performance/EntrypointsOverSizeLimitWarning.js +3 -2
  407. package/lib/performance/NoAsyncChunksWarning.js +5 -3
  408. package/lib/performance/SizeLimitsPlugin.js +8 -2
  409. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +1 -0
  410. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +6 -0
  411. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +1 -0
  412. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +5 -1
  413. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -0
  414. package/lib/rules/BasicEffectRulePlugin.js +3 -0
  415. package/lib/rules/BasicMatcherRulePlugin.js +3 -0
  416. package/lib/rules/ObjectMatcherRulePlugin.js +3 -0
  417. package/lib/rules/RuleSetCompiler.js +18 -0
  418. package/lib/rules/UseEffectRulePlugin.js +10 -3
  419. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -0
  420. package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -0
  421. package/lib/runtime/BaseUriRuntimeModule.js +1 -0
  422. package/lib/runtime/ChunkNameRuntimeModule.js +1 -0
  423. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +1 -0
  424. package/lib/runtime/CompatRuntimeModule.js +2 -0
  425. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +1 -0
  426. package/lib/runtime/CreateScriptRuntimeModule.js +1 -0
  427. package/lib/runtime/CreateScriptUrlRuntimeModule.js +1 -0
  428. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +1 -0
  429. package/lib/runtime/EnsureChunkRuntimeModule.js +1 -0
  430. package/lib/runtime/GetChunkFilenameRuntimeModule.js +1 -0
  431. package/lib/runtime/GetFullHashRuntimeModule.js +1 -0
  432. package/lib/runtime/GetMainFilenameRuntimeModule.js +1 -0
  433. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -0
  434. package/lib/runtime/GlobalRuntimeModule.js +1 -0
  435. package/lib/runtime/HasOwnPropertyRuntimeModule.js +1 -0
  436. package/lib/runtime/HelperRuntimeModule.js +5 -0
  437. package/lib/runtime/LoadScriptRuntimeModule.js +1 -0
  438. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +121 -13
  439. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +1 -0
  440. package/lib/runtime/NonceRuntimeModule.js +1 -0
  441. package/lib/runtime/OnChunksLoadedRuntimeModule.js +1 -0
  442. package/lib/runtime/PublicPathRuntimeModule.js +1 -0
  443. package/lib/runtime/RelativeUrlRuntimeModule.js +1 -0
  444. package/lib/runtime/RuntimeIdRuntimeModule.js +1 -0
  445. package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +35 -0
  446. package/lib/runtime/StartupChunkDependenciesPlugin.js +13 -1
  447. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -0
  448. package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -0
  449. package/lib/runtime/SystemContextRuntimeModule.js +1 -0
  450. package/lib/runtime/ToBinaryRuntimeModule.js +1 -0
  451. package/lib/schemes/DataUriPlugin.js +14 -2
  452. package/lib/schemes/FileUriPlugin.js +1 -1
  453. package/lib/schemes/HttpUriPlugin.js +43 -1
  454. package/lib/schemes/VirtualUrlPlugin.js +7 -2
  455. package/lib/serialization/AggregateErrorSerializer.js +2 -0
  456. package/lib/serialization/ArraySerializer.js +2 -0
  457. package/lib/serialization/BinaryMiddleware.js +20 -1
  458. package/lib/serialization/DateObjectSerializer.js +2 -0
  459. package/lib/serialization/ErrorObjectSerializer.js +3 -0
  460. package/lib/serialization/FileMiddleware.js +21 -0
  461. package/lib/serialization/MapObjectSerializer.js +2 -0
  462. package/lib/serialization/NullPrototypeObjectSerializer.js +2 -0
  463. package/lib/serialization/ObjectMiddleware.js +23 -0
  464. package/lib/serialization/PlainObjectSerializer.js +7 -0
  465. package/lib/serialization/RegExpObjectSerializer.js +2 -0
  466. package/lib/serialization/Serializer.js +5 -0
  467. package/lib/serialization/SerializerMiddleware.js +14 -2
  468. package/lib/serialization/SetObjectSerializer.js +2 -0
  469. package/lib/serialization/SingleItemMiddleware.js +3 -0
  470. package/lib/sharing/ConsumeSharedFallbackDependency.js +1 -0
  471. package/lib/sharing/ConsumeSharedModule.js +15 -0
  472. package/lib/sharing/ConsumeSharedPlugin.js +8 -3
  473. package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -4
  474. package/lib/sharing/ProvideForSharedDependency.js +1 -0
  475. package/lib/sharing/ProvideSharedDependency.js +4 -0
  476. package/lib/sharing/ProvideSharedModule.js +12 -1
  477. package/lib/sharing/ProvideSharedModuleFactory.js +1 -0
  478. package/lib/sharing/ProvideSharedPlugin.js +5 -2
  479. package/lib/sharing/SharePlugin.js +2 -1
  480. package/lib/sharing/ShareRuntimeModule.js +1 -0
  481. package/lib/sharing/resolveMatchedConfigs.js +4 -1
  482. package/lib/sharing/utils.js +8 -0
  483. package/lib/stats/DefaultStatsFactoryPlugin.js +58 -3
  484. package/lib/stats/DefaultStatsPresetPlugin.js +12 -2
  485. package/lib/stats/DefaultStatsPrinterPlugin.js +38 -2
  486. package/lib/stats/StatsFactory.js +13 -1
  487. package/lib/stats/StatsPrinter.js +7 -0
  488. package/lib/typescript/TypeScriptPlugin.js +210 -0
  489. package/lib/url/URLParserPlugin.js +8 -2
  490. package/lib/util/AppendOnlyStackedSet.js +15 -0
  491. package/lib/util/ArrayHelpers.js +1 -0
  492. package/lib/util/ArrayQueue.js +10 -5
  493. package/lib/util/AsyncQueue.js +22 -2
  494. package/lib/util/Hash.js +2 -2
  495. package/lib/util/IterableHelpers.js +3 -0
  496. package/lib/util/LazyBucketSortedSet.js +21 -0
  497. package/lib/util/LazySet.js +39 -0
  498. package/lib/util/LocConverter.js +53 -0
  499. package/lib/util/ParallelismFactorCalculator.js +1 -0
  500. package/lib/util/Queue.js +6 -3
  501. package/lib/util/Semaphore.js +14 -1
  502. package/lib/util/SetHelpers.js +3 -0
  503. package/lib/util/SortableSet.js +7 -1
  504. package/lib/util/StackedCacheMap.js +20 -3
  505. package/lib/util/StackedMap.js +45 -0
  506. package/lib/util/StringXor.js +1 -1
  507. package/lib/util/TupleQueue.js +7 -3
  508. package/lib/util/TupleSet.js +13 -0
  509. package/lib/util/URLAbsoluteSpecifier.js +1 -0
  510. package/lib/util/WeakTupleMap.js +33 -0
  511. package/lib/util/binarySearchBounds.js +1 -0
  512. package/lib/util/cleverMerge.js +19 -2
  513. package/lib/util/comparators.js +34 -3
  514. package/lib/util/compileBooleanMatcher.js +9 -0
  515. package/lib/util/concatenate.js +9 -3
  516. package/lib/util/conventions.js +46 -1
  517. package/lib/util/createMappings.js +118 -0
  518. package/lib/util/dataURL.js +1 -0
  519. package/lib/util/deprecation.js +19 -0
  520. package/lib/util/deterministicGrouping.js +20 -0
  521. package/lib/util/extractSourceMap.js +1 -0
  522. package/lib/util/extractUrlAndGlobal.js +1 -0
  523. package/lib/util/findGraphRoots.js +5 -0
  524. package/lib/{formatLocation.js → util/formatLocation.js} +4 -2
  525. package/lib/{SizeFormatHelpers.js → util/formatSize.js} +4 -1
  526. package/lib/util/fs.js +71 -8
  527. package/lib/util/generateDebugId.js +1 -0
  528. package/lib/util/hash/BatchedHash.js +1 -0
  529. package/lib/util/hash/BulkUpdateHash.js +1 -0
  530. package/lib/util/hash/hash-digest.js +8 -0
  531. package/lib/util/hash/md4.js +1 -1
  532. package/lib/util/hash/wasm-hash.js +5 -0
  533. package/lib/util/hash/xxhash64.js +1 -1
  534. package/lib/util/identifier.js +67 -0
  535. package/lib/util/internalSerializables.js +35 -19
  536. package/lib/util/magicComment.js +10 -6
  537. package/lib/util/makeSerializable.js +6 -0
  538. package/lib/util/memoize.js +2 -0
  539. package/lib/util/mimeTypes.js +176 -0
  540. package/lib/util/nonNumericOnlyHash.js +1 -0
  541. package/lib/util/parseJson.js +41 -0
  542. package/lib/util/processAsyncTree.js +8 -0
  543. package/lib/util/property.js +1 -0
  544. package/lib/util/registerExternalSerializer.js +20 -0
  545. package/lib/util/removeBOM.js +1 -0
  546. package/lib/util/runtime.js +32 -0
  547. package/lib/util/semver.js +15 -0
  548. package/lib/util/serialization.js +2 -0
  549. package/lib/util/smartGrouping.js +8 -0
  550. package/lib/util/source.js +23 -0
  551. package/lib/util/topologicalSort.js +69 -0
  552. package/lib/validateSchema.js +1 -0
  553. package/lib/wasm/EnableWasmLoadingPlugin.js +15 -1
  554. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +1 -0
  555. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +1 -0
  556. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -0
  557. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -0
  558. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +12 -3
  559. package/lib/wasm-async/AsyncWebAssemblyParser.js +2 -1
  560. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +12 -1
  561. package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +6 -3
  562. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +1 -0
  563. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +2 -2
  564. package/lib/wasm-sync/WebAssemblyGenerator.js +26 -1
  565. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +7 -3
  566. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +4 -0
  567. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +10 -1
  568. package/lib/wasm-sync/WebAssemblyParser.js +2 -0
  569. package/lib/wasm-sync/WebAssemblyUtils.js +2 -0
  570. package/lib/web/FetchCompileAsyncWasmPlugin.js +10 -1
  571. package/lib/web/FetchCompileWasmPlugin.js +13 -1
  572. package/lib/web/JsonpChunkLoadingPlugin.js +11 -1
  573. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -0
  574. package/lib/web/JsonpTemplatePlugin.js +2 -1
  575. package/lib/webpack.js +13 -1
  576. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +10 -1
  577. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -0
  578. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -1
  579. package/package.json +31 -31
  580. package/schemas/WebpackOptions.check.js +1 -1
  581. package/schemas/WebpackOptions.json +161 -57
  582. package/schemas/plugins/{DllPlugin.check.d.ts → HtmlGeneratorOptions.check.d.ts} +1 -1
  583. package/schemas/plugins/HtmlGeneratorOptions.check.js +6 -0
  584. package/schemas/plugins/HtmlGeneratorOptions.json +3 -0
  585. package/schemas/plugins/ProgressPlugin.check.js +1 -1
  586. package/schemas/plugins/ProgressPlugin.json +22 -0
  587. package/schemas/plugins/{DllReferencePlugin.check.d.ts → css/CssAutoOrModuleParserOptions.check.d.ts} +1 -1
  588. package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +6 -0
  589. package/schemas/plugins/css/CssAutoOrModuleParserOptions.json +3 -0
  590. package/schemas/plugins/dll/DllPlugin.check.d.ts +7 -0
  591. package/schemas/plugins/dll/DllReferencePlugin.check.d.ts +7 -0
  592. package/types.d.ts +5325 -353
  593. package/lib/CaseSensitiveModulesWarning.js +0 -72
  594. package/lib/GraphHelpers.js +0 -46
  595. package/lib/NoModeWarning.js +0 -23
  596. package/lib/css/CssMergeStyleSheetsRuntimeModule.js +0 -56
  597. /package/schemas/plugins/{DllPlugin.check.js → dll/DllPlugin.check.js} +0 -0
  598. /package/schemas/plugins/{DllPlugin.json → dll/DllPlugin.json} +0 -0
  599. /package/schemas/plugins/{DllReferencePlugin.check.js → dll/DllReferencePlugin.check.js} +0 -0
  600. /package/schemas/plugins/{DllReferencePlugin.json → dll/DllReferencePlugin.json} +0 -0
@@ -21,42 +21,37 @@ const { MultiItemCache } = require("./CacheFacade");
21
21
  const Chunk = require("./Chunk");
22
22
  const ChunkGraph = require("./ChunkGraph");
23
23
  const ChunkGroup = require("./ChunkGroup");
24
- const ChunkRenderError = require("./ChunkRenderError");
25
24
  const ChunkTemplate = require("./ChunkTemplate");
26
- const CodeGenerationError = require("./CodeGenerationError");
27
25
  const CodeGenerationResults = require("./CodeGenerationResults");
28
26
  const Dependency = require("./Dependency");
29
27
  const DependencyTemplates = require("./DependencyTemplates");
30
28
  const Entrypoint = require("./Entrypoint");
31
29
  const ErrorHelpers = require("./ErrorHelpers");
32
30
  const FileSystemInfo = require("./FileSystemInfo");
33
- const {
34
- connectChunkGroupAndChunk,
35
- connectChunkGroupParentAndChild,
36
- connectEntrypointAndDependOn
37
- } = require("./GraphHelpers");
38
- const {
39
- makeWebpackError,
40
- tryRunOrWebpackError
41
- } = require("./HookWebpackError");
42
31
  const MainTemplate = require("./MainTemplate");
43
32
  const Module = require("./Module");
44
- const ModuleDependencyError = require("./ModuleDependencyError");
45
- const ModuleDependencyWarning = require("./ModuleDependencyWarning");
46
33
  const ModuleGraph = require("./ModuleGraph");
47
- const ModuleHashingError = require("./ModuleHashingError");
48
- const ModuleNotFoundError = require("./ModuleNotFoundError");
49
34
  const ModuleProfile = require("./ModuleProfile");
50
- const ModuleRestoreError = require("./ModuleRestoreError");
51
- const ModuleStoreError = require("./ModuleStoreError");
52
35
  const ModuleTemplate = require("./ModuleTemplate");
53
36
  const { WEBPACK_MODULE_TYPE_RUNTIME } = require("./ModuleTypeConstants");
54
37
  const RuntimeGlobals = require("./RuntimeGlobals");
55
38
  const RuntimeTemplate = require("./RuntimeTemplate");
56
39
  const Stats = require("./Stats");
57
- const WebpackError = require("./WebpackError");
58
40
  const buildChunkGraph = require("./buildChunkGraph");
59
41
  const BuildCycleError = require("./errors/BuildCycleError");
42
+ const ChunkRenderError = require("./errors/ChunkRenderError");
43
+ const CodeGenerationError = require("./errors/CodeGenerationError");
44
+ const {
45
+ makeWebpackError,
46
+ tryRunOrWebpackError
47
+ } = require("./errors/HookWebpackError");
48
+ const ModuleDependencyError = require("./errors/ModuleDependencyError");
49
+ const ModuleDependencyWarning = require("./errors/ModuleDependencyWarning");
50
+ const ModuleHashingError = require("./errors/ModuleHashingError");
51
+ const ModuleNotFoundError = require("./errors/ModuleNotFoundError");
52
+ const ModuleRestoreError = require("./errors/ModuleRestoreError");
53
+ const ModuleStoreError = require("./errors/ModuleStoreError");
54
+ const WebpackError = require("./errors/WebpackError");
60
55
  const { LogType, Logger } = require("./logging/Logger");
61
56
  const StatsFactory = require("./stats/StatsFactory");
62
57
  const StatsPrinter = require("./stats/StatsPrinter");
@@ -137,11 +132,13 @@ const { isSourceEqual } = require("./util/source");
137
132
  /** @typedef {import("./util/Hash")} Hash */
138
133
 
139
134
  /**
135
+ * Defines the shared type used by this module.
140
136
  * @template T
141
137
  * @typedef {import("tapable").AsArray<T>} AsArray<T>
142
138
  */
143
139
 
144
140
  /**
141
+ * Defines the shared type used by this module.
145
142
  * @template T
146
143
  * @typedef {import("./util/deprecation").FakeHook<T>} FakeHook<T>
147
144
  */
@@ -149,12 +146,14 @@ const { isSourceEqual } = require("./util/source");
149
146
  /** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
150
147
 
151
148
  /**
149
+ * Defines the callback callback.
152
150
  * @callback Callback
153
151
  * @param {(WebpackError | null)=} err
154
152
  * @returns {void}
155
153
  */
156
154
 
157
155
  /**
156
+ * Defines the module callback callback.
158
157
  * @callback ModuleCallback
159
158
  * @param {WebpackError | null=} err
160
159
  * @param {Module | null=} result
@@ -162,6 +161,7 @@ const { isSourceEqual } = require("./util/source");
162
161
  */
163
162
 
164
163
  /**
164
+ * Defines the module factory result callback callback.
165
165
  * @callback ModuleFactoryResultCallback
166
166
  * @param {WebpackError | null=} err
167
167
  * @param {ModuleFactoryResult | null=} result
@@ -169,6 +169,7 @@ const { isSourceEqual } = require("./util/source");
169
169
  */
170
170
 
171
171
  /**
172
+ * Defines the module or module factory result callback callback.
172
173
  * @callback ModuleOrModuleFactoryResultCallback
173
174
  * @param {WebpackError | null=} err
174
175
  * @param {Module | ModuleFactoryResult | null=} result
@@ -176,6 +177,7 @@ const { isSourceEqual } = require("./util/source");
176
177
  */
177
178
 
178
179
  /**
180
+ * Defines the execute module callback callback.
179
181
  * @callback ExecuteModuleCallback
180
182
  * @param {WebpackError | null=} err
181
183
  * @param {ExecuteModuleResult | null=} result
@@ -187,6 +189,7 @@ const { isSourceEqual } = require("./util/source");
187
189
  /** @typedef {Record<string, Source>} CompilationAssets */
188
190
 
189
191
  /**
192
+ * Defines the available modules chunk group mapping type used by this module.
190
193
  * @typedef {object} AvailableModulesChunkGroupMapping
191
194
  * @property {ChunkGroup} chunkGroup
192
195
  * @property {Set<Module>} availableModules
@@ -194,6 +197,7 @@ const { isSourceEqual } = require("./util/source");
194
197
  */
195
198
 
196
199
  /**
200
+ * Defines the dependencies block like type used by this module.
197
201
  * @typedef {object} DependenciesBlockLike
198
202
  * @property {Dependency[]} dependencies
199
203
  * @property {AsyncDependenciesBlock[]} blocks
@@ -202,6 +206,7 @@ const { isSourceEqual } = require("./util/source");
202
206
  /** @typedef {Set<Chunk>} Chunks */
203
207
 
204
208
  /**
209
+ * Defines the chunk path data type used by this module.
205
210
  * @typedef {object} ChunkPathData
206
211
  * @property {string | number} id
207
212
  * @property {string=} name
@@ -212,6 +217,7 @@ const { isSourceEqual } = require("./util/source");
212
217
  */
213
218
 
214
219
  /**
220
+ * Defines the chunk hash context type used by this module.
215
221
  * @typedef {object} ChunkHashContext
216
222
  * @property {CodeGenerationResults} codeGenerationResults results of code generation
217
223
  * @property {RuntimeTemplate} runtimeTemplate the runtime template
@@ -220,12 +226,14 @@ const { isSourceEqual } = require("./util/source");
220
226
  */
221
227
 
222
228
  /**
229
+ * Defines the runtime requirements context type used by this module.
223
230
  * @typedef {object} RuntimeRequirementsContext
224
231
  * @property {ChunkGraph} chunkGraph the chunk graph
225
232
  * @property {CodeGenerationResults} codeGenerationResults the code generation results
226
233
  */
227
234
 
228
235
  /**
236
+ * Defines the execute module options type used by this module.
229
237
  * @typedef {object} ExecuteModuleOptions
230
238
  * @property {EntryOptions=} entryOptions
231
239
  */
@@ -235,6 +243,7 @@ const { isSourceEqual } = require("./util/source");
235
243
  /** @typedef {EXPECTED_ANY} ExecuteModuleExports */
236
244
 
237
245
  /**
246
+ * Defines the execute module result type used by this module.
238
247
  * @typedef {object} ExecuteModuleResult
239
248
  * @property {ExecuteModuleExports} exports
240
249
  * @property {boolean} cacheable
@@ -246,6 +255,7 @@ const { isSourceEqual } = require("./util/source");
246
255
  */
247
256
 
248
257
  /**
258
+ * Defines the execute module object type used by this module.
249
259
  * @typedef {object} ExecuteModuleObject
250
260
  * @property {string=} id module id
251
261
  * @property {ExecuteModuleExports} exports exports
@@ -254,6 +264,7 @@ const { isSourceEqual } = require("./util/source");
254
264
  */
255
265
 
256
266
  /**
267
+ * Defines the execute module argument type used by this module.
257
268
  * @typedef {object} ExecuteModuleArgument
258
269
  * @property {Module} module
259
270
  * @property {ExecuteModuleObject=} moduleObject
@@ -263,6 +274,7 @@ const { isSourceEqual } = require("./util/source");
263
274
  /** @typedef {((id: string) => ExecuteModuleExports) & { i?: ((options: ExecuteOptions) => void)[], c?: Record<string, ExecuteModuleObject> }} WebpackRequire */
264
275
 
265
276
  /**
277
+ * Defines the execute options type used by this module.
266
278
  * @typedef {object} ExecuteOptions
267
279
  * @property {string=} id module id
268
280
  * @property {ExecuteModuleObject} module module
@@ -272,6 +284,7 @@ const { isSourceEqual } = require("./util/source");
272
284
  /** @typedef {Map<string, { source: Source, info: AssetInfo | undefined }>} ExecuteModuleAssets */
273
285
 
274
286
  /**
287
+ * Defines the execute module context type used by this module.
275
288
  * @typedef {object} ExecuteModuleContext
276
289
  * @property {ExecuteModuleAssets} assets
277
290
  * @property {Chunk} chunk
@@ -280,6 +293,7 @@ const { isSourceEqual } = require("./util/source");
280
293
  */
281
294
 
282
295
  /**
296
+ * Defines the entry data type used by this module.
283
297
  * @typedef {object} EntryData
284
298
  * @property {Dependency[]} dependencies dependencies of the entrypoint that should be evaluated at startup
285
299
  * @property {Dependency[]} includeDependencies dependencies of the entrypoint that should be included but not evaluated
@@ -287,6 +301,7 @@ const { isSourceEqual } = require("./util/source");
287
301
  */
288
302
 
289
303
  /**
304
+ * Defines the log entry type used by this module.
290
305
  * @typedef {object} LogEntry
291
306
  * @property {keyof LogType} type
292
307
  * @property {EXPECTED_ANY[]=} args
@@ -295,6 +310,7 @@ const { isSourceEqual } = require("./util/source");
295
310
  */
296
311
 
297
312
  /**
313
+ * Defines the known asset info type used by this module.
298
314
  * @typedef {object} KnownAssetInfo
299
315
  * @property {boolean=} immutable true, if the asset can be long term cached forever (contains a hash)
300
316
  * @property {boolean=} minimized whether the asset is minimized
@@ -316,6 +332,7 @@ const { isSourceEqual } = require("./util/source");
316
332
  /** @typedef {{ path: string, info: AssetInfo }} InterpolatedPathAndAssetInfo */
317
333
 
318
334
  /**
335
+ * Defines the asset type used by this module.
319
336
  * @typedef {object} Asset
320
337
  * @property {string} name the filename of the asset
321
338
  * @property {Source} source source of the asset
@@ -325,6 +342,7 @@ const { isSourceEqual } = require("./util/source");
325
342
  /** @typedef {(length: number) => string} HashWithLengthFunction */
326
343
 
327
344
  /**
345
+ * Defines the module path data type used by this module.
328
346
  * @typedef {object} ModulePathData
329
347
  * @property {string | number} id
330
348
  * @property {string} hash
@@ -334,6 +352,7 @@ const { isSourceEqual } = require("./util/source");
334
352
  /** @typedef {(id: string | number) => string | number} PrepareIdFunction */
335
353
 
336
354
  /**
355
+ * Defines the path data type used by this module.
337
356
  * @typedef {object} PathData
338
357
  * @property {ChunkGraph=} chunkGraph
339
358
  * @property {string=} hash
@@ -356,6 +375,7 @@ const { isSourceEqual } = require("./util/source");
356
375
  /** @typedef {"module" | "chunk" | "root-of-chunk" | "nested"} ExcludeModulesType */
357
376
 
358
377
  /**
378
+ * Defines the known normalized stats options type used by this module.
359
379
  * @typedef {object} KnownNormalizedStatsOptions
360
380
  * @property {string} context
361
381
  * @property {RequestShortener} requestShortener
@@ -400,6 +420,7 @@ const { isSourceEqual } = require("./util/source");
400
420
  /** @typedef {KnownNormalizedStatsOptions & Omit<StatsOptions, keyof KnownNormalizedStatsOptions> & Record<string, EXPECTED_ANY>} NormalizedStatsOptions */
401
421
 
402
422
  /**
423
+ * Defines the known create stats options context type used by this module.
403
424
  * @typedef {object} KnownCreateStatsOptionsContext
404
425
  * @property {boolean=} forToString
405
426
  */
@@ -422,6 +443,7 @@ const esmDependencyCategory = "esm";
422
443
  // TODO webpack 6: remove
423
444
  const deprecatedNormalModuleLoaderHook = util.deprecate(
424
445
  /**
446
+ * Handles the callback logic for this hook.
425
447
  * @param {Compilation} compilation compilation
426
448
  * @returns {NormalModuleCompilationHooks["loader"]} hooks
427
449
  */
@@ -433,6 +455,7 @@ const deprecatedNormalModuleLoaderHook = util.deprecate(
433
455
 
434
456
  // TODO webpack 6: remove
435
457
  /**
458
+ * Define removed module templates.
436
459
  * @param {ModuleTemplates | undefined} moduleTemplates module templates
437
460
  */
438
461
  const defineRemovedModuleTemplates = (moduleTemplates) => {
@@ -481,6 +504,7 @@ const byLocation = compareSelect((err) => err.loc, compareLocations);
481
504
  const compareErrors = concatComparators(byModule, byLocation, byMessage);
482
505
 
483
506
  /**
507
+ * Defines the known unsafe cache data type used by this module.
484
508
  * @typedef {object} KnownUnsafeCacheData
485
509
  * @property {FactoryMeta=} factoryMeta factory meta
486
510
  * @property {ResolveOptions=} resolveOptions resolve options
@@ -491,6 +515,7 @@ const compareErrors = concatComparators(byModule, byLocation, byMessage);
491
515
  /** @typedef {KnownUnsafeCacheData & Record<string, EXPECTED_ANY>} UnsafeCacheData */
492
516
 
493
517
  /**
518
+ * Defines the module with restore from unsafe cache type used by this module.
494
519
  * @typedef {Module & { restoreFromUnsafeCache?: (unsafeCacheData: UnsafeCacheData, moduleFactory: ModuleFactory, compilationParams: CompilationParams) => void }} ModuleWithRestoreFromUnsafeCache
495
520
  */
496
521
 
@@ -522,6 +547,7 @@ class Compilation {
522
547
  /** @type {Set<string>} */
523
548
  let savedAssets = new Set();
524
549
  /**
550
+ * Returns new assets.
525
551
  * @param {CompilationAssets} assets assets
526
552
  * @returns {CompilationAssets} new assets
527
553
  */
@@ -554,6 +580,7 @@ class Compilation {
554
580
  /** @type {ProcessedAssets | undefined} */
555
581
  const processedAssets = additionalAssetsFn ? new WeakSet() : undefined;
556
582
  /**
583
+ * Gets available assets.
557
584
  * @param {CompilationAssets} assets to be processed by additionalAssetsFn
558
585
  * @returns {CompilationAssets} available assets
559
586
  */
@@ -584,6 +611,7 @@ class Compilation {
584
611
  ...remainingTap,
585
612
  type: "async",
586
613
  /**
614
+ * Processes the provided asset.
587
615
  * @param {CompilationAssets} assets assets
588
616
  * @param {(err?: Error | null, result?: void) => void} callback callback
589
617
  * @returns {void}
@@ -629,6 +657,7 @@ class Compilation {
629
657
  return {
630
658
  ...remainingTap,
631
659
  /**
660
+ * Processes the provided asset.
632
661
  * @param {CompilationAssets} assets assets
633
662
  * @param {(err?: Error | null, result?: void) => void} callback callback
634
663
  * @returns {void}
@@ -637,6 +666,7 @@ class Compilation {
637
666
  fn(
638
667
  assets,
639
668
  /**
669
+ * Handles the callback logic for this hook.
640
670
  * @param {Error} err err
641
671
  * @returns {void}
642
672
  */
@@ -673,6 +703,7 @@ class Compilation {
673
703
  return {
674
704
  ...remainingTap,
675
705
  /**
706
+ * Returns result.
676
707
  * @param {CompilationAssets} assets assets
677
708
  * @returns {Promise<CompilationAssets>} result
678
709
  */
@@ -700,6 +731,7 @@ class Compilation {
700
731
  const afterProcessAssetsHook = new SyncHook(["assets"]);
701
732
 
702
733
  /**
734
+ * Creates a process assets hook.
703
735
  * @template T
704
736
  * @param {string} name name of the hook
705
737
  * @param {number} stage new stage
@@ -710,6 +742,7 @@ class Compilation {
710
742
  const createProcessAssetsHook = (name, stage, getArgs, code) => {
711
743
  if (!this._backCompat && code) return;
712
744
  /**
745
+ * Returns error message.
713
746
  * @param {string} reason reason
714
747
  * @returns {string} error message
715
748
  */
@@ -718,6 +751,7 @@ class Compilation {
718
751
  ) => `Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}.
719
752
  BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`;
720
753
  /**
754
+ * Normalizes tap options for migrated process-assets hooks.
721
755
  * @param {string | (import("tapable").TapOptions & { name: string } & ProcessAssetsAdditionalOptions)} options hook options
722
756
  * @returns {import("tapable").TapOptions & { name: string } & ProcessAssetsAdditionalOptions} modified options
723
757
  */
@@ -1042,6 +1076,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1042
1076
  statsPrinter: new SyncHook(["statsPrinter", "options"]),
1043
1077
 
1044
1078
  /**
1079
+ * Gets normal module loader.
1045
1080
  * @deprecated
1046
1081
  * @returns {SyncHook<[AnyLoaderContext, NormalModule]>} normal module loader hook
1047
1082
  */
@@ -1259,6 +1294,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1259
1294
  this.compilationDependencies = {
1260
1295
  add: util.deprecate(
1261
1296
  /**
1297
+ * Handles the add callback for this hook.
1262
1298
  * @param {string} item item
1263
1299
  * @returns {FileSystemDependencies} file dependencies
1264
1300
  */
@@ -1285,6 +1321,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1285
1321
  }
1286
1322
 
1287
1323
  /**
1324
+ * Creates a stats options.
1288
1325
  * @param {string | boolean | StatsOptions | undefined} optionsOrPreset stats option value
1289
1326
  * @param {CreateStatsOptionsContext=} context context
1290
1327
  * @returns {NormalizedStatsOptions} normalized options
@@ -1318,6 +1355,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1318
1355
  }
1319
1356
 
1320
1357
  /**
1358
+ * Creates a stats factory.
1321
1359
  * @param {NormalizedStatsOptions} options options
1322
1360
  * @returns {StatsFactory} the stats factory
1323
1361
  */
@@ -1328,6 +1366,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1328
1366
  }
1329
1367
 
1330
1368
  /**
1369
+ * Creates a stats printer.
1331
1370
  * @param {NormalizedStatsOptions} options options
1332
1371
  * @returns {StatsPrinter} the stats printer
1333
1372
  */
@@ -1338,6 +1377,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1338
1377
  }
1339
1378
 
1340
1379
  /**
1380
+ * Returns the cache facade instance.
1341
1381
  * @param {string} name cache name
1342
1382
  * @returns {CacheFacade} the cache facade instance
1343
1383
  */
@@ -1346,6 +1386,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1346
1386
  }
1347
1387
 
1348
1388
  /**
1389
+ * Returns a logger with that name.
1349
1390
  * @param {string | (() => string)} name name of the logger, or function called once to get the logger name
1350
1391
  * @returns {Logger} a logger with that name
1351
1392
  */
@@ -1471,6 +1512,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1471
1512
  }
1472
1513
 
1473
1514
  /**
1515
+ * Adds the provided module to the compilation.
1474
1516
  * @param {Module} module module to be added that was created
1475
1517
  * @param {ModuleCallback} callback returns the module in the compilation,
1476
1518
  * it could be the passed one (if new), or an already existing in the compilation
@@ -1481,6 +1523,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1481
1523
  }
1482
1524
 
1483
1525
  /**
1526
+ * Adds the provided module to the compilation.
1484
1527
  * @param {Module} module module to be added that was created
1485
1528
  * @param {ModuleCallback} callback returns the module in the compilation,
1486
1529
  * it could be the passed one (if new), or an already existing in the compilation
@@ -1630,6 +1673,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1630
1673
  }
1631
1674
 
1632
1675
  /**
1676
+ * Process module dependencies.
1633
1677
  * @param {Module} module to be processed for deps
1634
1678
  * @param {ModuleCallback} callback callback to be triggered
1635
1679
  * @returns {void}
@@ -1639,11 +1683,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1639
1683
  }
1640
1684
 
1641
1685
  /**
1686
+ * Process module dependencies non recursive.
1642
1687
  * @param {Module} module to be processed for deps
1643
1688
  * @returns {void}
1644
1689
  */
1645
1690
  processModuleDependenciesNonRecursive(module) {
1646
1691
  /**
1692
+ * Process dependencies block.
1647
1693
  * @param {DependenciesBlock} block block
1648
1694
  */
1649
1695
  const processDependenciesBlock = (block) => {
@@ -1662,6 +1708,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1662
1708
  }
1663
1709
 
1664
1710
  /**
1711
+ * Process module dependencies.
1665
1712
  * @param {Module} module to be processed for deps
1666
1713
  * @param {ModuleCallback} callback callback to be triggered
1667
1714
  * @returns {void}
@@ -1697,6 +1744,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1697
1744
  let inProgressTransitive = 1;
1698
1745
 
1699
1746
  /**
1747
+ * On dependencies sorted.
1700
1748
  * @param {WebpackError=} err error
1701
1749
  * @returns {void}
1702
1750
  */
@@ -1733,6 +1781,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1733
1781
  };
1734
1782
 
1735
1783
  /**
1784
+ * On transitive tasks finished.
1736
1785
  * @param {WebpackError=} err error
1737
1786
  * @returns {void}
1738
1787
  */
@@ -1744,6 +1793,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1744
1793
  };
1745
1794
 
1746
1795
  /**
1796
+ * Process dependency.
1747
1797
  * @param {Dependency} dep dependency
1748
1798
  * @param {number} index index in block
1749
1799
  * @returns {void}
@@ -1855,6 +1905,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1855
1905
  };
1856
1906
 
1857
1907
  /**
1908
+ * Process dependency for resolving.
1858
1909
  * @param {Dependency} dep dependency
1859
1910
  * @returns {void}
1860
1911
  */
@@ -1973,6 +2024,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1973
2024
  }
1974
2025
 
1975
2026
  /**
2027
+ * Handle new module from unsafe cache.
1976
2028
  * @private
1977
2029
  * @param {Module} originModule original module
1978
2030
  * @param {Dependency} dependency dependency
@@ -2005,6 +2057,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2005
2057
  }
2006
2058
 
2007
2059
  /**
2060
+ * Handle existing module from unsafe cache.
2008
2061
  * @private
2009
2062
  * @param {Module} originModule original modules
2010
2063
  * @param {Dependency} dependency dependency
@@ -2017,6 +2070,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2017
2070
  }
2018
2071
 
2019
2072
  /**
2073
+ * Processes the provided factorize module option.
2020
2074
  * @param {FactorizeModuleOptions} options options
2021
2075
  * @param {ModuleOrModuleFactoryResultCallback} callback callback
2022
2076
  * @returns {void}
@@ -2103,18 +2157,21 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2103
2157
  }
2104
2158
 
2105
2159
  /**
2160
+ * Processes the provided module callback.
2106
2161
  * @overload
2107
2162
  * @param {FactorizeModuleOptions & { factoryResult?: false }} options options
2108
2163
  * @param {ModuleCallback} callback callback
2109
2164
  * @returns {void}
2110
2165
  */
2111
2166
  /**
2167
+ * Processes the provided module factory result callback.
2112
2168
  * @overload
2113
2169
  * @param {FactorizeModuleOptions & { factoryResult: true }} options options
2114
2170
  * @param {ModuleFactoryResultCallback} callback callback
2115
2171
  * @returns {void}
2116
2172
  */
2117
2173
  /**
2174
+ * Processes the provided |.
2118
2175
  * @param {FactorizeModuleOptions & { factoryResult?: false } | FactorizeModuleOptions & { factoryResult: true }} options options
2119
2176
  * @param {ModuleCallback | ModuleFactoryResultCallback} callback callback
2120
2177
  */
@@ -2127,6 +2184,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2127
2184
  }
2128
2185
 
2129
2186
  /**
2187
+ * Defines the handle module creation options type used by this module.
2130
2188
  * @typedef {object} HandleModuleCreationOptions
2131
2189
  * @property {ModuleFactory} factory
2132
2190
  * @property {Dependency[]} dependencies
@@ -2139,6 +2197,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2139
2197
  */
2140
2198
 
2141
2199
  /**
2200
+ * Handle module creation.
2142
2201
  * @param {HandleModuleCreationOptions} options options object
2143
2202
  * @param {ModuleCallback} callback callback
2144
2203
  * @returns {void}
@@ -2283,6 +2342,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2283
2342
  }
2284
2343
 
2285
2344
  /**
2345
+ * Handle module build and dependencies.
2286
2346
  * @private
2287
2347
  * @param {Module | null} originModule original module
2288
2348
  * @param {Module} module module
@@ -2375,6 +2435,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2375
2435
  }
2376
2436
 
2377
2437
  /**
2438
+ * Adds the provided string to the compilation.
2378
2439
  * @param {string} context context string path
2379
2440
  * @param {Dependency} dependency dependency used to create Module chain
2380
2441
  * @param {ModuleCallback} callback callback for when module chain is complete
@@ -2385,6 +2446,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2385
2446
  }
2386
2447
 
2387
2448
  /**
2449
+ * Adds the provided object to the compilation.
2388
2450
  * @param {object} options options
2389
2451
  * @param {string} options.context context string path
2390
2452
  * @param {Dependency} options.dependency dependency used to create Module chain
@@ -2439,6 +2501,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2439
2501
  }
2440
2502
 
2441
2503
  /**
2504
+ * Adds the provided string to the compilation.
2442
2505
  * @param {string} context context path for entry
2443
2506
  * @param {Dependency} entry entry dependency that should be followed
2444
2507
  * @param {string | EntryOptions} optionsOrName options or deprecated name of entry
@@ -2456,6 +2519,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2456
2519
  }
2457
2520
 
2458
2521
  /**
2522
+ * Adds the provided string to the compilation.
2459
2523
  * @param {string} context context path for entry
2460
2524
  * @param {Dependency} dependency dependency that should be followed
2461
2525
  * @param {EntryOptions} options options
@@ -2473,6 +2537,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2473
2537
  }
2474
2538
 
2475
2539
  /**
2540
+ * Adds the provided string to the compilation.
2476
2541
  * @param {string} context context path for entry
2477
2542
  * @param {Dependency} entry entry dependency that should be followed
2478
2543
  * @param {"dependencies" | "includeDependencies"} target type of entry
@@ -2553,6 +2618,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2553
2618
  }
2554
2619
 
2555
2620
  /**
2621
+ * Processes the provided module.
2556
2622
  * @param {Module} module module to be rebuilt
2557
2623
  * @param {ModuleCallback} callback callback when module finishes rebuilding
2558
2624
  * @returns {void}
@@ -2562,6 +2628,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2562
2628
  }
2563
2629
 
2564
2630
  /**
2631
+ * Processes the provided module.
2565
2632
  * @param {Module} module module to be rebuilt
2566
2633
  * @param {ModuleCallback} callback callback when module finishes rebuilding
2567
2634
  * @returns {void}
@@ -2607,6 +2674,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2607
2674
  }
2608
2675
 
2609
2676
  /**
2677
+ * Compute affected modules.
2610
2678
  * @private
2611
2679
  * @param {Set<Module>} modules modules
2612
2680
  */
@@ -2629,6 +2697,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2629
2697
  let statWithoutBuild = 0;
2630
2698
 
2631
2699
  /**
2700
+ * Compute references.
2632
2701
  * @param {Module} module module
2633
2702
  * @returns {WeakReferences | undefined} references
2634
2703
  */
@@ -2646,6 +2715,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2646
2715
  };
2647
2716
 
2648
2717
  /**
2718
+ * Compares references.
2649
2719
  * @param {Module} module the module
2650
2720
  * @param {WeakReferences | undefined} references references
2651
2721
  * @returns {boolean} true, when the references differ
@@ -2722,6 +2792,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2722
2792
  }
2723
2793
 
2724
2794
  /**
2795
+ * Reduce affect type.
2725
2796
  * @param {Readonly<ModuleGraphConnection[]>} connections connections
2726
2797
  * @returns {symbol | boolean} result
2727
2798
  */
@@ -2804,6 +2875,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2804
2875
  let statChanged = 0;
2805
2876
  let statNew = 0;
2806
2877
  /**
2878
+ * Compute references.
2807
2879
  * @param {Module} module module
2808
2880
  * @returns {References} references
2809
2881
  */
@@ -2840,6 +2912,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2840
2912
  return { id, modules, blocks };
2841
2913
  };
2842
2914
  /**
2915
+ * Compares references.
2843
2916
  * @param {Module} module module
2844
2917
  * @param {object} references references
2845
2918
  * @param {string | number} references.id id
@@ -2907,6 +2980,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2907
2980
  }
2908
2981
 
2909
2982
  /**
2983
+ * Processes the provided callback.
2910
2984
  * @param {Callback} callback callback
2911
2985
  */
2912
2986
  finish(callback) {
@@ -2966,6 +3040,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2966
3040
  const logger = this.getLogger("webpack.Compilation.ModuleProfile");
2967
3041
  // Avoid coverage problems due indirect changes
2968
3042
  /**
3043
+ * Processes the provided value.
2969
3044
  * @param {number} value value
2970
3045
  * @param {string} msg message
2971
3046
  */
@@ -2984,6 +3059,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2984
3059
  }
2985
3060
  };
2986
3061
  /**
3062
+ * Log normal summary.
2987
3063
  * @param {string} category a category
2988
3064
  * @param {(profile: ModuleProfile) => number} getDuration get duration callback
2989
3065
  * @param {(profile: ModuleProfile) => number} getParallelism get parallelism callback
@@ -3013,6 +3089,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3013
3089
  );
3014
3090
  };
3015
3091
  /**
3092
+ * Log by loaders summary.
3016
3093
  * @param {string} category a category
3017
3094
  * @param {(profile: ModuleProfile) => number} getDuration get duration callback
3018
3095
  * @param {(profile: ModuleProfile) => number} getParallelism get parallelism callback
@@ -3132,7 +3209,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3132
3209
  let hasProblems = this.reportDependencyErrorsAndWarnings(module, [
3133
3210
  module
3134
3211
  ]);
3135
- const errors = module.getErrors();
3212
+ const errors = /** @type {WebpackError[]} */ (module.getErrors());
3136
3213
  if (errors !== undefined) {
3137
3214
  for (const error of errors) {
3138
3215
  if (!error.module) {
@@ -3142,7 +3219,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3142
3219
  hasProblems = true;
3143
3220
  }
3144
3221
  }
3145
- const warnings = module.getWarnings();
3222
+ const warnings = /** @type {WebpackError[]} */ (module.getWarnings());
3146
3223
  if (warnings !== undefined) {
3147
3224
  for (const warning of warnings) {
3148
3225
  if (!warning.module) {
@@ -3177,11 +3254,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3177
3254
  }
3178
3255
 
3179
3256
  /**
3257
+ * Processes the provided callback.
3180
3258
  * @param {Callback} callback signals when the call finishes
3181
3259
  * @returns {void}
3182
3260
  */
3183
3261
  seal(callback) {
3184
3262
  /**
3263
+ * Processes the provided err.
3185
3264
  * @param {WebpackError=} err err
3186
3265
  * @returns {void}
3187
3266
  */
@@ -3228,7 +3307,10 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3228
3307
  this.namedChunkGroups.set(name, entrypoint);
3229
3308
  this.entrypoints.set(name, entrypoint);
3230
3309
  this.chunkGroups.push(entrypoint);
3231
- connectChunkGroupAndChunk(entrypoint, chunk);
3310
+
3311
+ if (entrypoint.pushChunk(chunk)) {
3312
+ chunk.addGroup(entrypoint);
3313
+ }
3232
3314
 
3233
3315
  /** @type {Set<Module>} */
3234
3316
  const entryModules = new Set();
@@ -3256,6 +3338,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3256
3338
  this.assignDepths(entryModules);
3257
3339
 
3258
3340
  /**
3341
+ * Returns sorted deps.
3259
3342
  * @param {Dependency[]} deps deps
3260
3343
  * @returns {Module[]} sorted deps
3261
3344
  */
@@ -3318,8 +3401,12 @@ Remove the 'runtime' option from the entrypoint.`);
3318
3401
  entry.setRuntimeChunk(entryChunk);
3319
3402
  continue outer;
3320
3403
  }
3321
- connectEntrypointAndDependOn(entry, dependency);
3322
- connectChunkGroupParentAndChild(dependency, entry);
3404
+
3405
+ entry.addDependOn(dependency);
3406
+
3407
+ if (dependency.addChild(entry)) {
3408
+ entry.addParent(dependency);
3409
+ }
3323
3410
  }
3324
3411
  } else if (runtime) {
3325
3412
  const entry = /** @type {Entrypoint} */ (this.entrypoints.get(name));
@@ -3556,6 +3643,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3556
3643
  }
3557
3644
 
3558
3645
  /**
3646
+ * Report dependency errors and warnings.
3559
3647
  * @param {Module} module module to report from
3560
3648
  * @param {DependenciesBlock[]} blocks blocks to report from
3561
3649
  * @returns {boolean} true, when it has warnings or errors
@@ -3592,6 +3680,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3592
3680
  }
3593
3681
 
3594
3682
  /**
3683
+ * Generates code and runtime requirements for this module.
3595
3684
  * @param {Callback} callback callback
3596
3685
  */
3597
3686
  codeGeneration(callback) {
@@ -3629,6 +3718,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3629
3718
  }
3630
3719
 
3631
3720
  /**
3721
+ * Run code generation jobs.
3632
3722
  * @private
3633
3723
  * @param {CodeGenerationJobs} jobs code generation jobs
3634
3724
  * @param {Callback} callback callback
@@ -3738,6 +3828,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3738
3828
  }
3739
3829
 
3740
3830
  /**
3831
+ * Code generation module.
3741
3832
  * @param {Module} module module
3742
3833
  * @param {RuntimeSpec} runtime runtime
3743
3834
  * @param {RuntimeSpec[]} runtimes runtimes
@@ -3830,6 +3921,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3830
3921
  }
3831
3922
 
3832
3923
  /**
3924
+ * Process runtime requirements.
3833
3925
  * @param {object} options options
3834
3926
  * @param {ChunkGraph=} options.chunkGraph the chunk graph
3835
3927
  * @param {Iterable<Module>=} options.modules modules
@@ -3973,6 +4065,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
3973
4065
 
3974
4066
  // TODO webpack 6 make chunkGraph argument non-optional
3975
4067
  /**
4068
+ * Adds runtime module.
3976
4069
  * @param {Chunk} chunk target chunk
3977
4070
  * @param {RuntimeModule} module runtime module
3978
4071
  * @param {ChunkGraph} chunkGraph the chunk graph
@@ -4065,7 +4158,9 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4065
4158
  }
4066
4159
  const chunk = this.addChunk(name);
4067
4160
 
4068
- connectChunkGroupAndChunk(chunkGroup, chunk);
4161
+ if (chunkGroup.pushChunk(chunk)) {
4162
+ chunk.addGroup(chunkGroup);
4163
+ }
4069
4164
 
4070
4165
  this.chunkGroups.push(chunkGroup);
4071
4166
  if (name) {
@@ -4075,6 +4170,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4075
4170
  }
4076
4171
 
4077
4172
  /**
4173
+ * Adds the provided async entrypoint to this chunk group.
4078
4174
  * @param {EntryOptions} options options for the entrypoint
4079
4175
  * @param {Module} module the module the references the chunk group
4080
4176
  * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module)
@@ -4108,7 +4204,9 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4108
4204
  }
4109
4205
  this.chunkGroups.push(entrypoint);
4110
4206
  this.asyncEntrypoints.push(entrypoint);
4111
- connectChunkGroupAndChunk(entrypoint, chunk);
4207
+ if (entrypoint.pushChunk(chunk)) {
4208
+ chunk.addGroup(entrypoint);
4209
+ }
4112
4210
  if (module) {
4113
4211
  entrypoint.addOrigin(module, loc, request);
4114
4212
  }
@@ -4140,6 +4238,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4140
4238
  }
4141
4239
 
4142
4240
  /**
4241
+ * Processes the provided module.
4143
4242
  * @deprecated
4144
4243
  * @param {Module} module module to assign depth
4145
4244
  * @returns {void}
@@ -4154,6 +4253,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4154
4253
  moduleGraph.setDepth(module, 0);
4155
4254
 
4156
4255
  /**
4256
+ * Processes the provided module.
4157
4257
  * @param {Module} module module for processing
4158
4258
  * @returns {void}
4159
4259
  */
@@ -4176,7 +4276,8 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4176
4276
  }
4177
4277
 
4178
4278
  /**
4179
- * @param {Module[] | Set<Module>} modules module to assign depth
4279
+ * Assigns depth values to the provided modules.
4280
+ * @param {Module[] | Set<Module>} modules modules to assign depth
4180
4281
  * @returns {void}
4181
4282
  */
4182
4283
  assignDepths(modules) {
@@ -4210,6 +4311,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4210
4311
  }
4211
4312
 
4212
4313
  /**
4314
+ * Gets dependency referenced exports.
4213
4315
  * @param {Dependency} dependency the dependency
4214
4316
  * @param {RuntimeSpec} runtime the runtime
4215
4317
  * @returns {ReferencedExports} referenced exports
@@ -4227,6 +4329,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4227
4329
  }
4228
4330
 
4229
4331
  /**
4332
+ * Removes reasons of dependency block.
4230
4333
  * @param {Module} module module relationship for removal
4231
4334
  * @param {DependenciesBlockLike} block dependencies block
4232
4335
  * @returns {void}
@@ -4257,6 +4360,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4257
4360
  }
4258
4361
 
4259
4362
  /**
4363
+ * Patch chunks after reason removal.
4260
4364
  * @param {Module} module module to patch tie
4261
4365
  * @param {Chunk} chunk chunk to patch tie
4262
4366
  * @returns {void}
@@ -4275,12 +4379,14 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4275
4379
  }
4276
4380
 
4277
4381
  /**
4382
+ * Removes chunk from dependencies.
4278
4383
  * @param {DependenciesBlock} block block tie for Chunk
4279
4384
  * @param {Chunk} chunk chunk to remove from dep
4280
4385
  * @returns {void}
4281
4386
  */
4282
4387
  removeChunkFromDependencies(block, chunk) {
4283
4388
  /**
4389
+ * Iterator dependency.
4284
4390
  * @param {Dependency} d dependency to (maybe) patch up
4285
4391
  */
4286
4392
  const iteratorDependency = (d) => {
@@ -4314,6 +4420,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4314
4420
  assignRuntimeIds() {
4315
4421
  const { chunkGraph } = this;
4316
4422
  /**
4423
+ * Process entrypoint.
4317
4424
  * @param {Entrypoint} ep an entrypoint
4318
4425
  */
4319
4426
  const processEntrypoint = (ep) => {
@@ -4416,6 +4523,7 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
4416
4523
  }
4417
4524
 
4418
4525
  /**
4526
+ * Create module hash.
4419
4527
  * @private
4420
4528
  * @param {Module} module module
4421
4529
  * @param {ChunkGraph} chunkGraph the chunk graph
@@ -4630,6 +4738,7 @@ This prevents using hashes of each other and should be avoided.`);
4630
4738
  const errors = [];
4631
4739
 
4632
4740
  /**
4741
+ * Processes the provided chunk.
4633
4742
  * @param {Chunk} chunk chunk
4634
4743
  */
4635
4744
  const processChunk = (chunk) => {
@@ -4762,6 +4871,7 @@ This prevents using hashes of each other and should be avoided.`);
4762
4871
  }
4763
4872
 
4764
4873
  /**
4874
+ * Processes the provided file.
4765
4875
  * @param {string} file file name
4766
4876
  * @param {Source} source asset source
4767
4877
  * @param {AssetInfo} assetInfo extra asset information
@@ -4793,6 +4903,7 @@ This prevents using hashes of each other and should be avoided.`);
4793
4903
  }
4794
4904
 
4795
4905
  /**
4906
+ * Processes the provided file.
4796
4907
  * @private
4797
4908
  * @param {string} file file name
4798
4909
  * @param {AssetInfo=} newInfo new asset information
@@ -4809,6 +4920,7 @@ This prevents using hashes of each other and should be avoided.`);
4809
4920
  if (oldRelated) {
4810
4921
  for (const key of Object.keys(oldRelated)) {
4811
4922
  /**
4923
+ * Processes the provided name.
4812
4924
  * @param {string} name name
4813
4925
  */
4814
4926
  const remove = (name) => {
@@ -4834,6 +4946,7 @@ This prevents using hashes of each other and should be avoided.`);
4834
4946
  if (newRelated) {
4835
4947
  for (const key of Object.keys(newRelated)) {
4836
4948
  /**
4949
+ * Processes the provided name.
4837
4950
  * @param {string} name name
4838
4951
  */
4839
4952
  const add = (name) => {
@@ -4860,6 +4973,7 @@ This prevents using hashes of each other and should be avoided.`);
4860
4973
  }
4861
4974
 
4862
4975
  /**
4976
+ * Updates asset using the provided file.
4863
4977
  * @param {string} file file name
4864
4978
  * @param {Source | ((source: Source) => Source)} newSourceOrFunction new asset source or function converting old to new
4865
4979
  * @param {(AssetInfo | ((assetInfo?: AssetInfo) => AssetInfo | undefined)) | undefined} assetInfoUpdateOrFunction new asset info or function converting old to new
@@ -4893,6 +5007,7 @@ This prevents using hashes of each other and should be avoided.`);
4893
5007
  }
4894
5008
 
4895
5009
  /**
5010
+ * Processes the provided file.
4896
5011
  * @param {string} file file name
4897
5012
  * @param {string} newFile the new name of file
4898
5013
  */
@@ -4963,6 +5078,7 @@ This prevents using hashes of each other and should be avoided.`);
4963
5078
  }
4964
5079
 
4965
5080
  /**
5081
+ * Processes the provided file.
4966
5082
  * @param {string} file file name
4967
5083
  */
4968
5084
  deleteAsset(file) {
@@ -4976,6 +5092,7 @@ This prevents using hashes of each other and should be avoided.`);
4976
5092
  if (related) {
4977
5093
  for (const key of Object.keys(related)) {
4978
5094
  /**
5095
+ * Checks used and delete.
4979
5096
  * @param {string} file file
4980
5097
  */
4981
5098
  const checkUsedAndDelete = (file) => {
@@ -5017,6 +5134,7 @@ This prevents using hashes of each other and should be avoided.`);
5017
5134
  }
5018
5135
 
5019
5136
  /**
5137
+ * Returns the asset or undefined when not found.
5020
5138
  * @param {string} name the name of the asset
5021
5139
  * @returns {Readonly<Asset> | undefined} the asset or undefined when not found
5022
5140
  */
@@ -5062,6 +5180,7 @@ This prevents using hashes of each other and should be avoided.`);
5062
5180
  }
5063
5181
 
5064
5182
  /**
5183
+ * Gets render manifest.
5065
5184
  * @param {RenderManifestOptions} options options object
5066
5185
  * @returns {RenderManifestEntry[]} manifest entries
5067
5186
  */
@@ -5070,6 +5189,7 @@ This prevents using hashes of each other and should be avoided.`);
5070
5189
  }
5071
5190
 
5072
5191
  /**
5192
+ * Creates a chunk assets.
5073
5193
  * @param {Callback} callback signals when the call finishes
5074
5194
  * @returns {void}
5075
5195
  */
@@ -5128,6 +5248,7 @@ This prevents using hashes of each other and should be avoided.`);
5128
5248
 
5129
5249
  let inTry = true;
5130
5250
  /**
5251
+ * Error and callback.
5131
5252
  * @param {Error} err error
5132
5253
  * @returns {void}
5133
5254
  */
@@ -5235,6 +5356,7 @@ This prevents using hashes of each other and should be avoided.`);
5235
5356
  }
5236
5357
 
5237
5358
  /**
5359
+ * Returns interpolated path.
5238
5360
  * @param {TemplatePath} filename used to get asset path with hash
5239
5361
  * @param {PathData} data context data
5240
5362
  * @returns {string} interpolated path
@@ -5250,6 +5372,7 @@ This prevents using hashes of each other and should be avoided.`);
5250
5372
  }
5251
5373
 
5252
5374
  /**
5375
+ * Gets path with info.
5253
5376
  * @param {TemplatePath} filename used to get asset path with hash
5254
5377
  * @param {PathData} data context data
5255
5378
  * @returns {InterpolatedPathAndAssetInfo} interpolated path and asset info
@@ -5265,6 +5388,7 @@ This prevents using hashes of each other and should be avoided.`);
5265
5388
  }
5266
5389
 
5267
5390
  /**
5391
+ * Returns interpolated path.
5268
5392
  * @param {TemplatePath} filename used to get asset path with hash
5269
5393
  * @param {PathData} data context data
5270
5394
  * @returns {string} interpolated path
@@ -5278,6 +5402,7 @@ This prevents using hashes of each other and should be avoided.`);
5278
5402
  }
5279
5403
 
5280
5404
  /**
5405
+ * Gets asset path with info.
5281
5406
  * @param {TemplatePath} filename used to get asset path with hash
5282
5407
  * @param {PathData} data context data
5283
5408
  * @returns {InterpolatedPathAndAssetInfo} interpolated path and asset info
@@ -5323,6 +5448,7 @@ This prevents using hashes of each other and should be avoided.`);
5323
5448
  }
5324
5449
 
5325
5450
  /**
5451
+ * Processes the provided module.
5326
5452
  * @param {Module} module the module
5327
5453
  * @param {ExecuteModuleOptions} options options
5328
5454
  * @param {ExecuteModuleCallback} callback callback
@@ -5373,7 +5499,9 @@ This prevents using hashes of each other and should be avoided.`);
5373
5499
  ...options.entryOptions
5374
5500
  });
5375
5501
  chunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint);
5376
- connectChunkGroupAndChunk(entrypoint, chunk);
5502
+ if (entrypoint.pushChunk(chunk)) {
5503
+ chunk.addGroup(entrypoint);
5504
+ }
5377
5505
  entrypoint.setRuntimeChunk(chunk);
5378
5506
  entrypoint.setEntrypointChunk(chunk);
5379
5507
 
@@ -5407,6 +5535,7 @@ This prevents using hashes of each other and should be avoided.`);
5407
5535
  this.outputOptions.hashFunction
5408
5536
  );
5409
5537
  /**
5538
+ * Processes the provided module.
5410
5539
  * @param {Module} module the module
5411
5540
  * @param {Callback} callback callback
5412
5541
  * @returns {void}
@@ -5617,6 +5746,7 @@ This prevents using hashes of each other and should be avoided.`);
5617
5746
  context.__webpack_require__ = __webpack_require__;
5618
5747
 
5619
5748
  /**
5749
+ * Webpack require module.
5620
5750
  * @param {ExecuteModuleArgument} moduleArgument the module argument
5621
5751
  * @param {string=} id id
5622
5752
  * @returns {ExecuteModuleExports} exports
@@ -5759,6 +5889,7 @@ This prevents using hashes of each other and should be avoided.`);
5759
5889
  }
5760
5890
 
5761
5891
  /**
5892
+ * Defines the factorize module options type used by this module.
5762
5893
  * @typedef {object} FactorizeModuleOptions
5763
5894
  * @property {ModuleProfile=} currentProfile
5764
5895
  * @property {ModuleFactory} factory
@@ -5770,6 +5901,7 @@ This prevents using hashes of each other and should be avoided.`);
5770
5901
  */
5771
5902
 
5772
5903
  /**
5904
+ * Processes the provided factorize module option.
5773
5905
  * @param {FactorizeModuleOptions} options options object
5774
5906
  * @param {ModuleCallback | ModuleFactoryResultCallback} callback callback
5775
5907
  * @returns {void}
@@ -5796,6 +5928,7 @@ Object.defineProperty(compilationPrototype, "cache", {
5796
5928
  configurable: false,
5797
5929
  get: util.deprecate(
5798
5930
  /**
5931
+ * Returns the cache.
5799
5932
  * @this {Compilation} the compilation
5800
5933
  * @returns {Cache} the cache
5801
5934
  */
@@ -5807,6 +5940,7 @@ Object.defineProperty(compilationPrototype, "cache", {
5807
5940
  ),
5808
5941
  set: util.deprecate(
5809
5942
  /**
5943
+ * Handles the value callback for this hook.
5810
5944
  * @param {EXPECTED_ANY} _v value
5811
5945
  */
5812
5946
  (_v) => {},