@depup/webpack 5.109.2-depup.0 → 5.110.3-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 (647) hide show
  1. package/README.md +5 -5
  2. package/changes.json +7 -7
  3. package/lib/APIPlugin.js +123 -17
  4. package/lib/AsyncDependenciesBlock.js +10 -7
  5. package/lib/AutomaticPrefetchPlugin.js +1 -1
  6. package/lib/BannerPlugin.js +10 -6
  7. package/lib/CacheFacade.js +6 -6
  8. package/lib/Chunk.js +14 -11
  9. package/lib/ChunkGraph.js +46 -35
  10. package/lib/ChunkGroup.js +7 -7
  11. package/lib/ChunkTemplate.js +35 -44
  12. package/lib/CircularModulesPlugin.js +205 -28
  13. package/lib/CleanPlugin.js +4 -7
  14. package/lib/CodeGenerationResults.js +11 -8
  15. package/lib/CompatibilityPlugin.js +7 -7
  16. package/lib/Compilation.js +688 -409
  17. package/lib/Compiler.js +53 -38
  18. package/lib/ConcatenationScope.js +107 -8
  19. package/lib/ConditionalInitFragment.js +3 -3
  20. package/lib/ConstPlugin.js +13 -11
  21. package/lib/ContextExclusionPlugin.js +1 -1
  22. package/lib/ContextModule.js +146 -54
  23. package/lib/ContextModuleFactory.js +46 -14
  24. package/lib/ContextReplacementPlugin.js +12 -14
  25. package/lib/DefinePlugin.js +121 -37
  26. package/lib/DependenciesBlock.js +9 -6
  27. package/lib/Dependency.js +36 -16
  28. package/lib/DependencyTemplate.js +11 -12
  29. package/lib/DependencyTemplates.js +3 -3
  30. package/lib/DotenvPlugin.js +91 -26
  31. package/lib/DynamicEntryPlugin.js +8 -4
  32. package/lib/EntryOptionPlugin.js +8 -4
  33. package/lib/EntryPlugin.js +2 -2
  34. package/lib/Entrypoint.js +6 -2
  35. package/lib/EnvironmentPlugin.js +2 -2
  36. package/lib/EvalDevToolModulePlugin.js +8 -4
  37. package/lib/EvalSourceMapDevToolPlugin.js +15 -8
  38. package/lib/ExportsInfo.js +111 -14
  39. package/lib/ExportsInfoApiPlugin.js +2 -4
  40. package/lib/ExternalModule.js +232 -77
  41. package/lib/ExternalModuleFactoryPlugin.js +97 -38
  42. package/lib/ExternalsPlugin.js +10 -6
  43. package/lib/FileSystemInfo.js +44 -70
  44. package/lib/FlagAllModulesAsUsedPlugin.js +2 -3
  45. package/lib/FlagDependencyExportsPlugin.js +76 -19
  46. package/lib/FlagDependencyUsagePlugin.js +40 -49
  47. package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
  48. package/lib/Generator.js +36 -15
  49. package/lib/HotModuleReplacementPlugin.js +16 -44
  50. package/lib/IgnorePlugin.js +8 -4
  51. package/lib/IgnoreWarningsPlugin.js +2 -2
  52. package/lib/InitFragment.js +8 -4
  53. package/lib/JavascriptMetaInfoPlugin.js +35 -4
  54. package/lib/LazyBarrel.js +3 -4
  55. package/lib/LibraryTemplatePlugin.js +10 -6
  56. package/lib/LoaderOptionsPlugin.js +7 -3
  57. package/lib/LoaderTargetPlugin.js +1 -1
  58. package/lib/MainTemplate.js +49 -42
  59. package/lib/ManifestPlugin.js +12 -11
  60. package/lib/Module.js +62 -33
  61. package/lib/ModuleFactory.js +3 -3
  62. package/lib/ModuleFilenameHelpers.js +9 -4
  63. package/lib/ModuleGraph.js +195 -21
  64. package/lib/ModuleGraphConnection.js +6 -13
  65. package/lib/ModuleInfoHeaderPlugin.js +8 -10
  66. package/lib/ModuleTemplate.js +62 -63
  67. package/lib/MultiCompiler.js +130 -64
  68. package/lib/MultiStats.js +40 -9
  69. package/lib/MultiWatching.js +3 -3
  70. package/lib/NoEmitOnErrorsPlugin.js +1 -1
  71. package/lib/NodeStuffPlugin.js +29 -19
  72. package/lib/NormalModule.js +152 -103
  73. package/lib/NormalModuleFactory.js +555 -110
  74. package/lib/NormalModuleReplacementPlugin.js +5 -8
  75. package/lib/NullFactory.js +6 -2
  76. package/lib/OptionsApply.js +7 -3
  77. package/lib/Parser.js +7 -3
  78. package/lib/PlatformPlugin.js +2 -2
  79. package/lib/PrefetchPlugin.js +1 -1
  80. package/lib/ProgressPlugin.js +16 -13
  81. package/lib/ProvidePlugin.js +3 -5
  82. package/lib/RawModule.js +25 -17
  83. package/lib/RecordIdsPlugin.js +3 -3
  84. package/lib/RequestShortener.js +1 -1
  85. package/lib/ResolverFactory.js +2 -2
  86. package/lib/RuntimeGlobals.js +22 -10
  87. package/lib/RuntimeModule.js +29 -19
  88. package/lib/RuntimePlugin.js +335 -169
  89. package/lib/RuntimeTemplate.js +2761 -316
  90. package/lib/SelfModuleFactory.js +7 -3
  91. package/lib/SourceMapDevToolModuleOptionsPlugin.js +6 -2
  92. package/lib/SourceMapDevToolPlugin.js +30 -20
  93. package/lib/Stats.js +3 -4
  94. package/lib/Template.js +32 -22
  95. package/lib/TemplatedPathPlugin.js +96 -14
  96. package/lib/UseStrictPlugin.js +4 -6
  97. package/lib/WarnCaseSensitiveModulesPlugin.js +4 -4
  98. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  99. package/lib/WarnNoModeSetPlugin.js +1 -1
  100. package/lib/WatchIgnorePlugin.js +8 -6
  101. package/lib/Watching.js +8 -8
  102. package/lib/WebpackIsIncludedPlugin.js +2 -4
  103. package/lib/WebpackOptionsApply.js +308 -18
  104. package/lib/WebpackOptionsDefaulter.js +6 -2
  105. package/lib/asset/AssetBytesGenerator.js +12 -10
  106. package/lib/asset/AssetBytesParser.js +2 -4
  107. package/lib/asset/AssetGenerator.js +188 -95
  108. package/lib/asset/AssetModule.js +7 -3
  109. package/lib/asset/AssetModulesPlugin.js +110 -38
  110. package/lib/asset/AssetParser.js +9 -7
  111. package/lib/asset/AssetSourceGenerator.js +60 -13
  112. package/lib/asset/AssetSourceParser.js +2 -4
  113. package/lib/asset/RawDataUrlModule.js +24 -16
  114. package/lib/asset/WebManifestGenerator.js +8 -10
  115. package/lib/asset/WebManifestParser.js +24 -10
  116. package/lib/async-modules/AsyncModuleHelpers.js +12 -6
  117. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  118. package/lib/async-modules/InferAsyncModulesPlugin.js +2 -2
  119. package/lib/async-modules/isGeneratorLowered.js +4 -4
  120. package/lib/buildChunkGraph.js +36 -27
  121. package/lib/bun/BunTargetPlugin.js +1 -1
  122. package/lib/cache/AddBuildDependenciesPlugin.js +1 -1
  123. package/lib/cache/AddManagedPathsPlugin.js +1 -1
  124. package/lib/cache/IdleFileCachePlugin.js +2 -2
  125. package/lib/cache/MemoryCachePlugin.js +18 -10
  126. package/lib/cache/MemoryWithGcCachePlugin.js +34 -22
  127. package/lib/cache/PackFileCacheStrategy.js +30 -23
  128. package/lib/cache/ResolverCachePlugin.js +38 -18
  129. package/lib/cache/getLazyHashedEtag.js +1 -2
  130. package/lib/cache/mergeEtags.js +1 -1
  131. package/lib/cli.js +1 -3
  132. package/lib/config/browserslistTargetHandler.js +41 -5
  133. package/lib/config/defaults.js +270 -78
  134. package/lib/config/defineConfig.js +10 -2
  135. package/lib/config/getClaimedAssetTypes.js +65 -0
  136. package/lib/config/normalization.js +46 -16
  137. package/lib/config/target.js +46 -3
  138. package/lib/container/ContainerEntryDependency.js +1 -1
  139. package/lib/container/ContainerEntryModule.js +24 -15
  140. package/lib/container/ContainerEntryModuleFactory.js +7 -3
  141. package/lib/container/ContainerPlugin.js +9 -10
  142. package/lib/container/ContainerReferencePlugin.js +6 -2
  143. package/lib/container/FallbackDependency.js +1 -1
  144. package/lib/container/FallbackModule.js +24 -17
  145. package/lib/container/FallbackModuleFactory.js +7 -3
  146. package/lib/container/HoistContainerReferencesPlugin.js +6 -11
  147. package/lib/container/ModuleFederationPlugin.js +7 -24
  148. package/lib/container/RemoteModule.js +27 -19
  149. package/lib/container/RemoteRuntimeModule.js +10 -8
  150. package/lib/container/moduleFederationHooks.js +32 -0
  151. package/lib/css/CssGenerator.js +171 -43
  152. package/lib/css/CssInjectStyleRuntimeModule.js +7 -5
  153. package/lib/css/CssLoadingRuntimeModule.js +84 -32
  154. package/lib/css/CssModule.js +10 -7
  155. package/lib/css/CssModulesPlugin.js +172 -100
  156. package/lib/css/CssParser.js +1113 -568
  157. package/lib/css/CssServerStylesRuntimeModule.js +54 -0
  158. package/lib/css/cssMinify.js +168 -0
  159. package/lib/css/data.js +5334 -0
  160. package/lib/css/syntax.js +9647 -232
  161. package/lib/debug/ProfilingPlugin.js +14 -9
  162. package/lib/deno/DenoTargetPlugin.js +1 -1
  163. package/lib/dependencies/AMDDefineDependency.js +112 -87
  164. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +30 -17
  165. package/lib/dependencies/AMDPlugin.js +9 -7
  166. package/lib/dependencies/AMDRequireArrayDependency.js +5 -5
  167. package/lib/dependencies/AMDRequireContextDependency.js +2 -2
  168. package/lib/dependencies/AMDRequireDependenciesBlock.js +1 -1
  169. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +25 -14
  170. package/lib/dependencies/AMDRequireDependency.js +8 -7
  171. package/lib/dependencies/AMDRequireItemDependency.js +1 -1
  172. package/lib/dependencies/AMDRuntimeModules.js +21 -1
  173. package/lib/dependencies/BuildTimeConstDependency.js +102 -0
  174. package/lib/dependencies/CachedConstDependency.js +11 -8
  175. package/lib/dependencies/CommonJsDependencyHelpers.js +67 -46
  176. package/lib/dependencies/CommonJsExportRequireDependency.js +121 -45
  177. package/lib/dependencies/CommonJsExportsDependency.js +53 -49
  178. package/lib/dependencies/CommonJsExportsParserPlugin.js +207 -25
  179. package/lib/dependencies/CommonJsFullRequireDependency.js +119 -34
  180. package/lib/dependencies/CommonJsImportsParserPlugin.js +100 -50
  181. package/lib/dependencies/CommonJsObjectExportDependency.js +188 -0
  182. package/lib/dependencies/CommonJsPlugin.js +35 -6
  183. package/lib/dependencies/CommonJsRequireContextDependency.js +5 -6
  184. package/lib/dependencies/CommonJsRequireDependency.js +170 -27
  185. package/lib/dependencies/CommonJsSelfReferenceDependency.js +63 -38
  186. package/lib/dependencies/ConstDependency.js +8 -9
  187. package/lib/dependencies/ContextDependency.js +12 -8
  188. package/lib/dependencies/ContextDependencyHelpers.js +14 -9
  189. package/lib/dependencies/ContextDependencyTemplateAsId.js +4 -4
  190. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +24 -11
  191. package/lib/dependencies/ContextElementDependency.js +31 -12
  192. package/lib/dependencies/CreateRequireParserPlugin.js +12 -7
  193. package/lib/dependencies/CreateScriptUrlDependency.js +4 -4
  194. package/lib/dependencies/CssIcssExportDependency.js +56 -28
  195. package/lib/dependencies/CssIcssImportDependency.js +17 -13
  196. package/lib/dependencies/CssIcssSymbolDependency.js +9 -10
  197. package/lib/dependencies/CssImportDependency.js +18 -9
  198. package/lib/dependencies/CssUrlDependency.js +17 -13
  199. package/lib/dependencies/DllEntryDependency.js +1 -1
  200. package/lib/dependencies/DynamicExports.js +2 -2
  201. package/lib/dependencies/ExportBindingInitFragment.js +36 -9
  202. package/lib/dependencies/ExportsInfoDependency.js +7 -8
  203. package/lib/dependencies/ExternalModuleDependency.js +9 -5
  204. package/lib/dependencies/ExternalModuleInitFragment.js +2 -2
  205. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +8 -5
  206. package/lib/dependencies/HarmonyAcceptDependency.js +5 -5
  207. package/lib/dependencies/HarmonyCompatibilityDependency.js +52 -17
  208. package/lib/dependencies/HarmonyDetectionParserPlugin.js +11 -7
  209. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +23 -14
  210. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +80 -12
  211. package/lib/dependencies/HarmonyExportExpressionDependency.js +23 -18
  212. package/lib/dependencies/HarmonyExportHeaderDependency.js +7 -7
  213. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +286 -80
  214. package/lib/dependencies/HarmonyExportInitFragment.js +18 -6
  215. package/lib/dependencies/HarmonyExportSpecifierDependency.js +51 -14
  216. package/lib/dependencies/HarmonyExports.js +7 -4
  217. package/lib/dependencies/HarmonyImportDependency.js +121 -60
  218. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +124 -38
  219. package/lib/dependencies/HarmonyImportGuard.js +20 -30
  220. package/lib/dependencies/HarmonyImportSideEffectDependency.js +152 -9
  221. package/lib/dependencies/HarmonyImportSpecifierDependency.js +97 -49
  222. package/lib/dependencies/HarmonyModulesPlugin.js +7 -3
  223. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -3
  224. package/lib/dependencies/HtmlEntryDependency.js +49 -31
  225. package/lib/dependencies/HtmlInlineHtmlDependency.js +7 -8
  226. package/lib/dependencies/HtmlInlineScriptDependency.js +11 -8
  227. package/lib/dependencies/HtmlInlineStyleDependency.js +7 -10
  228. package/lib/dependencies/HtmlSourceDependency.js +22 -14
  229. package/lib/dependencies/ImportContextDependency.js +45 -5
  230. package/lib/dependencies/ImportDependency.js +33 -50
  231. package/lib/dependencies/ImportEagerDependency.js +6 -9
  232. package/lib/dependencies/ImportMetaContextDependency.js +2 -2
  233. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +14 -13
  234. package/lib/dependencies/ImportMetaContextPlugin.js +7 -3
  235. package/lib/dependencies/ImportMetaGlobDependency.js +2 -2
  236. package/lib/dependencies/ImportMetaGlobDependencyParserPlugin.js +2 -3
  237. package/lib/dependencies/ImportMetaGlobHelpers.js +19 -22
  238. package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -1
  239. package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -1
  240. package/lib/dependencies/ImportMetaPlugin.js +154 -71
  241. package/lib/dependencies/ImportMetaResolveDependency.js +3 -4
  242. package/lib/dependencies/ImportParserPlugin.js +73 -49
  243. package/lib/dependencies/ImportPhase.js +12 -5
  244. package/lib/dependencies/ImportPlugin.js +7 -3
  245. package/lib/dependencies/ImportWeakDependency.js +6 -9
  246. package/lib/dependencies/JsonExportsDependency.js +11 -7
  247. package/lib/dependencies/LoaderDependency.js +2 -2
  248. package/lib/dependencies/LoaderImportDependency.js +2 -2
  249. package/lib/dependencies/LoaderPlugin.js +11 -7
  250. package/lib/dependencies/LocalModuleDependency.js +5 -5
  251. package/lib/dependencies/LocalModulesHelpers.js +1 -1
  252. package/lib/dependencies/ModuleDecoratorDependency.js +6 -7
  253. package/lib/dependencies/ModuleDependency.js +9 -6
  254. package/lib/dependencies/ModuleDependencyTemplateAsId.js +4 -4
  255. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +3 -3
  256. package/lib/dependencies/ModuleHotAcceptDependency.js +1 -1
  257. package/lib/dependencies/ModuleHotDeclineDependency.js +1 -1
  258. package/lib/dependencies/ModuleInitFragmentDependency.js +24 -10
  259. package/lib/dependencies/NullDependency.js +3 -3
  260. package/lib/dependencies/ProvidedDependency.js +14 -10
  261. package/lib/dependencies/PureExpressionDependency.js +9 -10
  262. package/lib/dependencies/RequireContextDependency.js +2 -2
  263. package/lib/dependencies/RequireContextDependencyParserPlugin.js +2 -4
  264. package/lib/dependencies/RequireContextPlugin.js +8 -4
  265. package/lib/dependencies/RequireEnsureDependenciesBlock.js +2 -2
  266. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +5 -8
  267. package/lib/dependencies/RequireEnsureDependency.js +8 -7
  268. package/lib/dependencies/RequireEnsurePlugin.js +7 -3
  269. package/lib/dependencies/RequireHeaderDependency.js +50 -12
  270. package/lib/dependencies/RequireIncludeDependency.js +6 -6
  271. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +2 -3
  272. package/lib/dependencies/RequireIncludePlugin.js +7 -3
  273. package/lib/dependencies/RequireJsStuffPlugin.js +7 -3
  274. package/lib/dependencies/RequireResolveContextDependency.js +2 -2
  275. package/lib/dependencies/RequireResolveDependency.js +4 -4
  276. package/lib/dependencies/RequireResolveHeaderDependency.js +4 -4
  277. package/lib/dependencies/RuntimeRequirementsDependency.js +5 -6
  278. package/lib/dependencies/StaticExportsDependency.js +2 -2
  279. package/lib/dependencies/SystemPlugin.js +10 -6
  280. package/lib/dependencies/SystemRuntimeModule.js +10 -0
  281. package/lib/dependencies/TopLevelAwaitDependency.js +11 -7
  282. package/lib/dependencies/URLContextDependency.js +2 -2
  283. package/lib/dependencies/URLDependency.js +110 -64
  284. package/lib/dependencies/URLPlugin.js +7 -3
  285. package/lib/dependencies/UnsupportedDependency.js +4 -4
  286. package/lib/dependencies/WebAssemblyExportImportedDependency.js +3 -4
  287. package/lib/dependencies/WebAssemblyImportDependency.js +5 -5
  288. package/lib/dependencies/WebpackIsIncludedDependency.js +6 -6
  289. package/lib/dependencies/WorkerAndWorkletPlugin.js +47 -28
  290. package/lib/dependencies/WorkerDependency.js +22 -22
  291. package/lib/dependencies/WorkletDependency.js +18 -21
  292. package/lib/dependencies/getFunctionExpression.js +8 -4
  293. package/lib/dependencies/importOptionsCheck.js +47 -0
  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/DotenvFileError.js +29 -0
  316. package/lib/errors/DuplicateModulesWarning.js +45 -0
  317. package/lib/errors/DynamicExportsWarning.js +30 -0
  318. package/lib/errors/EmbeddedSourceMapsWarning.js +25 -0
  319. package/lib/errors/EntrypointOverlapWarning.js +45 -0
  320. package/lib/errors/EnvironmentNotSupportAsyncWarning.js +2 -2
  321. package/lib/errors/EvalUsageWarning.js +28 -0
  322. package/lib/errors/HookWebpackError.js +5 -5
  323. package/lib/errors/HotspotsWarning.js +57 -0
  324. package/lib/errors/IgnoreErrorModuleFactory.js +7 -3
  325. package/lib/errors/ImportedBindingAssignmentError.js +30 -0
  326. package/lib/errors/InlinedAssetsWarning.js +36 -0
  327. package/lib/errors/InvalidDependenciesModuleWarning.js +1 -1
  328. package/lib/errors/LargeModulesWarning.js +45 -0
  329. package/lib/errors/LegacyJavascriptWarning.js +48 -0
  330. package/lib/errors/MissingSideEffectsWarning.js +36 -0
  331. package/lib/errors/MixedExportsWarning.js +41 -0
  332. package/lib/errors/ModuleDependencyError.js +13 -16
  333. package/lib/errors/ModuleDependencyWarning.js +5 -15
  334. package/lib/errors/ModuleHashingError.js +1 -1
  335. package/lib/errors/ModuleNotFoundError.js +2 -2
  336. package/lib/errors/ModuleParseError.js +1 -2
  337. package/lib/errors/ModuleRestoreError.js +1 -1
  338. package/lib/errors/ModuleStoreError.js +1 -1
  339. package/lib/errors/NodeStuffInWebError.js +1 -1
  340. package/lib/errors/OsDependentRuleWarning.js +31 -0
  341. package/lib/errors/PureAnnotationsWarning.js +36 -0
  342. package/lib/errors/RedundantDynamicImportWarning.js +31 -0
  343. package/lib/errors/ScopeHoistingBailoutsWarning.js +41 -0
  344. package/lib/errors/SplitChunksCappedWarning.js +41 -0
  345. package/lib/errors/TinyChunksWarning.js +40 -0
  346. package/lib/errors/TopLevelThisWarning.js +34 -0
  347. package/lib/errors/UnsplitVendorsWarning.js +42 -0
  348. package/lib/errors/UnsupportedFeatureWarning.js +1 -1
  349. package/lib/errors/UnusedAliasesWarning.js +29 -0
  350. package/lib/errors/UnusedDefinesWarning.js +29 -0
  351. package/lib/errors/UnusedExternalsWarning.js +29 -0
  352. package/lib/errors/UnusedReexportsWarning.js +42 -0
  353. package/lib/errors/UnusedRuleWarning.js +29 -0
  354. package/lib/errors/WebpackError.js +9 -5
  355. package/lib/errors/deriveStackFromNestedError.js +90 -0
  356. package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -0
  357. package/lib/esm/ModuleChunkFormatPlugin.js +37 -19
  358. package/lib/esm/ModuleChunkLoadingPlugin.js +86 -51
  359. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +161 -62
  360. package/lib/hmr/HotModuleReplacement.runtime.js +24 -5
  361. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  362. package/lib/hmr/LazyCompilationPlugin.js +45 -24
  363. package/lib/hmr/lazyCompilationBackend.js +9 -6
  364. package/lib/hmr/parserHooks.js +56 -0
  365. package/lib/html/HtmlGenerator.js +277 -77
  366. package/lib/html/HtmlModule.js +7 -3
  367. package/lib/html/HtmlModulesPlugin.js +366 -200
  368. package/lib/html/HtmlParser.js +31 -86
  369. package/lib/html/data.js +1928 -0
  370. package/lib/html/htmlMinify.js +288 -0
  371. package/lib/html/syntax.js +6034 -1384
  372. package/lib/ids/ChunkModuleIdRangePlugin.js +3 -3
  373. package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
  374. package/lib/ids/DeterministicModuleIdsPlugin.js +2 -2
  375. package/lib/ids/HashedModuleIdsPlugin.js +6 -2
  376. package/lib/ids/IdHelpers.js +7 -8
  377. package/lib/ids/NamedChunkIdsPlugin.js +1 -1
  378. package/lib/ids/NamedModuleIdsPlugin.js +1 -1
  379. package/lib/ids/NaturalChunkIdsPlugin.js +2 -2
  380. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  381. package/lib/ids/OccurrenceChunkIdsPlugin.js +7 -3
  382. package/lib/ids/OccurrenceModuleIdsPlugin.js +7 -3
  383. package/lib/ids/SyncModuleIdsPlugin.js +4 -4
  384. package/lib/index.js +10 -0
  385. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +3 -3
  386. package/lib/javascript/BasicEvaluatedExpression.js +18 -14
  387. package/lib/javascript/ChunkFormatHelpers.js +6 -6
  388. package/lib/javascript/ChunkHelpers.js +1 -1
  389. package/lib/javascript/CommonJsChunkFormatPlugin.js +11 -5
  390. package/lib/javascript/EnableChunkLoadingPlugin.js +2 -2
  391. package/lib/javascript/JavascriptGenerator.js +65 -165
  392. package/lib/javascript/JavascriptModule.js +9 -3
  393. package/lib/javascript/JavascriptModulesPlugin.js +103 -123
  394. package/lib/javascript/JavascriptParser.js +242 -99
  395. package/lib/javascript/JavascriptParserHelpers.js +10 -7
  396. package/lib/javascript/ScopeAnalyzer.js +1094 -0
  397. package/lib/javascript/StartupHelpers.js +55 -9
  398. package/lib/javascript/syntax.js +2678 -232
  399. package/lib/json/JsonData.js +8 -4
  400. package/lib/json/JsonGenerator.js +38 -16
  401. package/lib/json/JsonModule.js +7 -3
  402. package/lib/json/JsonModulesPlugin.js +1 -1
  403. package/lib/json/JsonParser.js +5 -6
  404. package/lib/library/AbstractLibraryPlugin.js +20 -14
  405. package/lib/library/AmdLibraryPlugin.js +11 -7
  406. package/lib/library/AssignLibraryPlugin.js +19 -13
  407. package/lib/library/EnableLibraryPlugin.js +2 -2
  408. package/lib/library/ExportPropertyLibraryPlugin.js +15 -8
  409. package/lib/library/JsonpLibraryPlugin.js +11 -7
  410. package/lib/library/ModuleLibraryPlugin.js +256 -64
  411. package/lib/library/SystemLibraryPlugin.js +12 -8
  412. package/lib/library/UmdLibraryPlugin.js +62 -25
  413. package/lib/loaders/LoaderRunner.js +47 -6
  414. package/lib/loaders/loadLoader.js +8 -4
  415. package/lib/logging/createConsoleLogger.js +7 -4
  416. package/lib/node/CommonJsChunkLoadingPlugin.js +36 -22
  417. package/lib/node/NodeEnvironmentPlugin.js +17 -3
  418. package/lib/node/NodeSourcePlugin.js +1 -1
  419. package/lib/node/NodeTargetPlugin.js +4 -3
  420. package/lib/node/NodeTemplatePlugin.js +1 -1
  421. package/lib/node/NodeWatchFileSystem.js +70 -9
  422. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +35 -38
  423. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +65 -19
  424. package/lib/node/ReadFileCompileWasmPlugin.js +28 -16
  425. package/lib/node/RequireChunkLoadingRuntimeModule.js +35 -38
  426. package/lib/node/nodeConsole.js +7 -3
  427. package/lib/optimize/AggressiveMergingPlugin.js +2 -2
  428. package/lib/optimize/AggressiveSplittingPlugin.js +9 -6
  429. package/lib/optimize/ConcatenatedModule.js +1030 -476
  430. package/lib/optimize/ConstExportsPlugin.js +16 -7
  431. package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -3
  432. package/lib/optimize/FlagIncludedChunksPlugin.js +3 -4
  433. package/lib/optimize/InlineExports.js +130 -5
  434. package/lib/optimize/InnerGraph.js +28 -12
  435. package/lib/optimize/InnerGraphPlugin.js +23 -18
  436. package/lib/optimize/LimitChunkCountPlugin.js +7 -3
  437. package/lib/optimize/MangleExportsPlugin.js +7 -8
  438. package/lib/optimize/MergeDuplicateChunksPlugin.js +7 -3
  439. package/lib/optimize/MinChunkSizePlugin.js +7 -3
  440. package/lib/optimize/ModuleConcatenationPlugin.js +51 -35
  441. package/lib/optimize/RealContentHashPlugin.js +121 -41
  442. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -2
  443. package/lib/optimize/RemoveParentModulesPlugin.js +4 -4
  444. package/lib/optimize/RuntimeChunkPlugin.js +2 -2
  445. package/lib/optimize/SideEffectsFlagPlugin.js +262 -39
  446. package/lib/optimize/SplitChunksPlugin.js +86 -24
  447. package/lib/performance/AssetsOverSizeLimitWarning.js +10 -2
  448. package/lib/performance/AsyncChunkWaterfallsPlugin.js +136 -0
  449. package/lib/performance/BroadContextsPlugin.js +142 -0
  450. package/lib/performance/CacheEffectivenessPlugin.js +125 -0
  451. package/lib/performance/ConflictingResourceHintsPlugin.js +99 -0
  452. package/lib/performance/DuplicateModulesPlugin.js +93 -0
  453. package/lib/performance/DuplicatePackagesPlugin.js +119 -0
  454. package/lib/performance/DuplicatePackagesWarning.js +84 -0
  455. package/lib/performance/DynamicExportsPlugin.js +120 -0
  456. package/lib/performance/EmbeddedSourceMapsPlugin.js +71 -0
  457. package/lib/performance/EntrypointOverlapPlugin.js +122 -0
  458. package/lib/performance/EntrypointsOverSizeLimitWarning.js +1 -1
  459. package/lib/performance/EvalUsagePlugin.js +115 -0
  460. package/lib/performance/HotspotsPlugin.js +296 -0
  461. package/lib/performance/InlinedAssetsPlugin.js +99 -0
  462. package/lib/performance/LargeModulesPlugin.js +126 -0
  463. package/lib/performance/LegacyJavascriptPlugin.js +139 -0
  464. package/lib/performance/MissingSideEffectsPlugin.js +138 -0
  465. package/lib/performance/MixedExportsPlugin.js +136 -0
  466. package/lib/performance/OsDependentRuleWarningPlugin.js +178 -0
  467. package/lib/performance/PureAnnotationsPlugin.js +219 -0
  468. package/lib/performance/RedundantDynamicImportsPlugin.js +225 -0
  469. package/lib/performance/RuntimeInLargeChunkWarning.js +27 -0
  470. package/lib/performance/ScopeHoistingBailoutsPlugin.js +164 -0
  471. package/lib/performance/SizeLimitsPlugin.js +139 -7
  472. package/lib/performance/SplitChunksCappedPlugin.js +99 -0
  473. package/lib/performance/TinyChunksPlugin.js +128 -0
  474. package/lib/performance/TopLevelThisPlugin.js +208 -0
  475. package/lib/performance/UnsplitVendorsPlugin.js +112 -0
  476. package/lib/performance/UnusedAliasesPlugin.js +253 -0
  477. package/lib/performance/UnusedDefinesPlugin.js +87 -0
  478. package/lib/performance/UnusedExternalsPlugin.js +110 -0
  479. package/lib/performance/UnusedReexportsPlugin.js +159 -0
  480. package/lib/performance/UnusedRuleWarningPlugin.js +105 -0
  481. package/lib/performance/getModuleSize.js +22 -0
  482. package/lib/performance/getSourceModules.js +22 -0
  483. package/lib/performance/hasOnlyUnusedExports.js +40 -0
  484. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +24 -10
  485. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +63 -46
  486. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -3
  487. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +2 -2
  488. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +2 -2
  489. package/lib/prefetch/ResourceHintPlugin.js +295 -79
  490. package/lib/prefetch/ResourceHintRuntimeModule.js +1 -21
  491. package/lib/prefetch/StartupAssetHintRuntimeModule.js +10 -133
  492. package/lib/prefetch/parseResourceHintOptions.js +31 -4
  493. package/lib/rules/BasicEffectRulePlugin.js +2 -2
  494. package/lib/rules/BasicMatcherRulePlugin.js +8 -4
  495. package/lib/rules/GlobMatcherRulePlugin.js +68 -0
  496. package/lib/rules/ObjectMatcherRulePlugin.js +12 -5
  497. package/lib/rules/RuleSetCompiler.js +146 -12
  498. package/lib/rules/UseEffectRulePlugin.js +18 -11
  499. package/lib/runtime/AsyncModuleGeneratorRuntimeModule.js +11 -1
  500. package/lib/runtime/AsyncModuleRuntimeModule.js +6 -2
  501. package/lib/runtime/AutoPublicPathRuntimeModule.js +15 -20
  502. package/lib/runtime/BaseUriRuntimeModule.js +33 -7
  503. package/lib/runtime/ChunkNameRuntimeModule.js +10 -0
  504. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +11 -1
  505. package/lib/runtime/CompatRuntimeModule.js +5 -3
  506. package/lib/runtime/ConcatenationWrapRuntimeModule.js +90 -0
  507. package/lib/runtime/ConstructRequireRuntimeModule.js +52 -0
  508. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +8 -6
  509. package/lib/runtime/CreateScriptRuntimeModule.js +11 -1
  510. package/lib/runtime/CreateScriptUrlRuntimeModule.js +11 -1
  511. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +56 -38
  512. package/lib/runtime/EnsureChunkRuntimeModule.js +18 -2
  513. package/lib/runtime/GetChunkFilenameRuntimeModule.js +62 -37
  514. package/lib/runtime/GetFullHashRuntimeModule.js +12 -2
  515. package/lib/runtime/GetMainFilenameRuntimeModule.js +12 -2
  516. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -2
  517. package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +16 -3
  518. package/lib/runtime/GlobalRuntimeModule.js +18 -0
  519. package/lib/runtime/HasOwnPropertyRuntimeModule.js +12 -2
  520. package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
  521. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +34 -7
  522. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +22 -6
  523. package/lib/runtime/NonceRuntimeModule.js +10 -0
  524. package/lib/runtime/OnChunksLoadedRuntimeModule.js +5 -3
  525. package/lib/runtime/PublicPathRuntimeModule.js +12 -2
  526. package/lib/runtime/RelativeUrlRuntimeModule.js +11 -1
  527. package/lib/runtime/RuntimeIdRuntimeModule.js +12 -2
  528. package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +11 -1
  529. package/lib/runtime/StartupChunkDependenciesPlugin.js +18 -9
  530. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -3
  531. package/lib/runtime/StartupEntrypointRuntimeModule.js +21 -4
  532. package/lib/runtime/SystemContextRuntimeModule.js +10 -0
  533. package/lib/runtime/ToBinaryRuntimeModule.js +1 -1
  534. package/lib/runtime/WorkerRuntimeModule.js +11 -1
  535. package/lib/runtime/baseUri.js +63 -0
  536. package/lib/schemes/DataUriPlugin.js +1 -1
  537. package/lib/schemes/FileUriPlugin.js +1 -1
  538. package/lib/schemes/HttpUriPlugin.js +46 -20
  539. package/lib/schemes/VirtualUrlPlugin.js +13 -7
  540. package/lib/serialization/AggregateErrorSerializer.js +1 -1
  541. package/lib/serialization/BinaryMiddleware.js +4 -4
  542. package/lib/serialization/ErrorObjectSerializer.js +1 -1
  543. package/lib/serialization/FileMiddleware.js +22 -9
  544. package/lib/serialization/ObjectMiddleware.js +139 -114
  545. package/lib/serialization/PlainObjectSerializer.js +19 -16
  546. package/lib/sharing/ConsumeSharedModule.js +30 -21
  547. package/lib/sharing/ConsumeSharedPlugin.js +18 -10
  548. package/lib/sharing/ConsumeSharedRuntimeModule.js +6 -9
  549. package/lib/sharing/ProvideSharedModule.js +25 -16
  550. package/lib/sharing/ProvideSharedModuleFactory.js +7 -3
  551. package/lib/sharing/ProvideSharedPlugin.js +8 -4
  552. package/lib/sharing/SharePlugin.js +17 -5
  553. package/lib/sharing/ShareRuntimeModule.js +4 -4
  554. package/lib/sharing/resolveMatchedConfigs.js +9 -6
  555. package/lib/sharing/utils.js +1 -3
  556. package/lib/stats/DefaultStatsFactoryPlugin.js +50 -29
  557. package/lib/stats/DefaultStatsPresetPlugin.js +17 -8
  558. package/lib/stats/DefaultStatsPrinterPlugin.js +36 -26
  559. package/lib/stats/StatsFactory.js +25 -26
  560. package/lib/stats/StatsPrinter.js +16 -12
  561. package/lib/typescript/TypeScriptPlugin.js +20 -24
  562. package/lib/url/URLParserPlugin.js +26 -13
  563. package/lib/util/ArrayQueue.js +3 -3
  564. package/lib/util/AsyncQueue.js +4 -3
  565. package/lib/util/Hash.js +5 -1
  566. package/lib/util/LazySet.js +35 -22
  567. package/lib/util/LocConverter.js +36 -13
  568. package/lib/util/SourceProcessor.js +1066 -24
  569. package/lib/util/StringXor.js +1 -1
  570. package/lib/util/URLAbsoluteSpecifier.js +3 -1
  571. package/lib/util/chainedImports.js +9 -5
  572. package/lib/util/cleverMerge.js +1 -1
  573. package/lib/util/comparators.js +45 -14
  574. package/lib/util/concatenate.js +203 -77
  575. package/lib/util/conventions.js +10 -2
  576. package/lib/util/createHash.js +2 -2
  577. package/lib/util/createHooksRegistry.js +8 -10
  578. package/lib/util/createMappings.js +25 -3
  579. package/lib/util/dataURL.js +225 -1
  580. package/lib/util/extractSourceMap.js +4 -3
  581. package/lib/util/findCaseMismatch.js +139 -0
  582. package/lib/util/formatLocation.js +1 -2
  583. package/lib/util/fs.js +22 -5
  584. package/lib/util/globUtils.js +298 -24
  585. package/lib/util/hash/BatchedHash.js +5 -1
  586. package/lib/util/hash/BulkUpdateHash.js +5 -1
  587. package/lib/util/hash/DebugHash.js +5 -1
  588. package/lib/util/hash/hash-digest.js +6 -2
  589. package/lib/util/identifier.js +4 -0
  590. package/lib/util/implicitTypeLoaderFallback.js +1 -1
  591. package/lib/util/internalSerializables.js +8 -0
  592. package/lib/util/lazyModule.js +56 -0
  593. package/lib/util/makeSerializable.js +7 -3
  594. package/lib/util/matchAlias.js +25 -0
  595. package/lib/util/mimeTypes.js +11 -5
  596. package/lib/util/nonNumericOnlyHash.js +4 -3
  597. package/lib/util/parseJson.js +5 -3
  598. package/lib/util/preloadModuleType.js +32 -0
  599. package/lib/util/registerExternalSerializer.js +7 -5
  600. package/lib/util/removeBOM.js +82 -1
  601. package/lib/util/runtime.js +2 -2
  602. package/lib/util/semver.js +1 -1
  603. package/lib/util/serialization.js +28 -28
  604. package/lib/util/source.js +2 -2
  605. package/lib/util/traverseDestructuringAssignmentProperties.js +6 -2
  606. package/lib/wasm/EnableWasmLoadingPlugin.js +10 -8
  607. package/lib/wasm/wasmModuleFilename.js +54 -0
  608. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +43 -21
  609. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +45 -21
  610. package/lib/wasm-async/AsyncWasmModule.js +3 -3
  611. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +4 -5
  612. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +57 -17
  613. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +34 -18
  614. package/lib/wasm-async/AsyncWebAssemblyParser.js +9 -8
  615. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +29 -8
  616. package/lib/wasm-sync/SyncWasmModule.js +2 -2
  617. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +18 -13
  618. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +4 -5
  619. package/lib/wasm-sync/WebAssemblyGenerator.js +18 -17
  620. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +4 -4
  621. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -7
  622. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +24 -11
  623. package/lib/wasm-sync/WebAssemblyParser.js +4 -6
  624. package/lib/wasm-sync/WebAssemblyUtils.js +2 -2
  625. package/lib/web/FetchCompileAsyncWasmPlugin.js +105 -19
  626. package/lib/web/FetchCompileWasmPlugin.js +48 -16
  627. package/lib/web/JsonpChunkLoadingPlugin.js +47 -23
  628. package/lib/web/JsonpChunkLoadingRuntimeModule.js +50 -20
  629. package/lib/web/JsonpTemplatePlugin.js +2 -2
  630. package/lib/webpack.js +22 -11
  631. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +60 -26
  632. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -32
  633. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -1
  634. package/module.d.ts +1 -0
  635. package/package.json +32 -25
  636. package/schemas/WebpackOptions.check.js +1 -1
  637. package/schemas/WebpackOptions.json +667 -34
  638. package/schemas/plugins/HtmlParserOptions.check.js +1 -1
  639. package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
  640. package/schemas/plugins/container/ContainerPlugin.json +10 -0
  641. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  642. package/schemas/plugins/container/ModuleFederationPlugin.json +10 -0
  643. package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +1 -1
  644. package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
  645. package/schemas/plugins/css/CssParserOptions.check.js +1 -1
  646. package/types.d.ts +3223 -465
  647. package/lib/runtime/CommonJsWrapRuntimeModule.js +0 -37
@@ -909,8 +909,15 @@
909
909
  "$ref": "#/definitions/EntryFilename"
910
910
  },
911
911
  "html": {
912
- "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.",
913
- "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
+ ]
914
921
  },
915
922
  "import": {
916
923
  "$ref": "#/definitions/EntryItem"
@@ -968,8 +975,15 @@
968
975
  "$ref": "#/definitions/Filename"
969
976
  },
970
977
  "html": {
971
- "description": "Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.",
972
- "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
+ ]
973
987
  },
974
988
  "import": {
975
989
  "description": "Module(s) that are loaded upon startup. The last one is exported.",
@@ -1132,6 +1146,12 @@
1132
1146
  "description": "The environment supports const and let for variable declarations.",
1133
1147
  "type": "boolean"
1134
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
+ },
1135
1155
  "destructuring": {
1136
1156
  "description": "The environment supports destructuring ('{ a, b } = obj').",
1137
1157
  "type": "boolean"
@@ -1202,6 +1222,12 @@
1202
1222
  "description": "The environment supports optional chaining ('obj?.a' or 'obj?.()').",
1203
1223
  "type": "boolean"
1204
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
+ },
1205
1231
  "spread": {
1206
1232
  "description": "The environment supports spread and rest in array/object literals and calls ('{ ...obj }', 'fn(...args)').",
1207
1233
  "type": "boolean"
@@ -1568,8 +1594,50 @@
1568
1594
  "enum": ["default", "esModule"],
1569
1595
  "added": "5.109.0"
1570
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"
1601
+ },
1571
1602
  "ExternalItemValue": {
1572
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.",
1573
1641
  "anyOf": [
1574
1642
  {
1575
1643
  "type": "array",
@@ -1588,33 +1656,25 @@
1588
1656
  "type": "string"
1589
1657
  },
1590
1658
  {
1591
- "description": "The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.",
1592
- "type": "object",
1593
- "additionalProperties": {
1594
- "description": "The target of the external for a specific external type.",
1595
- "anyOf": [
1596
- {
1597
- "type": "array",
1598
- "items": {
1599
- "description": "A part of the target of the external.",
1600
- "type": "string",
1601
- "minLength": 1
1602
- }
1603
- },
1604
- {
1605
- "description": "The target of the external.",
1606
- "type": "string"
1607
- }
1608
- ]
1609
- },
1610
- "properties": {
1611
- "interop": {
1612
- "$ref": "#/definitions/ExternalItemInterop"
1613
- }
1614
- }
1659
+ "$ref": "#/definitions/ExternalItemValueObject"
1615
1660
  }
1616
1661
  ]
1617
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
+ },
1618
1678
  "Externals": {
1619
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`.",
1620
1680
  "anyOf": [
@@ -1662,6 +1722,45 @@
1662
1722
  "description": "Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.",
1663
1723
  "type": "boolean"
1664
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
+ },
1665
1764
  "nwjs": {
1666
1765
  "description": "Treat NW.js legacy nw.gui module as external and load it via require() when used.",
1667
1766
  "type": "boolean"
@@ -3067,6 +3166,9 @@
3067
3166
  "type": {
3068
3167
  "$ref": "#/definitions/LibraryType"
3069
3168
  },
3169
+ "umdAmdContainer": {
3170
+ "$ref": "#/definitions/UmdAmdContainer"
3171
+ },
3070
3172
  "umdNamedDefine": {
3071
3173
  "$ref": "#/definitions/UmdNamedDefine"
3072
3174
  }
@@ -3501,8 +3603,18 @@
3501
3603
  "type": "boolean"
3502
3604
  },
3503
3605
  "minimize": {
3504
- "description": "Enable minimizing the output. Uses optimization.minimizer.",
3505
- "type": "boolean"
3606
+ "description": "Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.",
3607
+ "anyOf": [
3608
+ {
3609
+ "type": "boolean"
3610
+ },
3611
+ {
3612
+ "$ref": "#/definitions/OptimizationMinimizeOptions"
3613
+ }
3614
+ ]
3615
+ },
3616
+ "minimizeOptions": {
3617
+ "$ref": "#/definitions/OptimizationMinimizeOptions"
3506
3618
  },
3507
3619
  "minimizer": {
3508
3620
  "description": "Minimizer(s) to use for minimizing the output.",
@@ -3609,6 +3721,291 @@
3609
3721
  }
3610
3722
  }
3611
3723
  },
3724
+ "OptimizationMinimizeCss": {
3725
+ "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.",
3726
+ "type": "object",
3727
+ "additionalProperties": false,
3728
+ "properties": {
3729
+ "comments": {
3730
+ "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.",
3731
+ "anyOf": [
3732
+ {
3733
+ "enum": ["all", "some"]
3734
+ },
3735
+ {
3736
+ "instanceof": "RegExp",
3737
+ "tsType": "RegExp"
3738
+ },
3739
+ {
3740
+ "type": "boolean"
3741
+ },
3742
+ {
3743
+ "type": "string"
3744
+ },
3745
+ {
3746
+ "instanceof": "Function",
3747
+ "tsType": "((comment: string) => boolean)"
3748
+ }
3749
+ ],
3750
+ "added": "5.110.0"
3751
+ },
3752
+ "convertLengthUnits": {
3753
+ "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.",
3754
+ "type": "boolean",
3755
+ "added": "5.110.0"
3756
+ },
3757
+ "mergeLonghands": {
3758
+ "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.",
3759
+ "type": "boolean",
3760
+ "added": "5.110.0"
3761
+ },
3762
+ "mergeRules": {
3763
+ "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.",
3764
+ "type": "boolean",
3765
+ "added": "5.110.0"
3766
+ },
3767
+ "normalizeQuotes": {
3768
+ "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.",
3769
+ "type": "boolean",
3770
+ "added": "5.110.0"
3771
+ },
3772
+ "reduceFunctions": {
3773
+ "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.",
3774
+ "type": "boolean",
3775
+ "added": "5.110.0"
3776
+ },
3777
+ "removeDeadRules": {
3778
+ "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`.",
3779
+ "type": "boolean",
3780
+ "added": "5.110.0"
3781
+ },
3782
+ "rewriteCustomProperties": {
3783
+ "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.",
3784
+ "type": "boolean",
3785
+ "added": "5.110.0"
3786
+ },
3787
+ "shortenColors": {
3788
+ "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.",
3789
+ "type": "boolean",
3790
+ "added": "5.110.0"
3791
+ },
3792
+ "shortenMediaQueries": {
3793
+ "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.",
3794
+ "type": "boolean",
3795
+ "added": "5.110.0"
3796
+ },
3797
+ "shortenNumbers": {
3798
+ "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.",
3799
+ "type": "boolean",
3800
+ "added": "5.110.0"
3801
+ },
3802
+ "shortenSelectors": {
3803
+ "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.",
3804
+ "type": "boolean",
3805
+ "added": "5.110.0"
3806
+ },
3807
+ "shortenValues": {
3808
+ "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`.",
3809
+ "type": "boolean",
3810
+ "added": "5.110.0"
3811
+ },
3812
+ "vendorPrefixes": {
3813
+ "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.",
3814
+ "type": "boolean",
3815
+ "added": "5.110.0"
3816
+ }
3817
+ },
3818
+ "added": "5.110.0"
3819
+ },
3820
+ "OptimizationMinimizeHtml": {
3821
+ "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.",
3822
+ "type": "object",
3823
+ "additionalProperties": false,
3824
+ "properties": {
3825
+ "collapseBooleanAttributes": {
3826
+ "description": "Write a boolean attribute spelled with its own name (`disabled=\"disabled\"`) as the bare name the spec canonicalizes it to. On by default.",
3827
+ "type": "boolean",
3828
+ "added": "5.110.0"
3829
+ },
3830
+ "collapseWhitespace": {
3831
+ "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.",
3832
+ "anyOf": [
3833
+ {
3834
+ "enum": ["conservative", "smart", "all"]
3835
+ },
3836
+ {
3837
+ "type": "boolean"
3838
+ }
3839
+ ],
3840
+ "added": "5.110.0"
3841
+ },
3842
+ "comments": {
3843
+ "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.",
3844
+ "anyOf": [
3845
+ {
3846
+ "enum": ["all", "some"]
3847
+ },
3848
+ {
3849
+ "instanceof": "RegExp",
3850
+ "tsType": "RegExp"
3851
+ },
3852
+ {
3853
+ "type": "boolean"
3854
+ },
3855
+ {
3856
+ "type": "string"
3857
+ },
3858
+ {
3859
+ "instanceof": "Function",
3860
+ "tsType": "((comment: string) => boolean)"
3861
+ }
3862
+ ],
3863
+ "added": "5.110.0"
3864
+ },
3865
+ "mergeStyles": {
3866
+ "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.",
3867
+ "type": "boolean",
3868
+ "added": "5.110.0"
3869
+ },
3870
+ "minifyConditionalComments": {
3871
+ "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.",
3872
+ "type": "boolean",
3873
+ "added": "5.110.0"
3874
+ },
3875
+ "minifyJson": {
3876
+ "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.",
3877
+ "type": "boolean",
3878
+ "added": "5.110.0"
3879
+ },
3880
+ "minifySrcdoc": {
3881
+ "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.",
3882
+ "type": "boolean",
3883
+ "added": "5.110.0"
3884
+ },
3885
+ "minifyStyles": {
3886
+ "description": "Run the CSS minimizer over an inline `<style>` element and every `style=\"\"` attribute, with the options `optimization.minimize.css` names. On by default.",
3887
+ "type": "boolean",
3888
+ "added": "5.110.0"
3889
+ },
3890
+ "normalizeAttributeQuotes": {
3891
+ "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.",
3892
+ "type": "boolean",
3893
+ "added": "5.110.0"
3894
+ },
3895
+ "normalizeEnumeratedAttributes": {
3896
+ "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.",
3897
+ "type": "boolean",
3898
+ "added": "5.110.0"
3899
+ },
3900
+ "normalizeListAttributes": {
3901
+ "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.",
3902
+ "type": "boolean",
3903
+ "added": "5.110.0"
3904
+ },
3905
+ "normalizeNumericAttributes": {
3906
+ "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.",
3907
+ "type": "boolean",
3908
+ "added": "5.110.0"
3909
+ },
3910
+ "removeEmptyAttributes": {
3911
+ "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.",
3912
+ "type": "boolean",
3913
+ "added": "5.110.0"
3914
+ },
3915
+ "removeEmptyElements": {
3916
+ "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.",
3917
+ "type": "boolean",
3918
+ "added": "5.110.0"
3919
+ },
3920
+ "removeImpliedTags": {
3921
+ "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.",
3922
+ "anyOf": [
3923
+ {
3924
+ "enum": ["smart", "all"]
3925
+ },
3926
+ {
3927
+ "type": "boolean"
3928
+ }
3929
+ ],
3930
+ "added": "5.110.0"
3931
+ },
3932
+ "removeOptionalTags": {
3933
+ "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.",
3934
+ "type": "boolean",
3935
+ "added": "5.110.0"
3936
+ },
3937
+ "removeRedundantAttributes": {
3938
+ "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.",
3939
+ "anyOf": [
3940
+ {
3941
+ "enum": ["smart", "all"]
3942
+ },
3943
+ {
3944
+ "type": "boolean"
3945
+ }
3946
+ ],
3947
+ "added": "5.110.0"
3948
+ },
3949
+ "sortAttributes": {
3950
+ "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.",
3951
+ "type": "boolean",
3952
+ "added": "5.110.0"
3953
+ },
3954
+ "sortTokenLists": {
3955
+ "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.",
3956
+ "type": "boolean",
3957
+ "added": "5.110.0"
3958
+ }
3959
+ },
3960
+ "added": "5.110.0"
3961
+ },
3962
+ "OptimizationMinimizeJavascript": {
3963
+ "description": "Options handed as-is to the JavaScript minimizer (terser-compatible). Defaults to `{ compress: { passes: 2 } }`.",
3964
+ "type": "object",
3965
+ "additionalProperties": true,
3966
+ "added": "5.110.0"
3967
+ },
3968
+ "OptimizationMinimizeOptions": {
3969
+ "description": "Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.",
3970
+ "type": "object",
3971
+ "additionalProperties": false,
3972
+ "properties": {
3973
+ "css": {
3974
+ "description": "Minimize CSS assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.",
3975
+ "anyOf": [
3976
+ {
3977
+ "enum": [false]
3978
+ },
3979
+ {
3980
+ "$ref": "#/definitions/OptimizationMinimizeCss"
3981
+ }
3982
+ ]
3983
+ },
3984
+ "html": {
3985
+ "description": "Minimize HTML assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.",
3986
+ "anyOf": [
3987
+ {
3988
+ "enum": [false]
3989
+ },
3990
+ {
3991
+ "$ref": "#/definitions/OptimizationMinimizeHtml"
3992
+ }
3993
+ ]
3994
+ },
3995
+ "javascript": {
3996
+ "description": "Minimize JavaScript assets: `false` disables it, an object is handed as-is to the JavaScript minimizer.",
3997
+ "anyOf": [
3998
+ {
3999
+ "enum": [false]
4000
+ },
4001
+ {
4002
+ "$ref": "#/definitions/OptimizationMinimizeJavascript"
4003
+ }
4004
+ ]
4005
+ }
4006
+ },
4007
+ "added": "5.110.0"
4008
+ },
3612
4009
  "OptimizationNormalized": {
3613
4010
  "description": "Enables/Disables integrated optimizations.",
3614
4011
  "type": "object",
@@ -3683,6 +4080,9 @@
3683
4080
  "description": "Enable minimizing the output. Uses optimization.minimizer.",
3684
4081
  "type": "boolean"
3685
4082
  },
4083
+ "minimizeOptions": {
4084
+ "$ref": "#/definitions/OptimizationMinimizeOptions"
4085
+ },
3686
4086
  "minimizer": {
3687
4087
  "description": "Minimizer(s) to use for minimizing the output.",
3688
4088
  "type": "array",
@@ -5054,14 +5454,94 @@
5054
5454
  "type": "object",
5055
5455
  "additionalProperties": false,
5056
5456
  "properties": {
5457
+ "all": {
5458
+ "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'.",
5459
+ "type": "boolean",
5460
+ "added": "5.110.0"
5461
+ },
5057
5462
  "assetFilter": {
5058
5463
  "description": "Filter function to select assets that are checked.",
5059
5464
  "instanceof": "Function",
5060
5465
  "tsType": "import('../lib/performance/SizeLimitsPlugin').AssetFilter"
5061
5466
  },
5467
+ "asyncChunkWaterfalls": {
5468
+ "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).",
5469
+ "type": "boolean",
5470
+ "added": "5.110.0"
5471
+ },
5472
+ "broadContexts": {
5473
+ "description": "Report 'require.context' calls with no filter, which bundle every file under a directory (requires 'hints' to be enabled).",
5474
+ "type": "boolean",
5475
+ "added": "5.110.0"
5476
+ },
5477
+ "cacheEffectiveness": {
5478
+ "description": "Report how much of the module graph the cache reused, and the modules that can never be reused (requires 'hints' to be enabled).",
5479
+ "type": "boolean",
5480
+ "added": "5.110.0"
5481
+ },
5482
+ "circularDependencies": {
5483
+ "description": "Report groups of modules that import each other synchronously (requires 'hints' to be enabled).",
5484
+ "type": "boolean",
5485
+ "added": "5.110.0"
5486
+ },
5487
+ "conflictingResourceHints": {
5488
+ "description": "Report chunks asked for as both prefetch and preload from the same place, where the two directives contradict each other.",
5489
+ "type": "boolean",
5490
+ "added": "5.110.0"
5491
+ },
5492
+ "duplicateModules": {
5493
+ "description": "Report modules emitted into more than one chunk, and the bytes the extra copies cost (requires 'hints' to be enabled).",
5494
+ "type": "boolean",
5495
+ "added": "5.110.0"
5496
+ },
5497
+ "duplicatePackages": {
5498
+ "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).",
5499
+ "type": "boolean",
5500
+ "added": "5.110.0"
5501
+ },
5502
+ "dynamicExports": {
5503
+ "description": "Report modules whose exports cannot be read statically, which stops anything importing them from being tree-shaken (requires 'hints' to be enabled).",
5504
+ "type": "boolean",
5505
+ "added": "5.110.0"
5506
+ },
5507
+ "embeddedSourceMaps": {
5508
+ "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).",
5509
+ "type": "boolean",
5510
+ "added": "5.110.0"
5511
+ },
5512
+ "entrypointOverlap": {
5513
+ "description": "Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).",
5514
+ "type": "boolean",
5515
+ "added": "5.110.0"
5516
+ },
5517
+ "evalUsage": {
5518
+ "description": "Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).",
5519
+ "type": "boolean",
5520
+ "added": "5.110.0"
5521
+ },
5062
5522
  "hints": {
5063
- "description": "Sets the format of the hints: warnings, errors or nothing at all.",
5064
- "enum": [false, "warning", "error"]
5523
+ "description": "Sets the format of the hints: warnings, errors, stats-only or nothing at all.",
5524
+ "enum": [false, "warning", "error", "stats"]
5525
+ },
5526
+ "hotspots": {
5527
+ "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).",
5528
+ "type": "boolean",
5529
+ "added": "5.110.0"
5530
+ },
5531
+ "inlinedAssets": {
5532
+ "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).",
5533
+ "type": "boolean",
5534
+ "added": "5.110.0"
5535
+ },
5536
+ "largeModules": {
5537
+ "description": "Report a single module that makes up most of the chunk it is in (requires 'hints' to be enabled).",
5538
+ "type": "boolean",
5539
+ "added": "5.110.0"
5540
+ },
5541
+ "legacyJavascript": {
5542
+ "description": "Report polyfill packages that emulate language features the target already supports natively (requires 'hints' to be enabled).",
5543
+ "type": "boolean",
5544
+ "added": "5.110.0"
5065
5545
  },
5066
5546
  "maxAssetSize": {
5067
5547
  "description": "File size limit (in bytes) when exceeded, that webpack will provide performance hints.",
@@ -5070,6 +5550,81 @@
5070
5550
  "maxEntrypointSize": {
5071
5551
  "description": "Total size of an entry point (in bytes).",
5072
5552
  "type": "number"
5553
+ },
5554
+ "missingSideEffects": {
5555
+ "description": "Report packages that keep unused code in the bundle because their package.json does not declare 'sideEffects' (requires 'hints' to be enabled).",
5556
+ "type": "boolean",
5557
+ "added": "5.110.0"
5558
+ },
5559
+ "mixedExports": {
5560
+ "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).",
5561
+ "type": "boolean",
5562
+ "added": "5.110.0"
5563
+ },
5564
+ "osDependentRules": {
5565
+ "description": "Report conditions in 'module.rules' that hardcode a path separator, so they only match on one operating system.",
5566
+ "type": "boolean",
5567
+ "added": "5.110.0"
5568
+ },
5569
+ "pureAnnotations": {
5570
+ "description": "Report '/*#__PURE__*/' annotations that sit somewhere the parser does not read them (requires 'hints' to be enabled).",
5571
+ "type": "boolean",
5572
+ "added": "5.110.0"
5573
+ },
5574
+ "redundantDynamicImports": {
5575
+ "description": "Report 'import()' calls whose module is already loaded where the call runs, so they defer nothing (requires 'hints' to be enabled).",
5576
+ "type": "boolean",
5577
+ "added": "5.110.0"
5578
+ },
5579
+ "scopeHoistingBailouts": {
5580
+ "description": "Report modules that could not be merged into their importer's scope, and why (requires 'hints' to be enabled).",
5581
+ "type": "boolean",
5582
+ "added": "5.110.0"
5583
+ },
5584
+ "splitChunksCapped": {
5585
+ "description": "Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).",
5586
+ "type": "boolean",
5587
+ "added": "5.110.0"
5588
+ },
5589
+ "tinyChunks": {
5590
+ "description": "Report chunks loaded on demand that carry less than 'optimization.splitChunks.minSize' (requires 'hints' to be enabled).",
5591
+ "type": "boolean",
5592
+ "added": "5.110.0"
5593
+ },
5594
+ "topLevelThis": {
5595
+ "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).",
5596
+ "type": "boolean",
5597
+ "added": "5.110.0"
5598
+ },
5599
+ "unsplitVendors": {
5600
+ "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).",
5601
+ "type": "boolean",
5602
+ "added": "5.110.0"
5603
+ },
5604
+ "unusedAliases": {
5605
+ "description": "Report 'resolve.alias' entries that no request matched.",
5606
+ "type": "boolean",
5607
+ "added": "5.110.0"
5608
+ },
5609
+ "unusedDefines": {
5610
+ "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.",
5611
+ "type": "boolean",
5612
+ "added": "5.110.0"
5613
+ },
5614
+ "unusedExternals": {
5615
+ "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.",
5616
+ "type": "boolean",
5617
+ "added": "5.110.0"
5618
+ },
5619
+ "unusedReexports": {
5620
+ "description": "Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).",
5621
+ "type": "boolean",
5622
+ "added": "5.110.0"
5623
+ },
5624
+ "unusedRules": {
5625
+ "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.",
5626
+ "type": "boolean",
5627
+ "added": "5.110.0"
5073
5628
  }
5074
5629
  }
5075
5630
  },
@@ -5619,6 +6174,10 @@
5619
6174
  "type": "object",
5620
6175
  "additionalProperties": false,
5621
6176
  "properties": {
6177
+ "dedupe": {
6178
+ "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).",
6179
+ "type": "boolean"
6180
+ },
5622
6181
  "initial": {
5623
6182
  "$ref": "#/definitions/ResourceHintsInitial"
5624
6183
  },
@@ -5748,6 +6307,18 @@
5748
6307
  ]
5749
6308
  }
5750
6309
  },
6310
+ "RuleSetGlob": {
6311
+ "description": "A glob pattern matched against a path, using `/` as path separator on every OS; a `!` prefix excludes what it matches.",
6312
+ "type": "string",
6313
+ "minLength": 1
6314
+ },
6315
+ "RuleSetGlobs": {
6316
+ "description": "A list of glob patterns.",
6317
+ "type": "array",
6318
+ "items": {
6319
+ "$ref": "#/definitions/RuleSetGlob"
6320
+ }
6321
+ },
5751
6322
  "RuleSetLoader": {
5752
6323
  "description": "A loader request.",
5753
6324
  "type": "string",
@@ -5765,7 +6336,7 @@
5765
6336
  ]
5766
6337
  },
5767
6338
  "RuleSetLogicalConditions": {
5768
- "description": "Logic operators used in a condition matcher.",
6339
+ "description": "Logic operators and glob patterns used in a condition matcher.",
5769
6340
  "type": "object",
5770
6341
  "additionalProperties": false,
5771
6342
  "properties": {
@@ -5777,6 +6348,18 @@
5777
6348
  }
5778
6349
  ]
5779
6350
  },
6351
+ "glob": {
6352
+ "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.",
6353
+ "anyOf": [
6354
+ {
6355
+ "$ref": "#/definitions/RuleSetGlob"
6356
+ },
6357
+ {
6358
+ "$ref": "#/definitions/RuleSetGlobs"
6359
+ }
6360
+ ],
6361
+ "added": "5.110.0"
6362
+ },
5780
6363
  "not": {
5781
6364
  "description": "Logical NOT.",
5782
6365
  "oneOf": [
@@ -5796,7 +6379,7 @@
5796
6379
  }
5797
6380
  },
5798
6381
  "RuleSetLogicalConditionsAbsolute": {
5799
- "description": "Logic operators used in a condition matcher.",
6382
+ "description": "Logic operators and glob patterns used in a condition matcher.",
5800
6383
  "type": "object",
5801
6384
  "additionalProperties": false,
5802
6385
  "properties": {
@@ -5808,6 +6391,18 @@
5808
6391
  }
5809
6392
  ]
5810
6393
  },
6394
+ "glob": {
6395
+ "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.",
6396
+ "anyOf": [
6397
+ {
6398
+ "$ref": "#/definitions/RuleSetGlob"
6399
+ },
6400
+ {
6401
+ "$ref": "#/definitions/RuleSetGlobs"
6402
+ }
6403
+ ],
6404
+ "added": "5.110.0"
6405
+ },
5811
6406
  "not": {
5812
6407
  "description": "Logical NOT.",
5813
6408
  "oneOf": [
@@ -5861,6 +6456,15 @@
5861
6456
  "$ref": "#/definitions/RuleSetConditionOrConditions"
5862
6457
  }
5863
6458
  },
6459
+ "descriptionRelativePath": {
6460
+ "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.",
6461
+ "oneOf": [
6462
+ {
6463
+ "$ref": "#/definitions/RuleSetConditionOrConditions"
6464
+ }
6465
+ ],
6466
+ "added": "5.110.0"
6467
+ },
5864
6468
  "enforce": {
5865
6469
  "description": "Enforce this rule as pre or post step.",
5866
6470
  "enum": ["pre", "post"]
@@ -5881,6 +6485,18 @@
5881
6485
  "description": "The options for the module generator.",
5882
6486
  "type": "object"
5883
6487
  },
6488
+ "glob": {
6489
+ "description": "Match the module resource against glob patterns, `!` in front of a pattern excludes it. Combines with `test`, `include` and `exclude`.",
6490
+ "anyOf": [
6491
+ {
6492
+ "$ref": "#/definitions/RuleSetGlob"
6493
+ },
6494
+ {
6495
+ "$ref": "#/definitions/RuleSetGlobs"
6496
+ }
6497
+ ],
6498
+ "added": "5.110.0"
6499
+ },
5884
6500
  "include": {
5885
6501
  "description": "Shortcut for resource.include.",
5886
6502
  "oneOf": [
@@ -6613,6 +7229,16 @@
6613
7229
  "description": "Add the hash of the compilation.",
6614
7230
  "type": "boolean"
6615
7231
  },
7232
+ "hints": {
7233
+ "description": "Add performance hints reported with 'performance.hints: \"stats\"'.",
7234
+ "type": "boolean",
7235
+ "added": "5.110.0"
7236
+ },
7237
+ "hintsCount": {
7238
+ "description": "Add the number of performance hints.",
7239
+ "type": "boolean",
7240
+ "added": "5.110.0"
7241
+ },
6616
7242
  "ids": {
6617
7243
  "description": "Add ids.",
6618
7244
  "type": "boolean"
@@ -6848,6 +7474,13 @@
6848
7474
  }
6849
7475
  }
6850
7476
  },
7477
+ "UmdAmdContainer": {
7478
+ "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.",
7479
+ "type": "string",
7480
+ "minLength": 1,
7481
+ "added": "5.110.0",
7482
+ "pattern": "^[A-Za-z_$][A-Za-z0-9_$]*(\\.[A-Za-z_$][A-Za-z0-9_$]*)*$"
7483
+ },
6851
7484
  "UmdNamedDefine": {
6852
7485
  "description": "If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.",
6853
7486
  "type": "boolean"