@depup/webpack 5.109.0-depup.0 → 5.110.1-depup.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 (641) hide show
  1. package/README.md +7 -7
  2. package/bin/webpack.js +12 -0
  3. package/changes.json +10 -10
  4. package/lib/APIPlugin.js +123 -17
  5. package/lib/AsyncDependenciesBlock.js +10 -7
  6. package/lib/AutomaticPrefetchPlugin.js +1 -1
  7. package/lib/BannerPlugin.js +10 -6
  8. package/lib/CacheFacade.js +6 -6
  9. package/lib/Chunk.js +14 -11
  10. package/lib/ChunkGraph.js +43 -32
  11. package/lib/ChunkGroup.js +7 -7
  12. package/lib/ChunkTemplate.js +35 -44
  13. package/lib/CircularModulesPlugin.js +205 -28
  14. package/lib/CleanPlugin.js +15 -16
  15. package/lib/CodeGenerationResults.js +11 -8
  16. package/lib/CompatibilityPlugin.js +38 -7
  17. package/lib/Compilation.js +709 -414
  18. package/lib/Compiler.js +69 -42
  19. package/lib/ConcatenationScope.js +117 -8
  20. package/lib/ConditionalInitFragment.js +3 -3
  21. package/lib/ConstPlugin.js +13 -11
  22. package/lib/ContextExclusionPlugin.js +1 -1
  23. package/lib/ContextModule.js +146 -54
  24. package/lib/ContextModuleFactory.js +46 -14
  25. package/lib/ContextReplacementPlugin.js +12 -14
  26. package/lib/DefinePlugin.js +168 -57
  27. package/lib/DependenciesBlock.js +9 -6
  28. package/lib/Dependency.js +36 -16
  29. package/lib/DependencyTemplate.js +11 -12
  30. package/lib/DependencyTemplates.js +3 -3
  31. package/lib/DotenvPlugin.js +50 -13
  32. package/lib/DynamicEntryPlugin.js +8 -4
  33. package/lib/EntryOptionPlugin.js +8 -4
  34. package/lib/EntryPlugin.js +2 -2
  35. package/lib/Entrypoint.js +6 -2
  36. package/lib/EnvironmentPlugin.js +2 -2
  37. package/lib/EvalDevToolModulePlugin.js +8 -4
  38. package/lib/EvalSourceMapDevToolPlugin.js +15 -8
  39. package/lib/ExportsInfo.js +123 -19
  40. package/lib/ExportsInfoApiPlugin.js +2 -4
  41. package/lib/ExternalModule.js +242 -84
  42. package/lib/ExternalModuleFactoryPlugin.js +97 -38
  43. package/lib/ExternalsPlugin.js +10 -6
  44. package/lib/FileSystemInfo.js +116 -42
  45. package/lib/FlagAllModulesAsUsedPlugin.js +2 -3
  46. package/lib/FlagDependencyExportsPlugin.js +76 -19
  47. package/lib/FlagDependencyUsagePlugin.js +63 -57
  48. package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
  49. package/lib/Generator.js +36 -15
  50. package/lib/HotModuleReplacementPlugin.js +16 -44
  51. package/lib/IgnorePlugin.js +8 -4
  52. package/lib/IgnoreWarningsPlugin.js +2 -2
  53. package/lib/InitFragment.js +28 -36
  54. package/lib/JavascriptMetaInfoPlugin.js +35 -4
  55. package/lib/LazyBarrel.js +3 -4
  56. package/lib/LibraryTemplatePlugin.js +10 -6
  57. package/lib/LoaderOptionsPlugin.js +7 -3
  58. package/lib/LoaderTargetPlugin.js +1 -1
  59. package/lib/MainTemplate.js +49 -42
  60. package/lib/ManifestPlugin.js +12 -11
  61. package/lib/Module.js +62 -33
  62. package/lib/ModuleFactory.js +3 -3
  63. package/lib/ModuleFilenameHelpers.js +22 -6
  64. package/lib/ModuleGraph.js +195 -21
  65. package/lib/ModuleGraphConnection.js +6 -13
  66. package/lib/ModuleInfoHeaderPlugin.js +8 -10
  67. package/lib/ModuleTemplate.js +62 -63
  68. package/lib/MultiCompiler.js +130 -64
  69. package/lib/MultiStats.js +40 -9
  70. package/lib/MultiWatching.js +3 -3
  71. package/lib/NoEmitOnErrorsPlugin.js +1 -1
  72. package/lib/NodeStuffPlugin.js +29 -19
  73. package/lib/NormalModule.js +221 -156
  74. package/lib/NormalModuleFactory.js +563 -112
  75. package/lib/NormalModuleReplacementPlugin.js +5 -8
  76. package/lib/NullFactory.js +6 -2
  77. package/lib/OptionsApply.js +7 -3
  78. package/lib/Parser.js +7 -3
  79. package/lib/PlatformPlugin.js +2 -2
  80. package/lib/PrefetchPlugin.js +1 -1
  81. package/lib/ProgressPlugin.js +16 -13
  82. package/lib/ProvidePlugin.js +3 -5
  83. package/lib/RawModule.js +25 -17
  84. package/lib/RecordIdsPlugin.js +3 -3
  85. package/lib/RequestShortener.js +1 -1
  86. package/lib/ResolverFactory.js +2 -2
  87. package/lib/RuntimeGlobals.js +22 -10
  88. package/lib/RuntimeModule.js +29 -19
  89. package/lib/RuntimePlugin.js +346 -256
  90. package/lib/RuntimeTemplate.js +2792 -352
  91. package/lib/SelfModuleFactory.js +7 -3
  92. package/lib/SourceMapDevToolModuleOptionsPlugin.js +6 -2
  93. package/lib/SourceMapDevToolPlugin.js +30 -20
  94. package/lib/Stats.js +3 -4
  95. package/lib/Template.js +55 -25
  96. package/lib/TemplatedPathPlugin.js +96 -14
  97. package/lib/UseStrictPlugin.js +4 -6
  98. package/lib/WarnCaseSensitiveModulesPlugin.js +4 -4
  99. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  100. package/lib/WarnNoModeSetPlugin.js +1 -1
  101. package/lib/WatchIgnorePlugin.js +8 -6
  102. package/lib/Watching.js +8 -8
  103. package/lib/WebpackIsIncludedPlugin.js +2 -4
  104. package/lib/WebpackOptionsApply.js +308 -18
  105. package/lib/WebpackOptionsDefaulter.js +6 -2
  106. package/lib/asset/AssetBytesGenerator.js +12 -10
  107. package/lib/asset/AssetBytesParser.js +2 -4
  108. package/lib/asset/AssetGenerator.js +188 -95
  109. package/lib/asset/AssetModule.js +7 -3
  110. package/lib/asset/AssetModulesPlugin.js +110 -38
  111. package/lib/asset/AssetParser.js +9 -7
  112. package/lib/asset/AssetSourceGenerator.js +60 -13
  113. package/lib/asset/AssetSourceParser.js +2 -4
  114. package/lib/asset/RawDataUrlModule.js +24 -16
  115. package/lib/asset/WebManifestGenerator.js +8 -10
  116. package/lib/asset/WebManifestParser.js +24 -10
  117. package/lib/async-modules/AsyncModuleHelpers.js +2 -2
  118. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  119. package/lib/async-modules/InferAsyncModulesPlugin.js +2 -2
  120. package/lib/async-modules/isGeneratorLowered.js +4 -4
  121. package/lib/buildChunkGraph.js +36 -27
  122. package/lib/bun/BunTargetPlugin.js +1 -1
  123. package/lib/cache/AddBuildDependenciesPlugin.js +1 -1
  124. package/lib/cache/AddManagedPathsPlugin.js +1 -1
  125. package/lib/cache/IdleFileCachePlugin.js +2 -2
  126. package/lib/cache/MemoryCachePlugin.js +18 -10
  127. package/lib/cache/MemoryWithGcCachePlugin.js +34 -22
  128. package/lib/cache/PackFileCacheStrategy.js +289 -28
  129. package/lib/cache/ResolverCachePlugin.js +38 -18
  130. package/lib/cache/getLazyHashedEtag.js +1 -2
  131. package/lib/cache/mergeEtags.js +1 -1
  132. package/lib/cli.js +1 -3
  133. package/lib/config/browserslistTargetHandler.js +41 -5
  134. package/lib/config/defaults.js +282 -81
  135. package/lib/config/defineConfig.js +10 -2
  136. package/lib/config/getClaimedAssetTypes.js +65 -0
  137. package/lib/config/normalization.js +36 -16
  138. package/lib/config/target.js +46 -3
  139. package/lib/container/ContainerEntryDependency.js +1 -1
  140. package/lib/container/ContainerEntryModule.js +24 -15
  141. package/lib/container/ContainerEntryModuleFactory.js +7 -3
  142. package/lib/container/ContainerPlugin.js +9 -10
  143. package/lib/container/ContainerReferencePlugin.js +6 -2
  144. package/lib/container/FallbackDependency.js +1 -1
  145. package/lib/container/FallbackModule.js +24 -17
  146. package/lib/container/FallbackModuleFactory.js +7 -3
  147. package/lib/container/HoistContainerReferencesPlugin.js +53 -66
  148. package/lib/container/ModuleFederationPlugin.js +7 -18
  149. package/lib/container/RemoteModule.js +27 -19
  150. package/lib/container/RemoteRuntimeModule.js +10 -8
  151. package/lib/container/moduleFederationHooks.js +32 -0
  152. package/lib/css/CssGenerator.js +178 -44
  153. package/lib/css/CssInjectStyleRuntimeModule.js +7 -5
  154. package/lib/css/CssLoadingRuntimeModule.js +82 -36
  155. package/lib/css/CssModule.js +10 -7
  156. package/lib/css/CssModulesPlugin.js +197 -106
  157. package/lib/css/CssParser.js +1248 -618
  158. package/lib/css/CssServerStylesRuntimeModule.js +54 -0
  159. package/lib/css/cssMinify.js +168 -0
  160. package/lib/css/data.js +5324 -0
  161. package/lib/css/syntax.js +10396 -952
  162. package/lib/debug/ProfilingPlugin.js +14 -9
  163. package/lib/deno/DenoTargetPlugin.js +1 -1
  164. package/lib/dependencies/AMDDefineDependency.js +112 -87
  165. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +30 -17
  166. package/lib/dependencies/AMDPlugin.js +9 -7
  167. package/lib/dependencies/AMDRequireArrayDependency.js +5 -5
  168. package/lib/dependencies/AMDRequireContextDependency.js +2 -2
  169. package/lib/dependencies/AMDRequireDependenciesBlock.js +1 -1
  170. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +25 -14
  171. package/lib/dependencies/AMDRequireDependency.js +8 -7
  172. package/lib/dependencies/AMDRequireItemDependency.js +1 -1
  173. package/lib/dependencies/AMDRuntimeModules.js +21 -1
  174. package/lib/dependencies/BuildTimeConstDependency.js +102 -0
  175. package/lib/dependencies/CachedConstDependency.js +11 -8
  176. package/lib/dependencies/CommonJsDependencyHelpers.js +67 -46
  177. package/lib/dependencies/CommonJsExportRequireDependency.js +140 -45
  178. package/lib/dependencies/CommonJsExportsDependency.js +53 -49
  179. package/lib/dependencies/CommonJsExportsParserPlugin.js +207 -25
  180. package/lib/dependencies/CommonJsFullRequireDependency.js +140 -26
  181. package/lib/dependencies/CommonJsImportsParserPlugin.js +100 -48
  182. package/lib/dependencies/CommonJsObjectExportDependency.js +188 -0
  183. package/lib/dependencies/CommonJsPlugin.js +35 -6
  184. package/lib/dependencies/CommonJsRequireContextDependency.js +5 -6
  185. package/lib/dependencies/CommonJsRequireDependency.js +156 -27
  186. package/lib/dependencies/CommonJsSelfReferenceDependency.js +63 -38
  187. package/lib/dependencies/ConstDependency.js +8 -9
  188. package/lib/dependencies/ContextDependency.js +12 -8
  189. package/lib/dependencies/ContextDependencyHelpers.js +14 -9
  190. package/lib/dependencies/ContextDependencyTemplateAsId.js +4 -4
  191. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +4 -4
  192. package/lib/dependencies/ContextElementDependency.js +31 -12
  193. package/lib/dependencies/CreateRequireParserPlugin.js +12 -7
  194. package/lib/dependencies/CreateScriptUrlDependency.js +4 -4
  195. package/lib/dependencies/CssIcssExportDependency.js +56 -28
  196. package/lib/dependencies/CssIcssImportDependency.js +17 -13
  197. package/lib/dependencies/CssIcssSymbolDependency.js +9 -10
  198. package/lib/dependencies/CssImportDependency.js +18 -9
  199. package/lib/dependencies/CssUrlDependency.js +17 -13
  200. package/lib/dependencies/DllEntryDependency.js +1 -1
  201. package/lib/dependencies/DynamicExports.js +2 -2
  202. package/lib/dependencies/ExportBindingInitFragment.js +36 -9
  203. package/lib/dependencies/ExportsInfoDependency.js +7 -8
  204. package/lib/dependencies/ExternalModuleDependency.js +9 -5
  205. package/lib/dependencies/ExternalModuleInitFragment.js +2 -2
  206. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +8 -5
  207. package/lib/dependencies/HarmonyAcceptDependency.js +5 -5
  208. package/lib/dependencies/HarmonyCompatibilityDependency.js +52 -17
  209. package/lib/dependencies/HarmonyDetectionParserPlugin.js +11 -7
  210. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +15 -11
  211. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +78 -12
  212. package/lib/dependencies/HarmonyExportExpressionDependency.js +23 -18
  213. package/lib/dependencies/HarmonyExportHeaderDependency.js +7 -7
  214. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +159 -71
  215. package/lib/dependencies/HarmonyExportInitFragment.js +18 -6
  216. package/lib/dependencies/HarmonyExportSpecifierDependency.js +51 -14
  217. package/lib/dependencies/HarmonyExports.js +7 -4
  218. package/lib/dependencies/HarmonyImportDependency.js +28 -20
  219. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +31 -24
  220. package/lib/dependencies/HarmonyImportGuard.js +21 -30
  221. package/lib/dependencies/HarmonyImportSideEffectDependency.js +38 -9
  222. package/lib/dependencies/HarmonyImportSpecifierDependency.js +106 -55
  223. package/lib/dependencies/HarmonyModulesPlugin.js +7 -3
  224. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -3
  225. package/lib/dependencies/HtmlEntryDependency.js +37 -29
  226. package/lib/dependencies/HtmlInlineHtmlDependency.js +7 -8
  227. package/lib/dependencies/HtmlInlineScriptDependency.js +11 -8
  228. package/lib/dependencies/HtmlInlineStyleDependency.js +7 -10
  229. package/lib/dependencies/HtmlSourceDependency.js +22 -14
  230. package/lib/dependencies/ImportContextDependency.js +2 -2
  231. package/lib/dependencies/ImportDependency.js +24 -20
  232. package/lib/dependencies/ImportEagerDependency.js +6 -9
  233. package/lib/dependencies/ImportMetaContextDependency.js +2 -2
  234. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +14 -13
  235. package/lib/dependencies/ImportMetaContextPlugin.js +7 -3
  236. package/lib/dependencies/ImportMetaGlobDependency.js +2 -2
  237. package/lib/dependencies/ImportMetaGlobDependencyParserPlugin.js +2 -3
  238. package/lib/dependencies/ImportMetaGlobHelpers.js +19 -22
  239. package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -1
  240. package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -1
  241. package/lib/dependencies/ImportMetaPlugin.js +154 -71
  242. package/lib/dependencies/ImportMetaResolveDependency.js +3 -4
  243. package/lib/dependencies/ImportParserPlugin.js +49 -35
  244. package/lib/dependencies/ImportPhase.js +12 -5
  245. package/lib/dependencies/ImportPlugin.js +7 -3
  246. package/lib/dependencies/ImportWeakDependency.js +6 -9
  247. package/lib/dependencies/JsonExportsDependency.js +11 -7
  248. package/lib/dependencies/LoaderDependency.js +2 -2
  249. package/lib/dependencies/LoaderImportDependency.js +2 -2
  250. package/lib/dependencies/LoaderPlugin.js +11 -7
  251. package/lib/dependencies/LocalModuleDependency.js +5 -5
  252. package/lib/dependencies/LocalModulesHelpers.js +1 -1
  253. package/lib/dependencies/ModuleDecoratorDependency.js +6 -7
  254. package/lib/dependencies/ModuleDependency.js +9 -6
  255. package/lib/dependencies/ModuleDependencyTemplateAsId.js +4 -4
  256. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +3 -3
  257. package/lib/dependencies/ModuleHotAcceptDependency.js +1 -1
  258. package/lib/dependencies/ModuleHotDeclineDependency.js +1 -1
  259. package/lib/dependencies/ModuleInitFragmentDependency.js +24 -10
  260. package/lib/dependencies/NullDependency.js +3 -3
  261. package/lib/dependencies/ProvidedDependency.js +14 -10
  262. package/lib/dependencies/PureExpressionDependency.js +9 -10
  263. package/lib/dependencies/RequireContextDependency.js +2 -2
  264. package/lib/dependencies/RequireContextDependencyParserPlugin.js +2 -4
  265. package/lib/dependencies/RequireContextPlugin.js +8 -4
  266. package/lib/dependencies/RequireEnsureDependenciesBlock.js +2 -2
  267. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +5 -8
  268. package/lib/dependencies/RequireEnsureDependency.js +8 -7
  269. package/lib/dependencies/RequireEnsurePlugin.js +7 -3
  270. package/lib/dependencies/RequireHeaderDependency.js +51 -12
  271. package/lib/dependencies/RequireIncludeDependency.js +6 -6
  272. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +2 -3
  273. package/lib/dependencies/RequireIncludePlugin.js +7 -3
  274. package/lib/dependencies/RequireJsStuffPlugin.js +7 -3
  275. package/lib/dependencies/RequireResolveContextDependency.js +2 -2
  276. package/lib/dependencies/RequireResolveDependency.js +4 -4
  277. package/lib/dependencies/RequireResolveHeaderDependency.js +4 -4
  278. package/lib/dependencies/RuntimeRequirementsDependency.js +5 -6
  279. package/lib/dependencies/StaticExportsDependency.js +2 -2
  280. package/lib/dependencies/SystemPlugin.js +10 -6
  281. package/lib/dependencies/SystemRuntimeModule.js +10 -0
  282. package/lib/dependencies/TopLevelAwaitDependency.js +11 -7
  283. package/lib/dependencies/URLContextDependency.js +2 -2
  284. package/lib/dependencies/URLDependency.js +110 -64
  285. package/lib/dependencies/URLPlugin.js +7 -3
  286. package/lib/dependencies/UnsupportedDependency.js +4 -4
  287. package/lib/dependencies/WebAssemblyExportImportedDependency.js +3 -4
  288. package/lib/dependencies/WebAssemblyImportDependency.js +5 -5
  289. package/lib/dependencies/WebpackIsIncludedDependency.js +6 -6
  290. package/lib/dependencies/WorkerAndWorkletPlugin.js +46 -28
  291. package/lib/dependencies/WorkerDependency.js +28 -22
  292. package/lib/dependencies/WorkletDependency.js +15 -14
  293. package/lib/dependencies/getFunctionExpression.js +8 -4
  294. package/lib/dependencies/processExportInfo.js +5 -5
  295. package/lib/dll/DelegatedModule.js +34 -22
  296. package/lib/dll/DelegatedModuleFactoryPlugin.js +15 -7
  297. package/lib/dll/DelegatedPlugin.js +2 -2
  298. package/lib/dll/DllEntryPlugin.js +2 -2
  299. package/lib/dll/DllModule.js +22 -15
  300. package/lib/dll/DllModuleFactory.js +7 -3
  301. package/lib/dll/DllPlugin.js +7 -5
  302. package/lib/dll/DllReferencePlugin.js +10 -7
  303. package/lib/dll/LibManifestPlugin.js +5 -5
  304. package/lib/electron/ElectronTargetPlugin.js +53 -49
  305. package/lib/errors/AsyncChunkWaterfallWarning.js +36 -0
  306. package/lib/errors/AsyncDependencyToInitialChunkError.js +2 -2
  307. package/lib/errors/BroadContextsWarning.js +43 -0
  308. package/lib/errors/BuildCycleError.js +1 -1
  309. package/lib/errors/CacheEffectivenessWarning.js +55 -0
  310. package/lib/errors/ChunkRenderError.js +1 -1
  311. package/lib/errors/CircularDependenciesWarning.js +38 -0
  312. package/lib/errors/CodeGenerationError.js +1 -1
  313. package/lib/errors/CommentCompilationWarning.js +1 -1
  314. package/lib/errors/ConflictingResourceHintsWarning.js +35 -0
  315. package/lib/errors/DuplicateModulesWarning.js +45 -0
  316. package/lib/errors/DynamicExportsWarning.js +30 -0
  317. package/lib/errors/EmbeddedSourceMapsWarning.js +25 -0
  318. package/lib/errors/EntrypointOverlapWarning.js +45 -0
  319. package/lib/errors/EnvironmentNotSupportAsyncWarning.js +2 -2
  320. package/lib/errors/EvalUsageWarning.js +28 -0
  321. package/lib/errors/HookWebpackError.js +5 -5
  322. package/lib/errors/HotspotsWarning.js +57 -0
  323. package/lib/errors/IgnoreErrorModuleFactory.js +7 -3
  324. package/lib/errors/InlinedAssetsWarning.js +36 -0
  325. package/lib/errors/InvalidDependenciesModuleWarning.js +1 -1
  326. package/lib/errors/LargeModulesWarning.js +45 -0
  327. package/lib/errors/LegacyJavascriptWarning.js +48 -0
  328. package/lib/errors/MissingSideEffectsWarning.js +36 -0
  329. package/lib/errors/MixedExportsWarning.js +41 -0
  330. package/lib/errors/ModuleDependencyError.js +13 -16
  331. package/lib/errors/ModuleDependencyWarning.js +5 -15
  332. package/lib/errors/ModuleHashingError.js +1 -1
  333. package/lib/errors/ModuleNotFoundError.js +2 -2
  334. package/lib/errors/ModuleParseError.js +1 -2
  335. package/lib/errors/ModuleRestoreError.js +1 -1
  336. package/lib/errors/ModuleStoreError.js +1 -1
  337. package/lib/errors/NodeStuffInWebError.js +1 -1
  338. package/lib/errors/OsDependentRuleWarning.js +31 -0
  339. package/lib/errors/PureAnnotationsWarning.js +36 -0
  340. package/lib/errors/RedundantDynamicImportWarning.js +31 -0
  341. package/lib/errors/ScopeHoistingBailoutsWarning.js +41 -0
  342. package/lib/errors/SplitChunksCappedWarning.js +41 -0
  343. package/lib/errors/TinyChunksWarning.js +40 -0
  344. package/lib/errors/TopLevelThisWarning.js +34 -0
  345. package/lib/errors/UnsplitVendorsWarning.js +42 -0
  346. package/lib/errors/UnsupportedFeatureWarning.js +1 -1
  347. package/lib/errors/UnusedAliasesWarning.js +29 -0
  348. package/lib/errors/UnusedDefinesWarning.js +29 -0
  349. package/lib/errors/UnusedExternalsWarning.js +29 -0
  350. package/lib/errors/UnusedReexportsWarning.js +42 -0
  351. package/lib/errors/UnusedRuleWarning.js +29 -0
  352. package/lib/errors/WebpackError.js +9 -5
  353. package/lib/errors/deriveStackFromNestedError.js +90 -0
  354. package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -0
  355. package/lib/esm/ModuleChunkFormatPlugin.js +37 -19
  356. package/lib/esm/ModuleChunkLoadingPlugin.js +89 -51
  357. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +170 -71
  358. package/lib/hmr/HotModuleReplacement.runtime.js +24 -5
  359. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  360. package/lib/hmr/LazyCompilationPlugin.js +45 -24
  361. package/lib/hmr/lazyCompilationBackend.js +28 -10
  362. package/lib/hmr/parserHooks.js +56 -0
  363. package/lib/html/HtmlGenerator.js +299 -79
  364. package/lib/html/HtmlModule.js +7 -3
  365. package/lib/html/HtmlModulesPlugin.js +312 -174
  366. package/lib/html/HtmlParser.js +31 -86
  367. package/lib/html/data.js +1928 -0
  368. package/lib/html/htmlMinify.js +288 -0
  369. package/lib/html/syntax.js +7819 -3331
  370. package/lib/ids/ChunkModuleIdRangePlugin.js +3 -3
  371. package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
  372. package/lib/ids/DeterministicModuleIdsPlugin.js +2 -2
  373. package/lib/ids/HashedModuleIdsPlugin.js +6 -2
  374. package/lib/ids/IdHelpers.js +31 -18
  375. package/lib/ids/NamedChunkIdsPlugin.js +1 -1
  376. package/lib/ids/NamedModuleIdsPlugin.js +1 -1
  377. package/lib/ids/NaturalChunkIdsPlugin.js +2 -2
  378. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  379. package/lib/ids/OccurrenceChunkIdsPlugin.js +7 -3
  380. package/lib/ids/OccurrenceModuleIdsPlugin.js +7 -3
  381. package/lib/ids/SyncModuleIdsPlugin.js +4 -4
  382. package/lib/index.js +10 -0
  383. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +3 -3
  384. package/lib/javascript/BasicEvaluatedExpression.js +18 -14
  385. package/lib/javascript/ChunkFormatHelpers.js +6 -6
  386. package/lib/javascript/ChunkHelpers.js +1 -1
  387. package/lib/javascript/CommonJsChunkFormatPlugin.js +11 -5
  388. package/lib/javascript/EnableChunkLoadingPlugin.js +2 -2
  389. package/lib/javascript/JavascriptGenerator.js +65 -165
  390. package/lib/javascript/JavascriptModule.js +9 -3
  391. package/lib/javascript/JavascriptModulesPlugin.js +181 -162
  392. package/lib/javascript/JavascriptParser.js +291 -112
  393. package/lib/javascript/JavascriptParserHelpers.js +10 -7
  394. package/lib/javascript/ScopeAnalyzer.js +1094 -0
  395. package/lib/javascript/StartupHelpers.js +55 -9
  396. package/lib/javascript/syntax.js +3403 -300
  397. package/lib/json/JsonData.js +8 -4
  398. package/lib/json/JsonGenerator.js +38 -16
  399. package/lib/json/JsonModule.js +7 -3
  400. package/lib/json/JsonModulesPlugin.js +1 -1
  401. package/lib/json/JsonParser.js +5 -6
  402. package/lib/library/AbstractLibraryPlugin.js +20 -14
  403. package/lib/library/AmdLibraryPlugin.js +11 -7
  404. package/lib/library/AssignLibraryPlugin.js +19 -13
  405. package/lib/library/EnableLibraryPlugin.js +2 -2
  406. package/lib/library/ExportPropertyLibraryPlugin.js +15 -8
  407. package/lib/library/JsonpLibraryPlugin.js +11 -7
  408. package/lib/library/ModuleLibraryPlugin.js +256 -64
  409. package/lib/library/SystemLibraryPlugin.js +12 -8
  410. package/lib/library/UmdLibraryPlugin.js +62 -25
  411. package/lib/loaders/LoaderRunner.js +14 -1
  412. package/lib/loaders/loadLoader.js +8 -4
  413. package/lib/logging/createConsoleLogger.js +7 -4
  414. package/lib/node/CommonJsChunkLoadingPlugin.js +36 -22
  415. package/lib/node/NodeEnvironmentPlugin.js +17 -3
  416. package/lib/node/NodeSourcePlugin.js +1 -1
  417. package/lib/node/NodeTargetPlugin.js +4 -3
  418. package/lib/node/NodeTemplatePlugin.js +1 -1
  419. package/lib/node/NodeWatchFileSystem.js +70 -9
  420. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +35 -38
  421. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +81 -20
  422. package/lib/node/ReadFileCompileWasmPlugin.js +37 -17
  423. package/lib/node/RequireChunkLoadingRuntimeModule.js +35 -38
  424. package/lib/node/nodeConsole.js +7 -3
  425. package/lib/optimize/AggressiveMergingPlugin.js +21 -17
  426. package/lib/optimize/AggressiveSplittingPlugin.js +9 -6
  427. package/lib/optimize/ConcatenatedModule.js +996 -477
  428. package/lib/optimize/ConstExportsPlugin.js +11 -7
  429. package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -3
  430. package/lib/optimize/FlagIncludedChunksPlugin.js +3 -4
  431. package/lib/optimize/InlineExports.js +9 -5
  432. package/lib/optimize/InnerGraph.js +28 -12
  433. package/lib/optimize/InnerGraphPlugin.js +23 -18
  434. package/lib/optimize/LimitChunkCountPlugin.js +7 -3
  435. package/lib/optimize/MangleExportsPlugin.js +7 -8
  436. package/lib/optimize/MergeDuplicateChunksPlugin.js +7 -3
  437. package/lib/optimize/MinChunkSizePlugin.js +7 -3
  438. package/lib/optimize/ModuleConcatenationPlugin.js +124 -59
  439. package/lib/optimize/RealContentHashPlugin.js +20 -13
  440. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -2
  441. package/lib/optimize/RemoveParentModulesPlugin.js +4 -4
  442. package/lib/optimize/RuntimeChunkPlugin.js +2 -2
  443. package/lib/optimize/SideEffectsFlagPlugin.js +262 -39
  444. package/lib/optimize/SplitChunksPlugin.js +232 -68
  445. package/lib/performance/AssetsOverSizeLimitWarning.js +10 -2
  446. package/lib/performance/AsyncChunkWaterfallsPlugin.js +136 -0
  447. package/lib/performance/BroadContextsPlugin.js +142 -0
  448. package/lib/performance/CacheEffectivenessPlugin.js +125 -0
  449. package/lib/performance/ConflictingResourceHintsPlugin.js +99 -0
  450. package/lib/performance/DuplicateModulesPlugin.js +93 -0
  451. package/lib/performance/DuplicatePackagesPlugin.js +119 -0
  452. package/lib/performance/DuplicatePackagesWarning.js +84 -0
  453. package/lib/performance/DynamicExportsPlugin.js +120 -0
  454. package/lib/performance/EmbeddedSourceMapsPlugin.js +71 -0
  455. package/lib/performance/EntrypointOverlapPlugin.js +122 -0
  456. package/lib/performance/EntrypointsOverSizeLimitWarning.js +1 -1
  457. package/lib/performance/EvalUsagePlugin.js +115 -0
  458. package/lib/performance/HotspotsPlugin.js +296 -0
  459. package/lib/performance/InlinedAssetsPlugin.js +99 -0
  460. package/lib/performance/LargeModulesPlugin.js +126 -0
  461. package/lib/performance/LegacyJavascriptPlugin.js +139 -0
  462. package/lib/performance/MissingSideEffectsPlugin.js +138 -0
  463. package/lib/performance/MixedExportsPlugin.js +136 -0
  464. package/lib/performance/OsDependentRuleWarningPlugin.js +178 -0
  465. package/lib/performance/PureAnnotationsPlugin.js +219 -0
  466. package/lib/performance/RedundantDynamicImportsPlugin.js +225 -0
  467. package/lib/performance/RuntimeInLargeChunkWarning.js +27 -0
  468. package/lib/performance/ScopeHoistingBailoutsPlugin.js +164 -0
  469. package/lib/performance/SizeLimitsPlugin.js +139 -7
  470. package/lib/performance/SplitChunksCappedPlugin.js +99 -0
  471. package/lib/performance/TinyChunksPlugin.js +128 -0
  472. package/lib/performance/TopLevelThisPlugin.js +208 -0
  473. package/lib/performance/UnsplitVendorsPlugin.js +112 -0
  474. package/lib/performance/UnusedAliasesPlugin.js +253 -0
  475. package/lib/performance/UnusedDefinesPlugin.js +87 -0
  476. package/lib/performance/UnusedExternalsPlugin.js +110 -0
  477. package/lib/performance/UnusedReexportsPlugin.js +159 -0
  478. package/lib/performance/UnusedRuleWarningPlugin.js +105 -0
  479. package/lib/performance/getModuleSize.js +22 -0
  480. package/lib/performance/getSourceModules.js +22 -0
  481. package/lib/performance/hasOnlyUnusedExports.js +40 -0
  482. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +24 -10
  483. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +63 -46
  484. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -3
  485. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +2 -2
  486. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +2 -2
  487. package/lib/prefetch/ResourceHintPlugin.js +377 -136
  488. package/lib/prefetch/ResourceHintRuntimeModule.js +1 -21
  489. package/lib/prefetch/StartupAssetHintRuntimeModule.js +10 -133
  490. package/lib/prefetch/parseResourceHintOptions.js +31 -4
  491. package/lib/rules/BasicEffectRulePlugin.js +2 -2
  492. package/lib/rules/BasicMatcherRulePlugin.js +8 -4
  493. package/lib/rules/GlobMatcherRulePlugin.js +68 -0
  494. package/lib/rules/ObjectMatcherRulePlugin.js +12 -5
  495. package/lib/rules/RuleSetCompiler.js +146 -12
  496. package/lib/rules/UseEffectRulePlugin.js +18 -11
  497. package/lib/runtime/AsyncModuleGeneratorRuntimeModule.js +11 -1
  498. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -1
  499. package/lib/runtime/AutoPublicPathRuntimeModule.js +15 -20
  500. package/lib/runtime/BaseUriRuntimeModule.js +33 -7
  501. package/lib/runtime/ChunkNameRuntimeModule.js +10 -0
  502. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +11 -1
  503. package/lib/runtime/CompatRuntimeModule.js +5 -3
  504. package/lib/runtime/ConcatenationWrapRuntimeModule.js +90 -0
  505. package/lib/runtime/ConstructRequireRuntimeModule.js +52 -0
  506. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +8 -6
  507. package/lib/runtime/CreateScriptRuntimeModule.js +11 -1
  508. package/lib/runtime/CreateScriptUrlRuntimeModule.js +11 -1
  509. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +56 -38
  510. package/lib/runtime/EnsureChunkRuntimeModule.js +18 -2
  511. package/lib/runtime/GetChunkFilenameRuntimeModule.js +62 -37
  512. package/lib/runtime/GetFullHashRuntimeModule.js +12 -2
  513. package/lib/runtime/GetMainFilenameRuntimeModule.js +12 -2
  514. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -2
  515. package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +16 -3
  516. package/lib/runtime/GlobalRuntimeModule.js +18 -0
  517. package/lib/runtime/HasOwnPropertyRuntimeModule.js +12 -2
  518. package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
  519. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +23 -6
  520. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +22 -6
  521. package/lib/runtime/NonceRuntimeModule.js +10 -0
  522. package/lib/runtime/OnChunksLoadedRuntimeModule.js +5 -3
  523. package/lib/runtime/PublicPathRuntimeModule.js +12 -2
  524. package/lib/runtime/RelativeUrlRuntimeModule.js +11 -1
  525. package/lib/runtime/RuntimeIdRuntimeModule.js +12 -2
  526. package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +11 -1
  527. package/lib/runtime/StartupChunkDependenciesPlugin.js +18 -9
  528. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -3
  529. package/lib/runtime/StartupEntrypointRuntimeModule.js +21 -4
  530. package/lib/runtime/SystemContextRuntimeModule.js +10 -0
  531. package/lib/runtime/ToBinaryRuntimeModule.js +1 -1
  532. package/lib/runtime/WorkerRuntimeModule.js +11 -1
  533. package/lib/runtime/baseUri.js +63 -0
  534. package/lib/schemes/DataUriPlugin.js +1 -1
  535. package/lib/schemes/FileUriPlugin.js +1 -1
  536. package/lib/schemes/HttpUriPlugin.js +24 -15
  537. package/lib/schemes/VirtualUrlPlugin.js +13 -7
  538. package/lib/serialization/AggregateErrorSerializer.js +1 -1
  539. package/lib/serialization/BinaryMiddleware.js +274 -942
  540. package/lib/serialization/ErrorObjectSerializer.js +1 -1
  541. package/lib/serialization/FileMiddleware.js +305 -66
  542. package/lib/serialization/ObjectMiddleware.js +139 -114
  543. package/lib/serialization/PlainObjectSerializer.js +19 -16
  544. package/lib/sharing/ConsumeSharedModule.js +30 -21
  545. package/lib/sharing/ConsumeSharedPlugin.js +18 -10
  546. package/lib/sharing/ConsumeSharedRuntimeModule.js +6 -9
  547. package/lib/sharing/ProvideSharedModule.js +25 -16
  548. package/lib/sharing/ProvideSharedModuleFactory.js +7 -3
  549. package/lib/sharing/ProvideSharedPlugin.js +8 -4
  550. package/lib/sharing/SharePlugin.js +17 -5
  551. package/lib/sharing/ShareRuntimeModule.js +4 -4
  552. package/lib/sharing/resolveMatchedConfigs.js +9 -6
  553. package/lib/sharing/utils.js +1 -3
  554. package/lib/stats/DefaultStatsFactoryPlugin.js +253 -226
  555. package/lib/stats/DefaultStatsPresetPlugin.js +17 -8
  556. package/lib/stats/DefaultStatsPrinterPlugin.js +60 -192
  557. package/lib/stats/StatsFactory.js +56 -35
  558. package/lib/stats/StatsPrinter.js +16 -12
  559. package/lib/typescript/TypeScriptPlugin.js +12 -14
  560. package/lib/url/URLParserPlugin.js +26 -13
  561. package/lib/util/AsyncQueue.js +4 -3
  562. package/lib/util/Hash.js +5 -1
  563. package/lib/util/LazySet.js +35 -22
  564. package/lib/util/LocConverter.js +36 -13
  565. package/lib/util/SourceProcessor.js +1050 -24
  566. package/lib/util/StringXor.js +1 -1
  567. package/lib/util/chainedImports.js +9 -5
  568. package/lib/util/cleverMerge.js +1 -1
  569. package/lib/util/comparators.js +45 -14
  570. package/lib/util/concatenate.js +203 -77
  571. package/lib/util/conventions.js +5 -1
  572. package/lib/util/createHash.js +2 -2
  573. package/lib/util/createHooksRegistry.js +8 -10
  574. package/lib/util/dataURL.js +225 -1
  575. package/lib/util/extractSourceMap.js +4 -3
  576. package/lib/util/findCaseMismatch.js +139 -0
  577. package/lib/util/formatLocation.js +1 -2
  578. package/lib/util/fs.js +22 -5
  579. package/lib/util/globUtils.js +298 -24
  580. package/lib/util/hash/BatchedHash.js +5 -1
  581. package/lib/util/hash/BulkUpdateHash.js +5 -1
  582. package/lib/util/hash/DebugHash.js +5 -1
  583. package/lib/util/hash/hash-digest.js +6 -2
  584. package/lib/util/identifier.js +25 -1
  585. package/lib/util/implicitTypeLoaderFallback.js +1 -1
  586. package/lib/util/internalSerializables.js +6 -0
  587. package/lib/util/lazyModule.js +56 -0
  588. package/lib/util/makeSerializable.js +7 -3
  589. package/lib/util/matchAlias.js +25 -0
  590. package/lib/util/mimeTypes.js +11 -5
  591. package/lib/util/nonNumericOnlyHash.js +4 -3
  592. package/lib/util/parseJson.js +5 -3
  593. package/lib/util/preloadModuleType.js +32 -0
  594. package/lib/util/registerExternalSerializer.js +7 -5
  595. package/lib/util/runtime.js +2 -2
  596. package/lib/util/semver.js +1 -1
  597. package/lib/util/serialization.js +28 -28
  598. package/lib/util/source.js +2 -2
  599. package/lib/util/traverseDestructuringAssignmentProperties.js +6 -2
  600. package/lib/wasm/EnableWasmLoadingPlugin.js +10 -8
  601. package/lib/wasm/wasmModuleFilename.js +54 -0
  602. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +41 -21
  603. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +43 -21
  604. package/lib/wasm-async/AsyncWasmModule.js +3 -3
  605. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +4 -5
  606. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +57 -17
  607. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +34 -18
  608. package/lib/wasm-async/AsyncWebAssemblyParser.js +9 -8
  609. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +34 -8
  610. package/lib/wasm-sync/SyncWasmModule.js +2 -2
  611. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +18 -13
  612. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +4 -5
  613. package/lib/wasm-sync/WebAssemblyGenerator.js +18 -17
  614. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +4 -4
  615. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -7
  616. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +24 -11
  617. package/lib/wasm-sync/WebAssemblyParser.js +4 -6
  618. package/lib/wasm-sync/WebAssemblyUtils.js +2 -2
  619. package/lib/web/FetchCompileAsyncWasmPlugin.js +101 -19
  620. package/lib/web/FetchCompileWasmPlugin.js +46 -16
  621. package/lib/web/JsonpChunkLoadingPlugin.js +47 -23
  622. package/lib/web/JsonpChunkLoadingRuntimeModule.js +50 -20
  623. package/lib/web/JsonpTemplatePlugin.js +2 -2
  624. package/lib/webpack.js +22 -11
  625. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +60 -26
  626. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -32
  627. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -1
  628. package/module.d.ts +1 -0
  629. package/package.json +37 -30
  630. package/schemas/WebpackOptions.check.js +1 -1
  631. package/schemas/WebpackOptions.json +780 -91
  632. package/schemas/plugins/HtmlParserOptions.check.js +1 -1
  633. package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
  634. package/schemas/plugins/container/ContainerPlugin.json +10 -0
  635. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  636. package/schemas/plugins/container/ModuleFederationPlugin.json +10 -0
  637. package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +1 -1
  638. package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
  639. package/schemas/plugins/css/CssParserOptions.check.js +1 -1
  640. package/types.d.ts +4013 -738
  641. package/lib/runtime/CommonJsWrapRuntimeModule.js +0 -37
@@ -372,7 +372,8 @@
372
372
  "description": "Also concatenate CommonJS modules with statically analyzable exports. Defaults to 'true'.",
373
373
  "type": "boolean"
374
374
  }
375
- }
375
+ },
376
+ "added": "5.109.0"
376
377
  },
377
378
  "Context": {
378
379
  "description": "The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.",
@@ -609,11 +610,13 @@
609
610
  },
610
611
  "CssParserCustomMedia": {
611
612
  "description": "Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).",
612
- "type": "boolean"
613
+ "type": "boolean",
614
+ "added": "5.109.0"
613
615
  },
614
616
  "CssParserCustomSelectors": {
615
617
  "description": "Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).",
616
- "type": "boolean"
618
+ "type": "boolean",
619
+ "added": "5.109.0"
617
620
  },
618
621
  "CssParserDashedIdents": {
619
622
  "description": "Enable/disable renaming of dashed identifiers, e. g. custom properties.",
@@ -625,7 +628,8 @@
625
628
  },
626
629
  "CssParserFontPreload": {
627
630
  "description": "Auto-emit `<link rel=\"preload\" as=\"font\">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.",
628
- "type": "boolean"
631
+ "type": "boolean",
632
+ "added": "5.109.0"
629
633
  },
630
634
  "CssParserFunction": {
631
635
  "description": "Enable/disable renaming of `@function` names.",
@@ -905,8 +909,15 @@
905
909
  "$ref": "#/definitions/EntryFilename"
906
910
  },
907
911
  "html": {
908
- "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.",
909
- "type": "boolean"
912
+ "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. An object overrides `output.html` option by option for this entry; `inline` is resolved once per generated page and can only be set on `output.html`.",
913
+ "anyOf": [
914
+ {
915
+ "type": "boolean"
916
+ },
917
+ {
918
+ "$ref": "#/definitions/OutputHtmlOptions"
919
+ }
920
+ ]
910
921
  },
911
922
  "import": {
912
923
  "$ref": "#/definitions/EntryItem"
@@ -964,8 +975,15 @@
964
975
  "$ref": "#/definitions/Filename"
965
976
  },
966
977
  "html": {
967
- "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.",
968
- "type": "boolean"
978
+ "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. An object overrides `output.html` option by option for this entry; `inline` is resolved once per generated page and can only be set on `output.html`.",
979
+ "anyOf": [
980
+ {
981
+ "type": "boolean"
982
+ },
983
+ {
984
+ "$ref": "#/definitions/OutputHtmlOptions"
985
+ }
986
+ ]
969
987
  },
970
988
  "import": {
971
989
  "description": "Module(s) that are loaded upon startup. The last one is exported.",
@@ -1128,6 +1146,12 @@
1128
1146
  "description": "The environment supports const and let for variable declarations.",
1129
1147
  "type": "boolean"
1130
1148
  },
1149
+ "deferImport": {
1150
+ "description": "The environment supports deferred module evaluation ('import defer * as ns from \"...\"', 'import.defer(\"...\")').",
1151
+ "type": "boolean",
1152
+ "experimental": true,
1153
+ "added": "5.110.0"
1154
+ },
1131
1155
  "destructuring": {
1132
1156
  "description": "The environment supports destructuring ('{ a, b } = obj').",
1133
1157
  "type": "boolean"
@@ -1150,7 +1174,8 @@
1150
1174
  },
1151
1175
  "generator": {
1152
1176
  "description": "The environment supports generator functions and yield ('function* () { yield ... }').",
1153
- "type": "boolean"
1177
+ "type": "boolean",
1178
+ "added": "5.109.0"
1154
1179
  },
1155
1180
  "globalThis": {
1156
1181
  "description": "The environment supports 'globalThis'.",
@@ -1182,7 +1207,8 @@
1182
1207
  },
1183
1208
  "modulePreload": {
1184
1209
  "description": "The environment supports `<link rel=\"modulepreload\">` to preload EcmaScript modules.",
1185
- "type": "boolean"
1210
+ "type": "boolean",
1211
+ "added": "5.109.0"
1186
1212
  },
1187
1213
  "nodeBuiltinModuleGetter": {
1188
1214
  "description": "The environment supports `process.getBuiltinModule()` to synchronously load Node.js core modules.",
@@ -1196,6 +1222,12 @@
1196
1222
  "description": "The environment supports optional chaining ('obj?.a' or 'obj?.()').",
1197
1223
  "type": "boolean"
1198
1224
  },
1225
+ "sourceImport": {
1226
+ "description": "The environment supports source phase imports ('import source m from \"...\"', 'import.source(\"...\")').",
1227
+ "type": "boolean",
1228
+ "experimental": true,
1229
+ "added": "5.110.0"
1230
+ },
1199
1231
  "spread": {
1200
1232
  "description": "The environment supports spread and rest in array/object literals and calls ('{ ...obj }', 'fn(...args)').",
1201
1233
  "type": "boolean"
@@ -1227,12 +1259,14 @@
1227
1259
  "type": "boolean"
1228
1260
  }
1229
1261
  ],
1230
- "experimental": true
1262
+ "experimental": true,
1263
+ "added": "5.0.0"
1231
1264
  },
1232
1265
  "backCompat": {
1233
1266
  "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
1234
1267
  "type": "boolean",
1235
- "experimental": true
1268
+ "experimental": true,
1269
+ "added": "5.62.0"
1236
1270
  },
1237
1271
  "buildHttp": {
1238
1272
  "description": "Build http(s): urls using a lockfile and resource content cache.",
@@ -1244,12 +1278,14 @@
1244
1278
  "$ref": "#/definitions/HttpUriOptions"
1245
1279
  }
1246
1280
  ],
1247
- "experimental": true
1281
+ "experimental": true,
1282
+ "added": "5.49.0"
1248
1283
  },
1249
1284
  "cacheUnaffected": {
1250
1285
  "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
1251
1286
  "type": "boolean",
1252
- "experimental": true
1287
+ "experimental": true,
1288
+ "added": "5.54.0"
1253
1289
  },
1254
1290
  "css": {
1255
1291
  "description": "Enable css support. `\"auto\"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.",
@@ -1263,17 +1299,20 @@
1263
1299
  "type": "boolean"
1264
1300
  }
1265
1301
  ],
1266
- "experimental": true
1302
+ "experimental": true,
1303
+ "added": "5.66.0"
1267
1304
  },
1268
1305
  "deferImport": {
1269
1306
  "description": "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.",
1270
1307
  "type": "boolean",
1271
- "experimental": true
1308
+ "experimental": true,
1309
+ "added": "5.100.0"
1272
1310
  },
1273
1311
  "futureDefaults": {
1274
1312
  "description": "Apply defaults of next major version.",
1275
1313
  "type": "boolean",
1276
- "experimental": true
1314
+ "experimental": true,
1315
+ "added": "5.53.0"
1277
1316
  },
1278
1317
  "html": {
1279
1318
  "description": "Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `\"auto\"` (the default) enables it unless a loader is registered for HTML files.",
@@ -1287,7 +1326,8 @@
1287
1326
  "type": "boolean"
1288
1327
  }
1289
1328
  ],
1290
- "experimental": true
1329
+ "experimental": true,
1330
+ "added": "5.107.0"
1291
1331
  },
1292
1332
  "lazyCompilation": {
1293
1333
  "description": "Compile entrypoints and import()s only when they are accessed.",
@@ -1299,22 +1339,26 @@
1299
1339
  "$ref": "#/definitions/LazyCompilationOptions"
1300
1340
  }
1301
1341
  ],
1302
- "experimental": true
1342
+ "experimental": true,
1343
+ "added": "5.17.0"
1303
1344
  },
1304
1345
  "outputModule": {
1305
1346
  "description": "Allow output javascript files as module source type.",
1306
1347
  "type": "boolean",
1307
- "experimental": true
1348
+ "experimental": true,
1349
+ "added": "5.0.0"
1308
1350
  },
1309
1351
  "sourceImport": {
1310
1352
  "description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.",
1311
1353
  "type": "boolean",
1312
- "experimental": true
1354
+ "experimental": true,
1355
+ "added": "5.106.0"
1313
1356
  },
1314
1357
  "syncWebAssembly": {
1315
1358
  "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
1316
1359
  "type": "boolean",
1317
- "experimental": true
1360
+ "experimental": true,
1361
+ "added": "5.0.0"
1318
1362
  },
1319
1363
  "typescript": {
1320
1364
  "description": "Enable typescript support. `\"auto\"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.",
@@ -1328,7 +1372,8 @@
1328
1372
  "type": "boolean"
1329
1373
  }
1330
1374
  ],
1331
- "experimental": true
1375
+ "experimental": true,
1376
+ "added": "5.107.0"
1332
1377
  }
1333
1378
  }
1334
1379
  },
@@ -1349,12 +1394,14 @@
1349
1394
  "type": "boolean"
1350
1395
  }
1351
1396
  ],
1352
- "experimental": true
1397
+ "experimental": true,
1398
+ "added": "5.0.0"
1353
1399
  },
1354
1400
  "backCompat": {
1355
1401
  "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
1356
1402
  "type": "boolean",
1357
- "experimental": true
1403
+ "experimental": true,
1404
+ "added": "5.62.0"
1358
1405
  },
1359
1406
  "buildHttp": {
1360
1407
  "description": "Build http(s): urls using a lockfile and resource content cache.",
@@ -1363,12 +1410,14 @@
1363
1410
  "$ref": "#/definitions/HttpUriOptions"
1364
1411
  }
1365
1412
  ],
1366
- "experimental": true
1413
+ "experimental": true,
1414
+ "added": "5.49.0"
1367
1415
  },
1368
1416
  "cacheUnaffected": {
1369
1417
  "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
1370
1418
  "type": "boolean",
1371
- "experimental": true
1419
+ "experimental": true,
1420
+ "added": "5.54.0"
1372
1421
  },
1373
1422
  "css": {
1374
1423
  "description": "Enable css support. `\"auto\"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.",
@@ -1382,17 +1431,20 @@
1382
1431
  "type": "boolean"
1383
1432
  }
1384
1433
  ],
1385
- "experimental": true
1434
+ "experimental": true,
1435
+ "added": "5.66.0"
1386
1436
  },
1387
1437
  "deferImport": {
1388
1438
  "description": "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.",
1389
1439
  "type": "boolean",
1390
- "experimental": true
1440
+ "experimental": true,
1441
+ "added": "5.100.0"
1391
1442
  },
1392
1443
  "futureDefaults": {
1393
1444
  "description": "Apply defaults of next major version.",
1394
1445
  "type": "boolean",
1395
- "experimental": true
1446
+ "experimental": true,
1447
+ "added": "5.53.0"
1396
1448
  },
1397
1449
  "html": {
1398
1450
  "description": "Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `\"auto\"` (the default) enables it unless a loader is registered for HTML files.",
@@ -1406,7 +1458,8 @@
1406
1458
  "type": "boolean"
1407
1459
  }
1408
1460
  ],
1409
- "experimental": true
1461
+ "experimental": true,
1462
+ "added": "5.107.0"
1410
1463
  },
1411
1464
  "lazyCompilation": {
1412
1465
  "description": "Compile entrypoints and import()s only when they are accessed.",
@@ -1418,22 +1471,26 @@
1418
1471
  "$ref": "#/definitions/LazyCompilationOptions"
1419
1472
  }
1420
1473
  ],
1421
- "experimental": true
1474
+ "experimental": true,
1475
+ "added": "5.17.0"
1422
1476
  },
1423
1477
  "outputModule": {
1424
1478
  "description": "Allow output javascript files as module source type.",
1425
1479
  "type": "boolean",
1426
- "experimental": true
1480
+ "experimental": true,
1481
+ "added": "5.0.0"
1427
1482
  },
1428
1483
  "sourceImport": {
1429
1484
  "description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.",
1430
1485
  "type": "boolean",
1431
- "experimental": true
1486
+ "experimental": true,
1487
+ "added": "5.106.0"
1432
1488
  },
1433
1489
  "syncWebAssembly": {
1434
1490
  "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
1435
1491
  "type": "boolean",
1436
- "experimental": true
1492
+ "experimental": true,
1493
+ "added": "5.0.0"
1437
1494
  },
1438
1495
  "typescript": {
1439
1496
  "description": "Enable typescript support. `\"auto\"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.",
@@ -1447,7 +1504,8 @@
1447
1504
  "type": "boolean"
1448
1505
  }
1449
1506
  ],
1450
- "experimental": true
1507
+ "experimental": true,
1508
+ "added": "5.107.0"
1451
1509
  }
1452
1510
  }
1453
1511
  },
@@ -1533,10 +1591,53 @@
1533
1591
  },
1534
1592
  "ExternalItemInterop": {
1535
1593
  "description": "How an external's exports interoperate with ES module imports, independent of the importing module's strictness (similar to Rollup's `output.interop`). 'default': treat as CommonJS, the default import is the whole exports (Node.js semantics). 'esModule': treat as an ES module namespace, the default import is unboxed to `.default`.",
1536
- "enum": ["default", "esModule"]
1594
+ "enum": ["default", "esModule"],
1595
+ "added": "5.109.0"
1596
+ },
1597
+ "ExternalItemSideEffects": {
1598
+ "description": "Whether importing the external has side effects (like the `sideEffects` flag in a package.json). `false` allows webpack to drop the external when none of its exports are used. Defaults to `true`, as webpack can't analyze an external.",
1599
+ "type": "boolean",
1600
+ "added": "5.110.0"
1537
1601
  },
1538
1602
  "ExternalItemValue": {
1539
1603
  "description": "The dependency used for the external.",
1604
+ "anyOf": [
1605
+ {
1606
+ "$ref": "#/definitions/ExternalItemValueTarget"
1607
+ },
1608
+ {
1609
+ "$ref": "#/definitions/ExternalItemValueWithOptions"
1610
+ }
1611
+ ]
1612
+ },
1613
+ "ExternalItemValueObject": {
1614
+ "description": "The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.",
1615
+ "type": "object",
1616
+ "additionalProperties": {
1617
+ "description": "The target of the external for a specific external type.",
1618
+ "anyOf": [
1619
+ {
1620
+ "type": "array",
1621
+ "items": {
1622
+ "description": "A part of the target of the external.",
1623
+ "type": "string",
1624
+ "minLength": 1
1625
+ }
1626
+ },
1627
+ {
1628
+ "description": "The target of the external.",
1629
+ "type": "string"
1630
+ }
1631
+ ]
1632
+ },
1633
+ "properties": {
1634
+ "interop": {
1635
+ "$ref": "#/definitions/ExternalItemInterop"
1636
+ }
1637
+ }
1638
+ },
1639
+ "ExternalItemValueTarget": {
1640
+ "description": "The target of the external.",
1540
1641
  "anyOf": [
1541
1642
  {
1542
1643
  "type": "array",
@@ -1555,33 +1656,25 @@
1555
1656
  "type": "string"
1556
1657
  },
1557
1658
  {
1558
- "description": "The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.",
1559
- "type": "object",
1560
- "additionalProperties": {
1561
- "description": "The target of the external for a specific external type.",
1562
- "anyOf": [
1563
- {
1564
- "type": "array",
1565
- "items": {
1566
- "description": "A part of the target of the external.",
1567
- "type": "string",
1568
- "minLength": 1
1569
- }
1570
- },
1571
- {
1572
- "description": "The target of the external.",
1573
- "type": "string"
1574
- }
1575
- ]
1576
- },
1577
- "properties": {
1578
- "interop": {
1579
- "$ref": "#/definitions/ExternalItemInterop"
1580
- }
1581
- }
1659
+ "$ref": "#/definitions/ExternalItemValueObject"
1582
1660
  }
1583
1661
  ]
1584
1662
  },
1663
+ "ExternalItemValueWithOptions": {
1664
+ "description": "The target of the external together with options describing how webpack should treat it.",
1665
+ "type": "object",
1666
+ "additionalProperties": false,
1667
+ "properties": {
1668
+ "external": {
1669
+ "$ref": "#/definitions/ExternalItemValueTarget"
1670
+ },
1671
+ "sideEffects": {
1672
+ "$ref": "#/definitions/ExternalItemSideEffects"
1673
+ }
1674
+ },
1675
+ "required": ["external"],
1676
+ "added": "5.110.0"
1677
+ },
1585
1678
  "Externals": {
1586
1679
  "description": "Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.",
1587
1680
  "anyOf": [
@@ -1629,6 +1722,45 @@
1629
1722
  "description": "Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.",
1630
1723
  "type": "boolean"
1631
1724
  },
1725
+ "nodeModules": {
1726
+ "description": "Treat installed packages (requests resolving into a 'node_modules' directory) as external and load them via require()/import at runtime instead of bundling them (useful for server-side rendering builds).",
1727
+ "anyOf": [
1728
+ {
1729
+ "description": "Enable or disable externalizing installed packages.",
1730
+ "type": "boolean"
1731
+ },
1732
+ {
1733
+ "description": "Externalize installed packages with options.",
1734
+ "type": "object",
1735
+ "additionalProperties": false,
1736
+ "properties": {
1737
+ "allowlist": {
1738
+ "description": "Keep these requests bundled instead of externalizing them.",
1739
+ "type": "array",
1740
+ "items": {
1741
+ "description": "A request that should stay bundled.",
1742
+ "anyOf": [
1743
+ {
1744
+ "description": "Requests matching the RegExp stay bundled.",
1745
+ "instanceof": "RegExp",
1746
+ "tsType": "RegExp"
1747
+ },
1748
+ {
1749
+ "description": "An exact request that should stay bundled.",
1750
+ "type": "string"
1751
+ },
1752
+ {
1753
+ "description": "A function returning true for requests that should stay bundled.",
1754
+ "instanceof": "Function",
1755
+ "tsType": "((request: string) => boolean)"
1756
+ }
1757
+ ]
1758
+ }
1759
+ }
1760
+ }
1761
+ }
1762
+ ]
1763
+ },
1632
1764
  "nwjs": {
1633
1765
  "description": "Treat NW.js legacy nw.gui module as external and load it via require() when used.",
1634
1766
  "type": "boolean"
@@ -2075,7 +2207,8 @@
2075
2207
  {
2076
2208
  "type": "string"
2077
2209
  }
2078
- ]
2210
+ ],
2211
+ "added": "5.109.0"
2079
2212
  },
2080
2213
  "HtmlParserOptions": {
2081
2214
  "description": "Parser options for html modules.",
@@ -2221,7 +2354,8 @@
2221
2354
  "type": "string"
2222
2355
  }
2223
2356
  },
2224
- "required": ["rel"]
2357
+ "required": ["rel"],
2358
+ "added": "5.109.0"
2225
2359
  },
2226
2360
  "HttpUriAllowedUris": {
2227
2361
  "description": "List of allowed URIs for building http resources.",
@@ -2403,7 +2537,8 @@
2403
2537
  "description": "Enable/disable evaluating import.meta.webpackHot.",
2404
2538
  "type": "boolean"
2405
2539
  }
2406
- }
2540
+ },
2541
+ "added": "5.109.0"
2407
2542
  },
2408
2543
  "InfrastructureLogging": {
2409
2544
  "description": "Options for infrastructure level logging.",
@@ -2447,7 +2582,8 @@
2447
2582
  {
2448
2583
  "type": "boolean"
2449
2584
  }
2450
- ]
2585
+ ],
2586
+ "added": "5.109.0"
2451
2587
  },
2452
2588
  "stream": {
2453
2589
  "description": "Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.",
@@ -2492,7 +2628,8 @@
2492
2628
  },
2493
2629
  "deferImport": {
2494
2630
  "description": "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.",
2495
- "type": "boolean"
2631
+ "type": "boolean",
2632
+ "added": "5.100.0"
2496
2633
  },
2497
2634
  "dynamicImportCssPreload": {
2498
2635
  "description": "Auto-emit `<link rel=\"preload\" as=\"style\">` for the CSS of every dynamically imported (`import()`) chunk, so the stylesheet fetches in parallel with the chunk's JavaScript instead of after it parses. Unlike `dynamicImportPreload`, the JavaScript itself is not preloaded. `true` uses the default order; a number sets the preload order.",
@@ -2503,7 +2640,8 @@
2503
2640
  {
2504
2641
  "type": "boolean"
2505
2642
  }
2506
- ]
2643
+ ],
2644
+ "added": "5.109.0"
2507
2645
  },
2508
2646
  "dynamicImportFetchPriority": {
2509
2647
  "description": "Specifies global fetchPriority for dynamic import.",
@@ -2651,7 +2789,8 @@
2651
2789
  },
2652
2790
  "strictModeViolations": {
2653
2791
  "description": "Specifies the behavior of constructs that break at runtime in strict mode (e.g. 'with', 'arguments.callee', assigning to read-only globals) when modules are emitted as ES module output.",
2654
- "enum": ["error", "warn", false]
2792
+ "enum": ["error", "warn", false],
2793
+ "added": "5.109.0"
2655
2794
  },
2656
2795
  "strictThisContextOnImports": {
2657
2796
  "description": "Handle the this context correctly according to the spec for namespace objects.",
@@ -2734,7 +2873,8 @@
2734
2873
  {
2735
2874
  "type": "boolean"
2736
2875
  }
2737
- ]
2876
+ ],
2877
+ "added": "5.109.0"
2738
2878
  },
2739
2879
  "wrappedContextCritical": {
2740
2880
  "description": "Enable warnings for partial dynamic dependencies.",
@@ -3026,6 +3166,9 @@
3026
3166
  "type": {
3027
3167
  "$ref": "#/definitions/LibraryType"
3028
3168
  },
3169
+ "umdAmdContainer": {
3170
+ "$ref": "#/definitions/UmdAmdContainer"
3171
+ },
3029
3172
  "umdNamedDefine": {
3030
3173
  "$ref": "#/definitions/UmdNamedDefine"
3031
3174
  }
@@ -3460,8 +3603,15 @@
3460
3603
  "type": "boolean"
3461
3604
  },
3462
3605
  "minimize": {
3463
- "description": "Enable minimizing the output. Uses optimization.minimizer.",
3464
- "type": "boolean"
3606
+ "description": "Enable minimizing the output. Uses optimization.minimizer. An object enables it and configures the built-in minimizer per asset type.",
3607
+ "anyOf": [
3608
+ {
3609
+ "type": "boolean"
3610
+ },
3611
+ {
3612
+ "$ref": "#/definitions/OptimizationMinimizeOptions"
3613
+ }
3614
+ ]
3465
3615
  },
3466
3616
  "minimizer": {
3467
3617
  "description": "Minimizer(s) to use for minimizing the output.",
@@ -3568,6 +3718,291 @@
3568
3718
  }
3569
3719
  }
3570
3720
  },
3721
+ "OptimizationMinimizeCss": {
3722
+ "description": "What the CSS minimizer does. Applies wherever it runs: on `.css` assets and on the inline `<style>` / `style=\"\"` the HTML minimizer hands it. Every transform that keeps the stylesheet's meaning is on by default and may be turned off on its own, so a document a rewrite breaks can be minimized without it while the rest still applies; the two that change what the CSSOM hands back (`convertLengthUnits`, `rewriteCustomProperties`) are off until asked for.",
3723
+ "type": "object",
3724
+ "additionalProperties": false,
3725
+ "properties": {
3726
+ "comments": {
3727
+ "description": "Which comments survive. `\"some\"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `\"all\"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `\"some\"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `\"some\"` and `\"all\"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.",
3728
+ "anyOf": [
3729
+ {
3730
+ "enum": ["all", "some"]
3731
+ },
3732
+ {
3733
+ "instanceof": "RegExp",
3734
+ "tsType": "RegExp"
3735
+ },
3736
+ {
3737
+ "type": "boolean"
3738
+ },
3739
+ {
3740
+ "type": "string"
3741
+ },
3742
+ {
3743
+ "instanceof": "Function",
3744
+ "tsType": "((comment: string) => boolean)"
3745
+ }
3746
+ ],
3747
+ "added": "5.110.0"
3748
+ },
3749
+ "convertLengthUnits": {
3750
+ "description": "Rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`). Off by default: the authored unit is lost, and once the asset is compressed the rewrite rarely earns anything.",
3751
+ "type": "boolean",
3752
+ "added": "5.110.0"
3753
+ },
3754
+ "mergeLonghands": {
3755
+ "description": "Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default.",
3756
+ "type": "boolean",
3757
+ "added": "5.110.0"
3758
+ },
3759
+ "mergeRules": {
3760
+ "description": "Join rules nothing stands between: adjacent rules that print the same block become one selector list, at-rules that share a prelude become one rule, and a named `@layer` block a later sibling opens again is folded into the first. On by default.",
3761
+ "type": "boolean",
3762
+ "added": "5.110.0"
3763
+ },
3764
+ "normalizeQuotes": {
3765
+ "description": "Normalize quoting: a string takes whichever quote needs fewer escapes, a `url()` and an attribute selector's value drop theirs where the content is still one token, and a font family whose name is a run of identifiers is written unquoted. On by default.",
3766
+ "type": "boolean",
3767
+ "added": "5.110.0"
3768
+ },
3769
+ "reduceFunctions": {
3770
+ "description": "Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default.",
3771
+ "type": "boolean",
3772
+ "added": "5.110.0"
3773
+ },
3774
+ "removeDeadRules": {
3775
+ "description": "Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration an identical later one in the same block makes dead, and a rule an identical later sibling makes dead. On by default. Joining rules that are not dead is `mergeRules`.",
3776
+ "type": "boolean",
3777
+ "added": "5.110.0"
3778
+ },
3779
+ "rewriteCustomProperties": {
3780
+ "description": "Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument.",
3781
+ "type": "boolean",
3782
+ "added": "5.110.0"
3783
+ },
3784
+ "shortenColors": {
3785
+ "description": "Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default.",
3786
+ "type": "boolean",
3787
+ "added": "5.110.0"
3788
+ },
3789
+ "shortenMediaQueries": {
3790
+ "description": "Write a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), and collapse an `and` of two one-sided ranges into the interval it describes. On by default.",
3791
+ "type": "boolean",
3792
+ "added": "5.110.0"
3793
+ },
3794
+ "shortenNumbers": {
3795
+ "description": "Write each number in its shortest equal spelling — dropping a leading zero, a trailing fraction and a `+`, rounding to the six significant digits a stylesheet can observe, dropping the unit a zero does not need, and writing an alpha and a ratio the one way its grammar spells them. On by default.",
3796
+ "type": "boolean",
3797
+ "added": "5.110.0"
3798
+ },
3799
+ "shortenSelectors": {
3800
+ "description": "Rewrite a selector into an equal one: a selector list deduplicated and ordered, a CSS2 pseudo-element's second colon dropped, the universal a compound already implies dropped, an `An+B` written the shortest way its microsyntax allows, and a `from` / `100%` keyframe selector written as the shorter of the pair. On by default.",
3801
+ "type": "boolean",
3802
+ "added": "5.110.0"
3803
+ },
3804
+ "shortenValues": {
3805
+ "description": "Write a value the shortest way its property's own grammar allows: a `{1,4}` box or corner notation collapsed, a slot holding its own initial dropped, and `flex` / `font-weight` / `display` / `transition` / `<position>` / `<repeat-style>` written the short way. On by default. Merging separate longhand declarations is `mergeLonghands`.",
3806
+ "type": "boolean",
3807
+ "added": "5.110.0"
3808
+ },
3809
+ "vendorPrefixes": {
3810
+ "description": "Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one.",
3811
+ "type": "boolean",
3812
+ "added": "5.110.0"
3813
+ }
3814
+ },
3815
+ "added": "5.110.0"
3816
+ },
3817
+ "OptimizationMinimizeHtml": {
3818
+ "description": "What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for.",
3819
+ "type": "object",
3820
+ "additionalProperties": false,
3821
+ "properties": {
3822
+ "collapseBooleanAttributes": {
3823
+ "description": "Write a boolean attribute spelled with its own name (`disabled=\"disabled\"`) as the bare name the spec canonicalizes it to. On by default.",
3824
+ "type": "boolean",
3825
+ "added": "5.110.0"
3826
+ },
3827
+ "collapseWhitespace": {
3828
+ "description": "Collapse each run of whitespace in text to a single space. Left alone inside `pre`, `textarea` and `listing`, where whitespace renders verbatim. `true` (or `\"conservative\"`) never removes whitespace entirely — dropping it would join two inline elements that render apart. `\"smart\"` also drops the whitespace that sits against a block element's edge, where no line box reaches it. `\"all\"` drops the whitespace at every text node's edges, which does change how adjacent inline elements render.",
3829
+ "anyOf": [
3830
+ {
3831
+ "enum": ["conservative", "smart", "all"]
3832
+ },
3833
+ {
3834
+ "type": "boolean"
3835
+ }
3836
+ ],
3837
+ "added": "5.110.0"
3838
+ },
3839
+ "comments": {
3840
+ "description": "Which comments survive. `\"some\"`, the default, keeps nothing: every comment an HTML parser reads is inert; `true` (or `\"all\"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `\"some\"` would have kept. A downlevel conditional comment, a server-side include and a `<?…?>` template directive are code rather than comments and stay whatever this says. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.",
3841
+ "anyOf": [
3842
+ {
3843
+ "enum": ["all", "some"]
3844
+ },
3845
+ {
3846
+ "instanceof": "RegExp",
3847
+ "tsType": "RegExp"
3848
+ },
3849
+ {
3850
+ "type": "boolean"
3851
+ },
3852
+ {
3853
+ "type": "string"
3854
+ },
3855
+ {
3856
+ "instanceof": "Function",
3857
+ "tsType": "((comment: string) => boolean)"
3858
+ }
3859
+ ],
3860
+ "added": "5.110.0"
3861
+ },
3862
+ "mergeStyles": {
3863
+ "description": "Print a run of adjacent `<style>` elements as one sheet. Off by default: it removes elements, so `document.styleSheets`, a `style:nth-child()` selector and `querySelectorAll(\"style\").length` all read a different document. A sheet the CSS minifier does not accept is never folded — appending to one that may be unterminated would make the next sheet part of its last rule — and neither is one led by `@import` / `@charset` / `@namespace`, which apply only at the top of a sheet.",
3864
+ "type": "boolean",
3865
+ "added": "5.110.0"
3866
+ },
3867
+ "minifyConditionalComments": {
3868
+ "description": "Minify the markup inside a downlevel-hidden conditional comment (`<!--[if IE]> … <![endif]-->`). Off by default: the body is minified on its own, so a context-sensitive decision inside it — which end tags are optional, where a table cell may sit — is taken as though it started a document rather than where the comment sits. Only browsers older than IE10 read these at all.",
3869
+ "type": "boolean",
3870
+ "added": "5.110.0"
3871
+ },
3872
+ "minifyJson": {
3873
+ "description": "Strip the whitespace between the tokens of a `<script>` whose type is a JSON MIME type. Every literal is copied byte for byte, so no number is rounded and no escape rewritten. On by default.",
3874
+ "type": "boolean",
3875
+ "added": "5.110.0"
3876
+ },
3877
+ "minifySrcdoc": {
3878
+ "description": "Minify the document held in an `<iframe srcdoc>` attribute. Off by default: the body is a whole document of its own (its base URL is `about:srcdoc`), so minifying it is safe, but the attribute is readable from script and a consumer comparing `iframe.srcdoc` byte for byte would see it change.",
3879
+ "type": "boolean",
3880
+ "added": "5.110.0"
3881
+ },
3882
+ "minifyStyles": {
3883
+ "description": "Run the CSS minimizer over an inline `<style>` element and every `style=\"\"` attribute, with the options `optimization.minimize.css` names. On by default.",
3884
+ "type": "boolean",
3885
+ "added": "5.110.0"
3886
+ },
3887
+ "normalizeAttributeQuotes": {
3888
+ "description": "Write an attribute value with whichever delimiters cost least — bare where the grammar allows it, else under the quote that needs fewer character references. On by default: the DOM reads the same value either way.",
3889
+ "type": "boolean",
3890
+ "added": "5.110.0"
3891
+ },
3892
+ "normalizeEnumeratedAttributes": {
3893
+ "description": "Fold an enumerated attribute's value to the keyword it names (`type=\"TEXT\"` -> `type=text`), which the DOM matches ASCII case-insensitively. A value the spec does not enumerate is left as written. On by default.",
3894
+ "type": "boolean",
3895
+ "added": "5.110.0"
3896
+ },
3897
+ "normalizeListAttributes": {
3898
+ "description": "Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. Reordering a token list is `sortTokenLists`, which is separate and off by default.",
3899
+ "type": "boolean",
3900
+ "added": "5.110.0"
3901
+ },
3902
+ "normalizeNumericAttributes": {
3903
+ "description": "Write an integer attribute (`tabindex`, `colspan`, `width`, …) the one way its own rules read it — leading whitespace, a `+` and leading zeros all go. On by default.",
3904
+ "type": "boolean",
3905
+ "added": "5.110.0"
3906
+ },
3907
+ "removeEmptyAttributes": {
3908
+ "description": "Drop an attribute whose empty or all-whitespace value leaves it in the state its absence gives: the globals `class`, `id`, `style`, `dir`, `accesskey`, `itemprop`, `itemref`, `itemtype` and `part`, and every attribute reflecting a token list on the elements the spec defines it for — `rel` on `<a>`, `<area>`, `<form>` and `<link>`, `ping` on `<a>` and `<area>`, `headers` on `<td>` and `<th>`, `blocking` on `<link>`, `<script>` and `<style>`, `sizes` on `<link>`, `for` on `<output>` — where an empty list is no tokens. Anywhere else that spelling is an author attribute whose meaning is a script's, so `<x-foo rel=\"\">` and `<label for=\"\">` keep it. Off by default: an attribute selector matches on presence, so `[class]` stops matching. Never dropped: `title` and `lang`, whose empty value means what absence does not; `sandbox`, whose empty list is the most restrictive state an `<iframe>` has; and an event handler, whose empty body still compiles to a function where absence reads null.",
3909
+ "type": "boolean",
3910
+ "added": "5.110.0"
3911
+ },
3912
+ "removeEmptyElements": {
3913
+ "description": "Drop an element that has no children and no attributes. Kept anyway when its bare form is still doing a job (`canvas`, `slot`, `template`, `textarea`, `progress`, `meter`, `output`, `dialog`, and the table structure), when it is a void element, or when it is foreign content. Off by default: CSS can give an empty element a size or a `::before`, and the minifier cannot see the stylesheet. Emptiness is read off the output rather than the source, so a run of nested empties goes together and an element left empty only by a dropped comment or by whitespace `collapseWhitespace` deletes goes with them.",
3914
+ "type": "boolean",
3915
+ "added": "5.110.0"
3916
+ },
3917
+ "removeImpliedTags": {
3918
+ "description": "How much of the `<html>` / `<head>` / `<body>` shell §13.1.2.4 lets the parser imply may be left out. Every other optional tag goes unconditionally — nothing can observe that — but these six are what a consumer reading the page with a regexp rather than a parser looks for. `\"smart\"`, the default, leaves out the one such a reader never matches: the `<html>` start tag, which is omittable only when it carries no attribute at all, so the `<html lang=en>` anyone greps for keeps its tag anyway. `</html>` stays with it, since a truncation check reads a page as complete by finding one. `true` (or `\"all\"`) leaves out all six, which is where a crawler matching on `<body>` stops finding one; `false` leaves out none. A tag also stays wherever the spec keeps it: an attribute to carry, a comment minifying does not drop, whitespace opening the element, or a `meta` / `noscript` / `link` / `script` / `style` / `template` element opening the body.",
3919
+ "anyOf": [
3920
+ {
3921
+ "enum": ["smart", "all"]
3922
+ },
3923
+ {
3924
+ "type": "boolean"
3925
+ }
3926
+ ],
3927
+ "added": "5.110.0"
3928
+ },
3929
+ "removeOptionalTags": {
3930
+ "description": "Leave out a tag §13.1.2.4 lets the parser imply, other than the `<html>` / `<head>` / `<body>` shell, which `removeImpliedTags` decides on its own. On by default: nothing can observe the difference, the tree parses the same either way. A tag still stays wherever the spec keeps it — a comment or whitespace behind it, or a following element the insertion mode does not close it through.",
3931
+ "type": "boolean",
3932
+ "added": "5.110.0"
3933
+ },
3934
+ "removeRedundantAttributes": {
3935
+ "description": "Drop an attribute whose value is the one the element already defaults to. Off by default: an attribute a page no longer carries is one `getAttribute` and every attribute selector read differently, whichever tier dropped it. `true` (or `\"smart\"`) drops only markers on elements that render nothing — `<script type=text/javascript>`, `<script language=javascript>`, `<script charset=utf-8>`, `<style type=text/css>`, `<link type=text/css>`, `<link media=all>` — so no rule that styles the page stops applying, which is what `@swc/html` does by default. `\"all\"` also drops spec defaults such as `<input type=text>` and `<form method=get>`, which reaches further still: an attribute selector matches the content attribute, not the reflected default, so `input[type=text]` stops matching.",
3936
+ "anyOf": [
3937
+ {
3938
+ "enum": ["smart", "all"]
3939
+ },
3940
+ {
3941
+ "type": "boolean"
3942
+ }
3943
+ ],
3944
+ "added": "5.110.0"
3945
+ },
3946
+ "sortAttributes": {
3947
+ "description": "Print an element's attributes in a fixed order: the document's commonest attribute names first, ties by name. Nothing in HTML reads attribute order, so this only makes the same markup compress better across pages — the run of attributes two elements share becomes the same run of bytes. Off by default: a script reading `element.attributes` back, or a snapshot of the emitted HTML, sees the new order.",
3948
+ "type": "boolean",
3949
+ "added": "5.110.0"
3950
+ },
3951
+ "sortTokenLists": {
3952
+ "description": "Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.",
3953
+ "type": "boolean",
3954
+ "added": "5.110.0"
3955
+ }
3956
+ },
3957
+ "added": "5.110.0"
3958
+ },
3959
+ "OptimizationMinimizeJavascript": {
3960
+ "description": "Options handed as-is to the JavaScript minimizer (terser-compatible). Defaults to `{ compress: { passes: 2 } }`.",
3961
+ "type": "object",
3962
+ "additionalProperties": true,
3963
+ "added": "5.110.0"
3964
+ },
3965
+ "OptimizationMinimizeOptions": {
3966
+ "description": "Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.",
3967
+ "type": "object",
3968
+ "additionalProperties": false,
3969
+ "properties": {
3970
+ "css": {
3971
+ "description": "Minimize CSS assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.",
3972
+ "anyOf": [
3973
+ {
3974
+ "enum": [false]
3975
+ },
3976
+ {
3977
+ "$ref": "#/definitions/OptimizationMinimizeCss"
3978
+ }
3979
+ ]
3980
+ },
3981
+ "html": {
3982
+ "description": "Minimize HTML assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.",
3983
+ "anyOf": [
3984
+ {
3985
+ "enum": [false]
3986
+ },
3987
+ {
3988
+ "$ref": "#/definitions/OptimizationMinimizeHtml"
3989
+ }
3990
+ ]
3991
+ },
3992
+ "javascript": {
3993
+ "description": "Minimize JavaScript assets: `false` disables it, an object is handed as-is to the JavaScript minimizer.",
3994
+ "anyOf": [
3995
+ {
3996
+ "enum": [false]
3997
+ },
3998
+ {
3999
+ "$ref": "#/definitions/OptimizationMinimizeJavascript"
4000
+ }
4001
+ ]
4002
+ }
4003
+ },
4004
+ "added": "5.110.0"
4005
+ },
3571
4006
  "OptimizationNormalized": {
3572
4007
  "description": "Enables/Disables integrated optimizations.",
3573
4008
  "type": "object",
@@ -3639,8 +4074,15 @@
3639
4074
  "type": "boolean"
3640
4075
  },
3641
4076
  "minimize": {
3642
- "description": "Enable minimizing the output. Uses optimization.minimizer.",
3643
- "type": "boolean"
4077
+ "description": "Enable minimizing the output. Uses optimization.minimizer. An object configures the built-in minimizer per asset type.",
4078
+ "anyOf": [
4079
+ {
4080
+ "enum": [false]
4081
+ },
4082
+ {
4083
+ "$ref": "#/definitions/OptimizationMinimizeOptions"
4084
+ }
4085
+ ]
3644
4086
  },
3645
4087
  "minimizer": {
3646
4088
  "description": "Minimizer(s) to use for minimizing the output.",
@@ -4556,7 +4998,8 @@
4556
4998
  },
4557
4999
  "required": ["href"]
4558
5000
  }
4559
- ]
5001
+ ],
5002
+ "added": "5.109.0"
4560
5003
  },
4561
5004
  "csp": {
4562
5005
  "description": "Inject a `<meta http-equiv=\"Content-Security-Policy\">` into every webpack-emitted HTML page. `false` (default) does nothing; `true` uses a strict baseline (`script-src 'self'`, `style-src 'self'`, `object-src 'none'`, `base-uri 'self'`) and appends a `sha256` hash of every inline `<script>`/`<style>` to `script-src`/`style-src`. An object customizes it. Skipped when the page already declares a CSP.",
@@ -4632,7 +5075,8 @@
4632
5075
  "instanceof": "Function",
4633
5076
  "tsType": "((name: string) => boolean | string | { [rel: string]: HtmlFaviconIcon | HtmlFaviconIcon[] })"
4634
5077
  }
4635
- ]
5078
+ ],
5079
+ "added": "5.109.0"
4636
5080
  },
4637
5081
  "inject": {
4638
5082
  "description": "Where to place injected chunk `<script>`/`<link>` tags. `\"body\"` (default; `\"head\"` with `output.module`) keeps them next to the entry tag — end of `<body>` on generated pages; `\"head\"` moves them into `<head>`; `false` suppresses sibling-chunk injection (entry tags and resource hints remain).",
@@ -4644,7 +5088,8 @@
4644
5088
  "type": "boolean",
4645
5089
  "enum": [false]
4646
5090
  }
4647
- ]
5091
+ ],
5092
+ "added": "5.109.0"
4648
5093
  },
4649
5094
  "inline": {
4650
5095
  "description": "Inline the content of matching chunks directly into the HTML instead of emitting a separate `<script>`/`<link>` tag. `true` inlines every chunk; `\"script\"` inlines only JavaScript, `\"style\"` only CSS; an array of `RegExp` patterns matches against the chunk name.",
@@ -4663,7 +5108,8 @@
4663
5108
  {
4664
5109
  "type": "boolean"
4665
5110
  }
4666
- ]
5111
+ ],
5112
+ "added": "5.109.0"
4667
5113
  },
4668
5114
  "integrity": {
4669
5115
  "description": "Add Subresource Integrity (SRI) `integrity` attributes to injected `<script>`/`<link>` tags. `true` uses `['sha384']`; an array sets the hash algorithms; a function receives each referenced asset and returns the algorithms to use or `false` to skip it.",
@@ -4683,7 +5129,8 @@
4683
5129
  "instanceof": "Function",
4684
5130
  "tsType": "((asset: { chunk: import('../lib/Chunk'), filename: string }) => string[] | false)"
4685
5131
  }
4686
- ]
5132
+ ],
5133
+ "added": "5.109.0"
4687
5134
  },
4688
5135
  "manifest": {
4689
5136
  "description": "Web app manifest for webpack-generated HTML (authored pages are left untouched). `false` (default) injects nothing. A string is a path to an existing `.webmanifest` file to link. An object is the manifest contents — serialized, emitted as a hashed `.webmanifest` and linked with `<link rel=\"manifest\">`; its `icons`/`screenshots` `src` paths resolve like any request and are emitted as hashed assets. A function receives the page name and returns one of these.",
@@ -4711,7 +5158,8 @@
4711
5158
  "additionalProperties": {
4712
5159
  "description": "Content string for the meta tag.",
4713
5160
  "type": "string"
4714
- }
5161
+ },
5162
+ "added": "5.109.0"
4715
5163
  },
4716
5164
  "scriptLoading": {
4717
5165
  "description": "How injected `<script>` tags load. `auto` (default) emits a module script for ES module output and `defer` otherwise; `defer` forces a deferred script; `blocking` emits a plain blocking script.",
@@ -4719,7 +5167,8 @@
4719
5167
  },
4720
5168
  "title": {
4721
5169
  "description": "Sets the `<title>` of the generated HTML page. Skipped if the HTML already contains a `<title>` element.",
4722
- "type": "string"
5170
+ "type": "string",
5171
+ "added": "5.109.0"
4723
5172
  }
4724
5173
  }
4725
5174
  },
@@ -5006,14 +5455,94 @@
5006
5455
  "type": "object",
5007
5456
  "additionalProperties": false,
5008
5457
  "properties": {
5458
+ "all": {
5459
+ "description": "Fallback value for the performance checks that are not set individually (has precedence over local webpack defaults). Does not apply to 'hints', 'maxAssetSize' or 'maxEntrypointSize'.",
5460
+ "type": "boolean",
5461
+ "added": "5.110.0"
5462
+ },
5009
5463
  "assetFilter": {
5010
5464
  "description": "Filter function to select assets that are checked.",
5011
5465
  "instanceof": "Function",
5012
5466
  "tsType": "import('../lib/performance/SizeLimitsPlugin').AssetFilter"
5013
5467
  },
5468
+ "asyncChunkWaterfalls": {
5469
+ "description": "Report chains of 'import()' calls where each chunk can only be requested once the one before it has arrived, so the levels cost round trips in series (requires 'hints' to be enabled).",
5470
+ "type": "boolean",
5471
+ "added": "5.110.0"
5472
+ },
5473
+ "broadContexts": {
5474
+ "description": "Report 'require.context' calls with no filter, which bundle every file under a directory (requires 'hints' to be enabled).",
5475
+ "type": "boolean",
5476
+ "added": "5.110.0"
5477
+ },
5478
+ "cacheEffectiveness": {
5479
+ "description": "Report how much of the module graph the cache reused, and the modules that can never be reused (requires 'hints' to be enabled).",
5480
+ "type": "boolean",
5481
+ "added": "5.110.0"
5482
+ },
5483
+ "circularDependencies": {
5484
+ "description": "Report groups of modules that import each other synchronously (requires 'hints' to be enabled).",
5485
+ "type": "boolean",
5486
+ "added": "5.110.0"
5487
+ },
5488
+ "conflictingResourceHints": {
5489
+ "description": "Report chunks asked for as both prefetch and preload from the same place, where the two directives contradict each other.",
5490
+ "type": "boolean",
5491
+ "added": "5.110.0"
5492
+ },
5493
+ "duplicateModules": {
5494
+ "description": "Report modules emitted into more than one chunk, and the bytes the extra copies cost (requires 'hints' to be enabled).",
5495
+ "type": "boolean",
5496
+ "added": "5.110.0"
5497
+ },
5498
+ "duplicatePackages": {
5499
+ "description": "Report packages which are included more than once, in different versions or as multiple copies of the same version (requires 'hints' to be enabled).",
5500
+ "type": "boolean",
5501
+ "added": "5.110.0"
5502
+ },
5503
+ "dynamicExports": {
5504
+ "description": "Report modules whose exports cannot be read statically, which stops anything importing them from being tree-shaken (requires 'hints' to be enabled).",
5505
+ "type": "boolean",
5506
+ "added": "5.110.0"
5507
+ },
5508
+ "embeddedSourceMaps": {
5509
+ "description": "Report a production build whose 'devtool' writes the source map into the JavaScript, so everyone loading the page downloads it (requires 'hints' to be enabled).",
5510
+ "type": "boolean",
5511
+ "added": "5.110.0"
5512
+ },
5513
+ "entrypointOverlap": {
5514
+ "description": "Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).",
5515
+ "type": "boolean",
5516
+ "added": "5.110.0"
5517
+ },
5518
+ "evalUsage": {
5519
+ "description": "Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).",
5520
+ "type": "boolean",
5521
+ "added": "5.110.0"
5522
+ },
5014
5523
  "hints": {
5015
- "description": "Sets the format of the hints: warnings, errors or nothing at all.",
5016
- "enum": [false, "warning", "error"]
5524
+ "description": "Sets the format of the hints: warnings, errors, stats-only or nothing at all.",
5525
+ "enum": [false, "warning", "error", "stats"]
5526
+ },
5527
+ "hotspots": {
5528
+ "description": "Report the loaders, plugins and hooks that hold the main thread, timing each one's own code rather than what it waited for (requires 'hints' to be enabled).",
5529
+ "type": "boolean",
5530
+ "added": "5.110.0"
5531
+ },
5532
+ "inlinedAssets": {
5533
+ "description": "Report assets inlined as data urls that are large enough for the base64 cost and the lost caching to outweigh the request they save (requires 'hints' to be enabled).",
5534
+ "type": "boolean",
5535
+ "added": "5.110.0"
5536
+ },
5537
+ "largeModules": {
5538
+ "description": "Report a single module that makes up most of the chunk it is in (requires 'hints' to be enabled).",
5539
+ "type": "boolean",
5540
+ "added": "5.110.0"
5541
+ },
5542
+ "legacyJavascript": {
5543
+ "description": "Report polyfill packages that emulate language features the target already supports natively (requires 'hints' to be enabled).",
5544
+ "type": "boolean",
5545
+ "added": "5.110.0"
5017
5546
  },
5018
5547
  "maxAssetSize": {
5019
5548
  "description": "File size limit (in bytes) when exceeded, that webpack will provide performance hints.",
@@ -5022,6 +5551,81 @@
5022
5551
  "maxEntrypointSize": {
5023
5552
  "description": "Total size of an entry point (in bytes).",
5024
5553
  "type": "number"
5554
+ },
5555
+ "missingSideEffects": {
5556
+ "description": "Report packages that keep unused code in the bundle because their package.json does not declare 'sideEffects' (requires 'hints' to be enabled).",
5557
+ "type": "boolean",
5558
+ "added": "5.110.0"
5559
+ },
5560
+ "mixedExports": {
5561
+ "description": "Report an entry that exports a default beside named exports for a CommonJS library, where a consumer receives the namespace object (requires 'hints' to be enabled).",
5562
+ "type": "boolean",
5563
+ "added": "5.110.0"
5564
+ },
5565
+ "osDependentRules": {
5566
+ "description": "Report conditions in 'module.rules' that hardcode a path separator, so they only match on one operating system.",
5567
+ "type": "boolean",
5568
+ "added": "5.110.0"
5569
+ },
5570
+ "pureAnnotations": {
5571
+ "description": "Report '/*#__PURE__*/' annotations that sit somewhere the parser does not read them (requires 'hints' to be enabled).",
5572
+ "type": "boolean",
5573
+ "added": "5.110.0"
5574
+ },
5575
+ "redundantDynamicImports": {
5576
+ "description": "Report 'import()' calls whose module is already loaded where the call runs, so they defer nothing (requires 'hints' to be enabled).",
5577
+ "type": "boolean",
5578
+ "added": "5.110.0"
5579
+ },
5580
+ "scopeHoistingBailouts": {
5581
+ "description": "Report modules that could not be merged into their importer's scope, and why (requires 'hints' to be enabled).",
5582
+ "type": "boolean",
5583
+ "added": "5.110.0"
5584
+ },
5585
+ "splitChunksCapped": {
5586
+ "description": "Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).",
5587
+ "type": "boolean",
5588
+ "added": "5.110.0"
5589
+ },
5590
+ "tinyChunks": {
5591
+ "description": "Report chunks loaded on demand that carry less than 'optimization.splitChunks.minSize' (requires 'hints' to be enabled).",
5592
+ "type": "boolean",
5593
+ "added": "5.110.0"
5594
+ },
5595
+ "topLevelThis": {
5596
+ "description": "Report modules that read 'this' at the top level of an ES module, where it is 'undefined' rather than the module object or the global one (requires 'hints' to be enabled).",
5597
+ "type": "boolean",
5598
+ "added": "5.110.0"
5599
+ },
5600
+ "unsplitVendors": {
5601
+ "description": "Report initial chunks that mix 'node_modules' code with application code, so every application change re-downloads the dependencies too (requires 'hints' to be enabled).",
5602
+ "type": "boolean",
5603
+ "added": "5.110.0"
5604
+ },
5605
+ "unusedAliases": {
5606
+ "description": "Report 'resolve.alias' entries that no request matched.",
5607
+ "type": "boolean",
5608
+ "added": "5.110.0"
5609
+ },
5610
+ "unusedDefines": {
5611
+ "description": "Report keys defined by 'DefinePlugin' that no module ever referenced, which cost a parser hook per module and invalidate the build when their value changes.",
5612
+ "type": "boolean",
5613
+ "added": "5.110.0"
5614
+ },
5615
+ "unusedExternals": {
5616
+ "description": "Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.",
5617
+ "type": "boolean",
5618
+ "added": "5.110.0"
5619
+ },
5620
+ "unusedReexports": {
5621
+ "description": "Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).",
5622
+ "type": "boolean",
5623
+ "added": "5.110.0"
5624
+ },
5625
+ "unusedRules": {
5626
+ "description": "Report rules in 'module.rules' that never matched a module, which cost condition evaluation on every build. Note that plugins may add rules too, so a reported rule is not necessarily one you wrote.",
5627
+ "type": "boolean",
5628
+ "added": "5.110.0"
5025
5629
  }
5026
5630
  }
5027
5631
  },
@@ -5541,7 +6145,8 @@
5541
6145
  {
5542
6146
  "$ref": "#/definitions/ResourceHintsOptions"
5543
6147
  }
5544
- ]
6148
+ ],
6149
+ "added": "5.109.0"
5545
6150
  },
5546
6151
  "ResourceHintsInitial": {
5547
6152
  "description": "Initial dependency-graph chunk hints. `true` auto-emits `<link rel=\"modulepreload\">` (ESM output) or `<link rel=\"preload\" as=\"script\">` (classic) for each of the entry's initial dependency chunks; `\"prefetch\"` uses `<link rel=\"prefetch\">`; `\"preload\"` is an alias of `true`; `false` disables chunk hints (URL-asset hints from magic comments / `urlHints` still fire); `\"none\"` is a hard off switch (no `<link>` anywhere, empty stats / manifest); an array of `HtmlResourceHint` descriptors replaces the auto set; a function receives the auto `defaultHints` plus context (`entryName`, `entrypoint`, `hostType: \"html\" | \"js\"`, `compilation`) and returns the final list (replaces the removed `resolveDependencies` hook).",
@@ -5562,13 +6167,18 @@
5562
6167
  "instanceof": "Function",
5563
6168
  "tsType": "((context: { entryName: string, entrypoint: import('../lib/Entrypoint'), hostType: 'html' | 'js', compilation: import('../lib/Compilation'), defaultHints: (import('../lib/dependencies/HtmlEntryDependency').HtmlResourceHint & { hostChunks: string[] })[] }) => import('../lib/dependencies/HtmlEntryDependency').HtmlResourceHint[])"
5564
6169
  }
5565
- ]
6170
+ ],
6171
+ "added": "5.109.0"
5566
6172
  },
5567
6173
  "ResourceHintsOptions": {
5568
6174
  "description": "Full resource-hint configuration.",
5569
6175
  "type": "object",
5570
6176
  "additionalProperties": false,
5571
6177
  "properties": {
6178
+ "dedupe": {
6179
+ "description": "Skip the runtime-injected `<link rel=\"prefetch\">` for a chunk that is already preloaded or prefetched in the document (avoids a duplicate request in some browsers such as Chrome).",
6180
+ "type": "boolean"
6181
+ },
5572
6182
  "initial": {
5573
6183
  "$ref": "#/definitions/ResourceHintsInitial"
5574
6184
  },
@@ -5592,7 +6202,8 @@
5592
6202
  "$ref": "#/definitions/UrlHintRule"
5593
6203
  }
5594
6204
  }
5595
- }
6205
+ },
6206
+ "added": "5.109.0"
5596
6207
  },
5597
6208
  "RuleSetCondition": {
5598
6209
  "description": "A condition matcher.",
@@ -5697,6 +6308,18 @@
5697
6308
  ]
5698
6309
  }
5699
6310
  },
6311
+ "RuleSetGlob": {
6312
+ "description": "A glob pattern matched against a path, using `/` as path separator on every OS; a `!` prefix excludes what it matches.",
6313
+ "type": "string",
6314
+ "minLength": 1
6315
+ },
6316
+ "RuleSetGlobs": {
6317
+ "description": "A list of glob patterns.",
6318
+ "type": "array",
6319
+ "items": {
6320
+ "$ref": "#/definitions/RuleSetGlob"
6321
+ }
6322
+ },
5700
6323
  "RuleSetLoader": {
5701
6324
  "description": "A loader request.",
5702
6325
  "type": "string",
@@ -5714,7 +6337,7 @@
5714
6337
  ]
5715
6338
  },
5716
6339
  "RuleSetLogicalConditions": {
5717
- "description": "Logic operators used in a condition matcher.",
6340
+ "description": "Logic operators and glob patterns used in a condition matcher.",
5718
6341
  "type": "object",
5719
6342
  "additionalProperties": false,
5720
6343
  "properties": {
@@ -5726,6 +6349,18 @@
5726
6349
  }
5727
6350
  ]
5728
6351
  },
6352
+ "glob": {
6353
+ "description": "Match glob patterns against the value, `!` in front of a pattern excludes it. Path separators are normalized to `/` on every OS, and a relative pattern matches at any depth.",
6354
+ "anyOf": [
6355
+ {
6356
+ "$ref": "#/definitions/RuleSetGlob"
6357
+ },
6358
+ {
6359
+ "$ref": "#/definitions/RuleSetGlobs"
6360
+ }
6361
+ ],
6362
+ "added": "5.110.0"
6363
+ },
5729
6364
  "not": {
5730
6365
  "description": "Logical NOT.",
5731
6366
  "oneOf": [
@@ -5745,7 +6380,7 @@
5745
6380
  }
5746
6381
  },
5747
6382
  "RuleSetLogicalConditionsAbsolute": {
5748
- "description": "Logic operators used in a condition matcher.",
6383
+ "description": "Logic operators and glob patterns used in a condition matcher.",
5749
6384
  "type": "object",
5750
6385
  "additionalProperties": false,
5751
6386
  "properties": {
@@ -5757,6 +6392,18 @@
5757
6392
  }
5758
6393
  ]
5759
6394
  },
6395
+ "glob": {
6396
+ "description": "Match glob patterns against the value, `!` in front of a pattern excludes it. Path separators are normalized to `/` on every OS, and a relative pattern matches at any depth.",
6397
+ "anyOf": [
6398
+ {
6399
+ "$ref": "#/definitions/RuleSetGlob"
6400
+ },
6401
+ {
6402
+ "$ref": "#/definitions/RuleSetGlobs"
6403
+ }
6404
+ ],
6405
+ "added": "5.110.0"
6406
+ },
5760
6407
  "not": {
5761
6408
  "description": "Logical NOT.",
5762
6409
  "oneOf": [
@@ -5810,6 +6457,15 @@
5810
6457
  "$ref": "#/definitions/RuleSetConditionOrConditions"
5811
6458
  }
5812
6459
  },
6460
+ "descriptionRelativePath": {
6461
+ "description": "Match the path of the module relative to the directory of the description file (usually package.json), i.e. './lib/button.js'. Always uses forward slashes.",
6462
+ "oneOf": [
6463
+ {
6464
+ "$ref": "#/definitions/RuleSetConditionOrConditions"
6465
+ }
6466
+ ],
6467
+ "added": "5.110.0"
6468
+ },
5813
6469
  "enforce": {
5814
6470
  "description": "Enforce this rule as pre or post step.",
5815
6471
  "enum": ["pre", "post"]
@@ -5830,6 +6486,18 @@
5830
6486
  "description": "The options for the module generator.",
5831
6487
  "type": "object"
5832
6488
  },
6489
+ "glob": {
6490
+ "description": "Match the module resource against glob patterns, `!` in front of a pattern excludes it. Combines with `test`, `include` and `exclude`.",
6491
+ "anyOf": [
6492
+ {
6493
+ "$ref": "#/definitions/RuleSetGlob"
6494
+ },
6495
+ {
6496
+ "$ref": "#/definitions/RuleSetGlobs"
6497
+ }
6498
+ ],
6499
+ "added": "5.110.0"
6500
+ },
5833
6501
  "include": {
5834
6502
  "description": "Shortcut for resource.include.",
5835
6503
  "oneOf": [
@@ -6323,7 +6991,8 @@
6323
6991
  },
6324
6992
  "chunkGroupResourceHints": {
6325
6993
  "description": "Include the resolved `<link>` resource-hint descriptors for each entrypoint (`entrypoints[name].resourceHints`). Combines `output.resourceHints.chunks` (initial-graph modulepreload/preload/prefetch) with `output.resourceHints.assets` (URL-referenced fonts / images / …). Lets SSR frameworks inject the hints server-side without walking the chunk graph themselves; the analogue of Vite's `build.ssrManifest`.",
6326
- "type": "boolean"
6994
+ "type": "boolean",
6995
+ "added": "5.109.0"
6327
6996
  },
6328
6997
  "chunkGroups": {
6329
6998
  "description": "Display all chunk groups with the corresponding bundles.",
@@ -6561,6 +7230,16 @@
6561
7230
  "description": "Add the hash of the compilation.",
6562
7231
  "type": "boolean"
6563
7232
  },
7233
+ "hints": {
7234
+ "description": "Add performance hints reported with 'performance.hints: \"stats\"'.",
7235
+ "type": "boolean",
7236
+ "added": "5.110.0"
7237
+ },
7238
+ "hintsCount": {
7239
+ "description": "Add the number of performance hints.",
7240
+ "type": "boolean",
7241
+ "added": "5.110.0"
7242
+ },
6564
7243
  "ids": {
6565
7244
  "description": "Add ids.",
6566
7245
  "type": "boolean"
@@ -6796,6 +7475,13 @@
6796
7475
  }
6797
7476
  }
6798
7477
  },
7478
+ "UmdAmdContainer": {
7479
+ "description": "Add a branch to the UMD wrapper for an AMD-style loader exposing `define` on a container object, given as a dot-separated path, after the `define.amd` branch.",
7480
+ "type": "string",
7481
+ "minLength": 1,
7482
+ "added": "5.110.0",
7483
+ "pattern": "^[A-Za-z_$][A-Za-z0-9_$]*(\\.[A-Za-z_$][A-Za-z0-9_$]*)*$"
7484
+ },
6799
7485
  "UmdNamedDefine": {
6800
7486
  "description": "If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.",
6801
7487
  "type": "boolean"
@@ -6843,14 +7529,16 @@
6843
7529
  "description": "Default `type` attribute (MIME).",
6844
7530
  "type": "string"
6845
7531
  }
6846
- }
7532
+ },
7533
+ "added": "5.109.0"
6847
7534
  },
6848
7535
  "UrlHints": {
6849
7536
  "description": "URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).",
6850
7537
  "type": "array",
6851
7538
  "items": {
6852
7539
  "$ref": "#/definitions/UrlHintRule"
6853
- }
7540
+ },
7541
+ "added": "5.109.0"
6854
7542
  },
6855
7543
  "Validate": {
6856
7544
  "description": "Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.",
@@ -6925,7 +7613,8 @@
6925
7613
  },
6926
7614
  "WasmStreamingFallback": {
6927
7615
  "description": "Fall back to non-streaming WebAssembly instantiation when streaming compilation fails because the server does not serve `.wasm` files with the `application/wasm` MIME type.",
6928
- "type": "boolean"
7616
+ "type": "boolean",
7617
+ "added": "5.109.0"
6929
7618
  },
6930
7619
  "Watch": {
6931
7620
  "description": "Enter watch mode, which rebuilds on file change.",