webpack 5.59.0 → 5.94.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 (570) hide show
  1. package/README.md +48 -38
  2. package/bin/webpack.js +34 -10
  3. package/hot/dev-server.js +19 -5
  4. package/hot/lazy-compilation-node.js +13 -1
  5. package/hot/lazy-compilation-web.js +9 -0
  6. package/hot/log-apply-result.js +5 -0
  7. package/hot/log.js +23 -4
  8. package/hot/only-dev-server.js +3 -2
  9. package/hot/poll.js +5 -2
  10. package/hot/signal.js +6 -2
  11. package/lib/APIPlugin.js +226 -122
  12. package/lib/AbstractMethodError.js +10 -5
  13. package/lib/AsyncDependenciesBlock.js +13 -5
  14. package/lib/AutomaticPrefetchPlugin.js +2 -1
  15. package/lib/BannerPlugin.js +33 -12
  16. package/lib/Cache.js +16 -12
  17. package/lib/CacheFacade.js +13 -16
  18. package/lib/CaseSensitiveModulesWarning.js +8 -8
  19. package/lib/Chunk.js +60 -33
  20. package/lib/ChunkGraph.js +207 -72
  21. package/lib/ChunkGroup.js +40 -20
  22. package/lib/ChunkTemplate.js +43 -0
  23. package/lib/CleanPlugin.js +117 -32
  24. package/lib/CodeGenerationResults.js +8 -7
  25. package/lib/CommentCompilationWarning.js +0 -1
  26. package/lib/CompatibilityPlugin.js +85 -46
  27. package/lib/Compilation.js +712 -392
  28. package/lib/Compiler.js +393 -172
  29. package/lib/ConcatenationScope.js +10 -13
  30. package/lib/ConditionalInitFragment.js +22 -14
  31. package/lib/ConstPlugin.js +104 -64
  32. package/lib/ContextExclusionPlugin.js +3 -3
  33. package/lib/ContextModule.js +283 -108
  34. package/lib/ContextModuleFactory.js +151 -63
  35. package/lib/ContextReplacementPlugin.js +25 -10
  36. package/lib/CssModule.js +166 -0
  37. package/lib/DefinePlugin.js +254 -148
  38. package/lib/DelegatedModule.js +29 -6
  39. package/lib/DelegatedModuleFactoryPlugin.js +42 -22
  40. package/lib/DelegatedPlugin.js +4 -0
  41. package/lib/DependenciesBlock.js +17 -2
  42. package/lib/Dependency.js +58 -29
  43. package/lib/DependencyTemplate.js +24 -3
  44. package/lib/DependencyTemplates.js +2 -2
  45. package/lib/DllEntryPlugin.js +18 -1
  46. package/lib/DllModule.js +21 -4
  47. package/lib/DllModuleFactory.js +2 -1
  48. package/lib/DllPlugin.js +9 -7
  49. package/lib/DllReferencePlugin.js +50 -19
  50. package/lib/EntryOptionPlugin.js +6 -1
  51. package/lib/EntryPlugin.js +7 -4
  52. package/lib/Entrypoint.js +2 -2
  53. package/lib/EnvironmentNotSupportAsyncWarning.js +52 -0
  54. package/lib/EnvironmentPlugin.js +5 -2
  55. package/lib/ErrorHelpers.js +65 -26
  56. package/lib/EvalDevToolModulePlugin.js +37 -13
  57. package/lib/EvalSourceMapDevToolPlugin.js +50 -20
  58. package/lib/ExportsInfo.js +234 -133
  59. package/lib/ExportsInfoApiPlugin.js +31 -15
  60. package/lib/ExternalModule.js +391 -129
  61. package/lib/ExternalModuleFactoryPlugin.js +65 -17
  62. package/lib/FileSystemInfo.js +1038 -523
  63. package/lib/FlagAllModulesAsUsedPlugin.js +27 -27
  64. package/lib/FlagDependencyExportsPlugin.js +352 -349
  65. package/lib/FlagDependencyUsagePlugin.js +10 -10
  66. package/lib/FlagEntryExportAsUsedPlugin.js +26 -23
  67. package/lib/Generator.js +16 -8
  68. package/lib/GraphHelpers.js +3 -2
  69. package/lib/HookWebpackError.js +11 -13
  70. package/lib/HotModuleReplacementPlugin.js +221 -128
  71. package/lib/IgnoreErrorModuleFactory.js +4 -4
  72. package/lib/IgnorePlugin.js +5 -4
  73. package/lib/IgnoreWarningsPlugin.js +6 -9
  74. package/lib/InitFragment.js +39 -15
  75. package/lib/JavascriptMetaInfoPlugin.js +27 -15
  76. package/lib/LibManifestPlugin.js +45 -16
  77. package/lib/LoaderOptionsPlugin.js +13 -3
  78. package/lib/MainTemplate.js +74 -21
  79. package/lib/Module.js +155 -34
  80. package/lib/ModuleBuildError.js +13 -11
  81. package/lib/ModuleDependencyError.js +6 -4
  82. package/lib/ModuleDependencyWarning.js +6 -4
  83. package/lib/ModuleError.js +10 -5
  84. package/lib/ModuleFactory.js +4 -4
  85. package/lib/ModuleFilenameHelpers.js +164 -54
  86. package/lib/ModuleGraph.js +93 -53
  87. package/lib/ModuleGraphConnection.js +27 -13
  88. package/lib/ModuleHashingError.js +29 -0
  89. package/lib/ModuleInfoHeaderPlugin.js +92 -33
  90. package/lib/ModuleNotFoundError.js +5 -2
  91. package/lib/ModuleParseError.js +17 -9
  92. package/lib/ModuleProfile.js +1 -0
  93. package/lib/ModuleRestoreError.js +3 -1
  94. package/lib/ModuleStoreError.js +3 -2
  95. package/lib/ModuleTemplate.js +33 -1
  96. package/lib/ModuleTypeConstants.js +168 -0
  97. package/lib/ModuleWarning.js +10 -5
  98. package/lib/MultiCompiler.js +115 -38
  99. package/lib/MultiStats.js +75 -33
  100. package/lib/MultiWatching.js +6 -2
  101. package/lib/NodeStuffPlugin.js +136 -37
  102. package/lib/NormalModule.js +437 -194
  103. package/lib/NormalModuleFactory.js +313 -116
  104. package/lib/NormalModuleReplacementPlugin.js +10 -4
  105. package/lib/NullFactory.js +1 -1
  106. package/lib/OptimizationStages.js +3 -3
  107. package/lib/Parser.js +1 -1
  108. package/lib/PlatformPlugin.js +39 -0
  109. package/lib/PrefetchPlugin.js +4 -0
  110. package/lib/ProgressPlugin.js +83 -28
  111. package/lib/ProvidePlugin.js +37 -19
  112. package/lib/RawModule.js +18 -5
  113. package/lib/RecordIdsPlugin.js +8 -8
  114. package/lib/RequireJsStuffPlugin.js +22 -15
  115. package/lib/ResolverFactory.js +8 -4
  116. package/lib/RuntimeGlobals.js +99 -65
  117. package/lib/RuntimeModule.js +17 -15
  118. package/lib/RuntimePlugin.js +116 -13
  119. package/lib/RuntimeTemplate.js +304 -102
  120. package/lib/SelfModuleFactory.js +12 -0
  121. package/lib/SizeFormatHelpers.js +2 -4
  122. package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -0
  123. package/lib/SourceMapDevToolPlugin.js +89 -42
  124. package/lib/Stats.js +12 -7
  125. package/lib/Template.js +30 -33
  126. package/lib/TemplatedPathPlugin.js +102 -34
  127. package/lib/UseStrictPlugin.js +37 -12
  128. package/lib/WarnCaseSensitiveModulesPlugin.js +12 -0
  129. package/lib/WarnDeprecatedOptionPlugin.js +6 -0
  130. package/lib/WatchIgnorePlugin.js +46 -13
  131. package/lib/Watching.js +139 -76
  132. package/lib/WebpackError.js +14 -5
  133. package/lib/WebpackIsIncludedPlugin.js +22 -13
  134. package/lib/WebpackOptionsApply.js +162 -56
  135. package/lib/WebpackOptionsDefaulter.js +10 -3
  136. package/lib/asset/AssetGenerator.js +351 -99
  137. package/lib/asset/AssetModulesPlugin.js +57 -33
  138. package/lib/asset/AssetParser.js +15 -6
  139. package/lib/asset/AssetSourceGenerator.js +30 -10
  140. package/lib/asset/AssetSourceParser.js +8 -2
  141. package/lib/asset/RawDataUrlModule.js +162 -0
  142. package/lib/async-modules/AwaitDependenciesInitFragment.js +16 -13
  143. package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
  144. package/lib/buildChunkGraph.js +376 -420
  145. package/lib/cache/AddManagedPathsPlugin.js +6 -1
  146. package/lib/cache/IdleFileCachePlugin.js +26 -13
  147. package/lib/cache/MemoryCachePlugin.js +1 -1
  148. package/lib/cache/MemoryWithGcCachePlugin.js +13 -7
  149. package/lib/cache/PackFileCacheStrategy.js +172 -94
  150. package/lib/cache/ResolverCachePlugin.js +115 -43
  151. package/lib/cache/getLazyHashedEtag.js +2 -2
  152. package/lib/cache/mergeEtags.js +16 -21
  153. package/lib/cli.js +195 -110
  154. package/lib/config/browserslistTargetHandler.js +106 -41
  155. package/lib/config/defaults.js +572 -154
  156. package/lib/config/normalization.js +361 -322
  157. package/lib/config/target.js +105 -66
  158. package/lib/container/ContainerEntryDependency.js +2 -1
  159. package/lib/container/ContainerEntryModule.js +27 -11
  160. package/lib/container/ContainerEntryModuleFactory.js +1 -1
  161. package/lib/container/ContainerExposedDependency.js +9 -0
  162. package/lib/container/ContainerPlugin.js +18 -12
  163. package/lib/container/ContainerReferencePlugin.js +1 -1
  164. package/lib/container/FallbackDependency.js +13 -0
  165. package/lib/container/FallbackItemDependency.js +3 -0
  166. package/lib/container/FallbackModule.js +19 -8
  167. package/lib/container/FallbackModuleFactory.js +1 -1
  168. package/lib/container/ModuleFederationPlugin.js +2 -0
  169. package/lib/container/RemoteModule.js +17 -4
  170. package/lib/container/RemoteRuntimeModule.js +31 -17
  171. package/lib/container/RemoteToExternalDependency.js +3 -0
  172. package/lib/container/options.js +18 -4
  173. package/lib/css/CssExportsGenerator.js +203 -0
  174. package/lib/css/CssGenerator.js +151 -0
  175. package/lib/css/CssLoadingRuntimeModule.js +592 -0
  176. package/lib/css/CssModulesPlugin.js +888 -0
  177. package/lib/css/CssParser.js +1049 -0
  178. package/lib/css/walkCssTokens.js +775 -0
  179. package/lib/debug/ProfilingPlugin.js +102 -54
  180. package/lib/dependencies/AMDDefineDependency.js +54 -10
  181. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +204 -61
  182. package/lib/dependencies/AMDPlugin.js +44 -24
  183. package/lib/dependencies/AMDRequireArrayDependency.js +34 -10
  184. package/lib/dependencies/AMDRequireContextDependency.js +15 -0
  185. package/lib/dependencies/AMDRequireDependenciesBlock.js +6 -0
  186. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +185 -54
  187. package/lib/dependencies/AMDRequireDependency.js +21 -6
  188. package/lib/dependencies/AMDRequireItemDependency.js +6 -0
  189. package/lib/dependencies/AMDRuntimeModules.js +4 -4
  190. package/lib/dependencies/CachedConstDependency.js +22 -1
  191. package/lib/dependencies/CommonJsDependencyHelpers.js +16 -2
  192. package/lib/dependencies/CommonJsExportRequireDependency.js +77 -47
  193. package/lib/dependencies/CommonJsExportsDependency.js +28 -5
  194. package/lib/dependencies/CommonJsExportsParserPlugin.js +111 -39
  195. package/lib/dependencies/CommonJsFullRequireDependency.js +42 -8
  196. package/lib/dependencies/CommonJsImportsParserPlugin.js +530 -130
  197. package/lib/dependencies/CommonJsPlugin.js +51 -26
  198. package/lib/dependencies/CommonJsRequireContextDependency.js +23 -2
  199. package/lib/dependencies/CommonJsRequireDependency.js +9 -1
  200. package/lib/dependencies/CommonJsSelfReferenceDependency.js +22 -8
  201. package/lib/dependencies/ConstDependency.js +12 -3
  202. package/lib/dependencies/ContextDependency.js +32 -5
  203. package/lib/dependencies/ContextDependencyHelpers.js +92 -62
  204. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +4 -1
  205. package/lib/dependencies/ContextElementDependency.js +41 -4
  206. package/lib/dependencies/CreateScriptUrlDependency.js +22 -1
  207. package/lib/dependencies/CriticalDependencyWarning.js +4 -1
  208. package/lib/dependencies/CssExportDependency.js +156 -0
  209. package/lib/dependencies/CssImportDependency.js +125 -0
  210. package/lib/dependencies/CssLocalIdentifierDependency.js +245 -0
  211. package/lib/dependencies/CssSelfLocalIdentifierDependency.js +111 -0
  212. package/lib/dependencies/CssUrlDependency.js +164 -0
  213. package/lib/dependencies/DelegatedSourceDependency.js +3 -0
  214. package/lib/dependencies/DllEntryDependency.js +14 -0
  215. package/lib/dependencies/DynamicExports.js +15 -11
  216. package/lib/dependencies/ExportsInfoDependency.js +26 -5
  217. package/lib/dependencies/ExternalModuleDependency.js +109 -0
  218. package/lib/dependencies/ExternalModuleInitFragment.js +133 -0
  219. package/lib/dependencies/HarmonyAcceptDependency.js +11 -2
  220. package/lib/dependencies/HarmonyAcceptImportDependency.js +9 -4
  221. package/lib/dependencies/HarmonyCompatibilityDependency.js +6 -5
  222. package/lib/dependencies/HarmonyDetectionParserPlugin.js +29 -3
  223. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +152 -0
  224. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +96 -51
  225. package/lib/dependencies/HarmonyExportExpressionDependency.js +21 -4
  226. package/lib/dependencies/HarmonyExportHeaderDependency.js +13 -0
  227. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +216 -108
  228. package/lib/dependencies/HarmonyExportInitFragment.js +21 -9
  229. package/lib/dependencies/HarmonyExportSpecifierDependency.js +12 -0
  230. package/lib/dependencies/HarmonyExports.js +13 -7
  231. package/lib/dependencies/HarmonyImportDependency.js +65 -19
  232. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +268 -74
  233. package/lib/dependencies/HarmonyImportSideEffectDependency.js +11 -5
  234. package/lib/dependencies/HarmonyImportSpecifierDependency.js +180 -36
  235. package/lib/dependencies/HarmonyModulesPlugin.js +33 -5
  236. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -3
  237. package/lib/dependencies/ImportContextDependency.js +15 -2
  238. package/lib/dependencies/ImportDependency.js +50 -12
  239. package/lib/dependencies/ImportEagerDependency.js +11 -6
  240. package/lib/dependencies/ImportMetaContextDependency.js +42 -0
  241. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +301 -0
  242. package/lib/dependencies/ImportMetaContextPlugin.js +72 -0
  243. package/lib/dependencies/ImportMetaHotAcceptDependency.js +6 -0
  244. package/lib/dependencies/ImportMetaHotDeclineDependency.js +6 -0
  245. package/lib/dependencies/ImportMetaPlugin.js +128 -59
  246. package/lib/dependencies/ImportParserPlugin.js +153 -83
  247. package/lib/dependencies/ImportPlugin.js +21 -7
  248. package/lib/dependencies/ImportWeakDependency.js +11 -6
  249. package/lib/dependencies/JsonExportsDependency.js +38 -30
  250. package/lib/dependencies/LoaderDependency.js +14 -0
  251. package/lib/dependencies/LoaderImportDependency.js +14 -0
  252. package/lib/dependencies/LoaderPlugin.js +54 -40
  253. package/lib/dependencies/LocalModule.js +17 -1
  254. package/lib/dependencies/LocalModuleDependency.js +15 -0
  255. package/lib/dependencies/LocalModulesHelpers.js +22 -4
  256. package/lib/dependencies/ModuleDecoratorDependency.js +9 -1
  257. package/lib/dependencies/ModuleDependency.js +24 -7
  258. package/lib/dependencies/ModuleDependencyTemplateAsId.js +2 -1
  259. package/lib/dependencies/ModuleHotAcceptDependency.js +6 -0
  260. package/lib/dependencies/ModuleHotDeclineDependency.js +6 -0
  261. package/lib/dependencies/PrefetchDependency.js +3 -0
  262. package/lib/dependencies/ProvidedDependency.js +43 -8
  263. package/lib/dependencies/PureExpressionDependency.js +73 -39
  264. package/lib/dependencies/RequireContextDependency.js +6 -16
  265. package/lib/dependencies/RequireContextDependencyParserPlugin.js +14 -6
  266. package/lib/dependencies/RequireContextPlugin.js +20 -7
  267. package/lib/dependencies/RequireEnsureDependenciesBlock.js +7 -0
  268. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +29 -12
  269. package/lib/dependencies/RequireEnsureDependency.js +16 -2
  270. package/lib/dependencies/RequireEnsureItemDependency.js +3 -0
  271. package/lib/dependencies/RequireEnsurePlugin.js +27 -7
  272. package/lib/dependencies/RequireHeaderDependency.js +14 -1
  273. package/lib/dependencies/RequireIncludeDependency.js +6 -1
  274. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +29 -5
  275. package/lib/dependencies/RequireIncludePlugin.js +25 -5
  276. package/lib/dependencies/RequireResolveContextDependency.js +19 -2
  277. package/lib/dependencies/RequireResolveDependency.js +8 -1
  278. package/lib/dependencies/RequireResolveHeaderDependency.js +18 -0
  279. package/lib/dependencies/RuntimeRequirementsDependency.js +9 -1
  280. package/lib/dependencies/StaticExportsDependency.js +8 -0
  281. package/lib/dependencies/SystemPlugin.js +49 -22
  282. package/lib/dependencies/SystemRuntimeModule.js +1 -1
  283. package/lib/dependencies/URLDependency.js +20 -13
  284. package/lib/dependencies/URLPlugin.js +115 -27
  285. package/lib/dependencies/UnsupportedDependency.js +13 -0
  286. package/lib/dependencies/WebAssemblyExportImportedDependency.js +14 -0
  287. package/lib/dependencies/WebAssemblyImportDependency.js +9 -1
  288. package/lib/dependencies/WebpackIsIncludedDependency.js +6 -1
  289. package/lib/dependencies/WorkerDependency.js +47 -3
  290. package/lib/dependencies/WorkerPlugin.js +143 -59
  291. package/lib/dependencies/getFunctionExpression.js +9 -0
  292. package/lib/dependencies/processExportInfo.js +3 -1
  293. package/lib/electron/ElectronTargetPlugin.js +1 -0
  294. package/lib/esm/ExportWebpackRequireRuntimeModule.js +3 -2
  295. package/lib/esm/ModuleChunkFormatPlugin.js +92 -55
  296. package/lib/esm/ModuleChunkLoadingPlugin.js +12 -1
  297. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +141 -25
  298. package/lib/formatLocation.js +1 -2
  299. package/lib/hmr/HotModuleReplacement.runtime.js +37 -25
  300. package/lib/hmr/HotModuleReplacementRuntimeModule.js +2 -1
  301. package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +13 -15
  302. package/lib/hmr/LazyCompilationPlugin.js +94 -41
  303. package/lib/hmr/lazyCompilationBackend.js +107 -44
  304. package/lib/ids/ChunkModuleIdRangePlugin.js +12 -3
  305. package/lib/ids/DeterministicChunkIdsPlugin.js +13 -6
  306. package/lib/ids/DeterministicModuleIdsPlugin.js +59 -35
  307. package/lib/ids/HashedModuleIdsPlugin.js +24 -16
  308. package/lib/ids/IdHelpers.js +59 -49
  309. package/lib/ids/NamedChunkIdsPlugin.js +13 -1
  310. package/lib/ids/NamedModuleIdsPlugin.js +20 -12
  311. package/lib/ids/NaturalModuleIdsPlugin.js +10 -13
  312. package/lib/ids/OccurrenceChunkIdsPlugin.js +6 -2
  313. package/lib/ids/OccurrenceModuleIdsPlugin.js +14 -11
  314. package/lib/ids/SyncModuleIdsPlugin.js +146 -0
  315. package/lib/index.js +44 -5
  316. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +9 -7
  317. package/lib/javascript/BasicEvaluatedExpression.js +133 -19
  318. package/lib/javascript/ChunkHelpers.js +33 -0
  319. package/lib/javascript/CommonJsChunkFormatPlugin.js +18 -15
  320. package/lib/javascript/EnableChunkLoadingPlugin.js +11 -6
  321. package/lib/javascript/JavascriptGenerator.js +37 -6
  322. package/lib/javascript/JavascriptModulesPlugin.js +523 -295
  323. package/lib/javascript/JavascriptParser.js +1591 -574
  324. package/lib/javascript/JavascriptParserHelpers.js +58 -37
  325. package/lib/javascript/StartupHelpers.js +69 -47
  326. package/lib/json/JsonData.js +33 -0
  327. package/lib/json/JsonGenerator.js +29 -21
  328. package/lib/json/JsonModulesPlugin.js +13 -7
  329. package/lib/json/JsonParser.js +30 -16
  330. package/lib/library/AbstractLibraryPlugin.js +6 -2
  331. package/lib/library/AmdLibraryPlugin.js +34 -18
  332. package/lib/library/AssignLibraryPlugin.js +68 -32
  333. package/lib/library/EnableLibraryPlugin.js +39 -14
  334. package/lib/library/ExportPropertyLibraryPlugin.js +14 -5
  335. package/lib/library/JsonpLibraryPlugin.js +4 -3
  336. package/lib/library/ModernModuleLibraryPlugin.js +144 -0
  337. package/lib/library/ModuleLibraryPlugin.js +12 -7
  338. package/lib/library/SystemLibraryPlugin.js +6 -4
  339. package/lib/library/UmdLibraryPlugin.js +119 -100
  340. package/lib/logging/Logger.js +59 -6
  341. package/lib/logging/createConsoleLogger.js +25 -40
  342. package/lib/logging/runtime.js +8 -9
  343. package/lib/logging/truncateArgs.js +9 -8
  344. package/lib/node/CommonJsChunkLoadingPlugin.js +18 -2
  345. package/lib/node/NodeEnvironmentPlugin.js +14 -8
  346. package/lib/node/NodeTargetPlugin.js +7 -0
  347. package/lib/node/NodeTemplatePlugin.js +10 -2
  348. package/lib/node/NodeWatchFileSystem.js +100 -50
  349. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +51 -26
  350. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +13 -2
  351. package/lib/node/ReadFileCompileWasmPlugin.js +21 -3
  352. package/lib/node/RequireChunkLoadingRuntimeModule.js +49 -26
  353. package/lib/node/nodeConsole.js +48 -31
  354. package/lib/optimize/AggressiveMergingPlugin.js +10 -4
  355. package/lib/optimize/AggressiveSplittingPlugin.js +26 -21
  356. package/lib/optimize/ConcatenatedModule.js +353 -212
  357. package/lib/optimize/EnsureChunkConditionsPlugin.js +4 -1
  358. package/lib/optimize/FlagIncludedChunksPlugin.js +14 -8
  359. package/lib/optimize/InnerGraph.js +30 -25
  360. package/lib/optimize/InnerGraphPlugin.js +105 -64
  361. package/lib/optimize/LimitChunkCountPlugin.js +32 -9
  362. package/lib/optimize/MangleExportsPlugin.js +7 -2
  363. package/lib/optimize/MinMaxSizeWarning.js +6 -1
  364. package/lib/optimize/ModuleConcatenationPlugin.js +150 -83
  365. package/lib/optimize/RealContentHashPlugin.js +99 -43
  366. package/lib/optimize/RemoveParentModulesPlugin.js +131 -48
  367. package/lib/optimize/RuntimeChunkPlugin.js +15 -2
  368. package/lib/optimize/SideEffectsFlagPlugin.js +119 -63
  369. package/lib/optimize/SplitChunksPlugin.js +129 -78
  370. package/lib/performance/SizeLimitsPlugin.js +22 -8
  371. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +4 -2
  372. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +4 -1
  373. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +8 -5
  374. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +5 -3
  375. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +5 -3
  376. package/lib/rules/BasicEffectRulePlugin.js +7 -1
  377. package/lib/rules/BasicMatcherRulePlugin.js +8 -1
  378. package/lib/rules/ObjectMatcherRulePlugin.js +19 -2
  379. package/lib/rules/RuleSetCompiler.js +53 -32
  380. package/lib/rules/UseEffectRulePlugin.js +42 -36
  381. package/lib/runtime/AsyncModuleRuntimeModule.js +56 -69
  382. package/lib/runtime/AutoPublicPathRuntimeModule.js +25 -9
  383. package/lib/runtime/BaseUriRuntimeModule.js +35 -0
  384. package/lib/runtime/ChunkNameRuntimeModule.js +1 -1
  385. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +5 -2
  386. package/lib/runtime/CompatRuntimeModule.js +7 -2
  387. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +7 -4
  388. package/lib/runtime/CreateScriptRuntimeModule.js +38 -0
  389. package/lib/runtime/CreateScriptUrlRuntimeModule.js +13 -36
  390. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +6 -3
  391. package/lib/runtime/EnsureChunkRuntimeModule.js +29 -15
  392. package/lib/runtime/GetChunkFilenameRuntimeModule.js +56 -43
  393. package/lib/runtime/GetFullHashRuntimeModule.js +4 -3
  394. package/lib/runtime/GetMainFilenameRuntimeModule.js +5 -2
  395. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +98 -0
  396. package/lib/runtime/GlobalRuntimeModule.js +1 -1
  397. package/lib/runtime/HasOwnPropertyRuntimeModule.js +5 -2
  398. package/lib/runtime/LoadScriptRuntimeModule.js +61 -45
  399. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +5 -2
  400. package/lib/runtime/NonceRuntimeModule.js +24 -0
  401. package/lib/runtime/OnChunksLoadedRuntimeModule.js +4 -2
  402. package/lib/runtime/PublicPathRuntimeModule.js +9 -2
  403. package/lib/runtime/RelativeUrlRuntimeModule.js +5 -2
  404. package/lib/runtime/RuntimeIdRuntimeModule.js +6 -2
  405. package/lib/runtime/StartupChunkDependenciesPlugin.js +15 -0
  406. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +36 -28
  407. package/lib/runtime/StartupEntrypointRuntimeModule.js +13 -9
  408. package/lib/runtime/SystemContextRuntimeModule.js +1 -1
  409. package/lib/schemes/DataUriPlugin.js +16 -3
  410. package/lib/schemes/HttpUriPlugin.js +336 -120
  411. package/lib/serialization/ArraySerializer.js +22 -6
  412. package/lib/serialization/BinaryMiddleware.js +212 -33
  413. package/lib/serialization/DateObjectSerializer.js +16 -4
  414. package/lib/serialization/ErrorObjectSerializer.js +23 -6
  415. package/lib/serialization/FileMiddleware.js +187 -86
  416. package/lib/serialization/MapObjectSerializer.js +25 -8
  417. package/lib/serialization/NullPrototypeObjectSerializer.js +26 -8
  418. package/lib/serialization/ObjectMiddleware.js +96 -66
  419. package/lib/serialization/PlainObjectSerializer.js +51 -14
  420. package/lib/serialization/RegExpObjectSerializer.js +17 -5
  421. package/lib/serialization/Serializer.js +23 -5
  422. package/lib/serialization/SerializerMiddleware.js +8 -8
  423. package/lib/serialization/SetObjectSerializer.js +22 -6
  424. package/lib/serialization/SingleItemMiddleware.js +2 -2
  425. package/lib/serialization/types.js +2 -2
  426. package/lib/sharing/ConsumeSharedFallbackDependency.js +3 -0
  427. package/lib/sharing/ConsumeSharedModule.js +40 -17
  428. package/lib/sharing/ConsumeSharedPlugin.js +139 -102
  429. package/lib/sharing/ConsumeSharedRuntimeModule.js +144 -130
  430. package/lib/sharing/ProvideForSharedDependency.js +0 -1
  431. package/lib/sharing/ProvideSharedDependency.js +17 -0
  432. package/lib/sharing/ProvideSharedModule.js +19 -6
  433. package/lib/sharing/ProvideSharedModuleFactory.js +1 -1
  434. package/lib/sharing/ProvideSharedPlugin.js +37 -30
  435. package/lib/sharing/SharePlugin.js +2 -2
  436. package/lib/sharing/ShareRuntimeModule.js +20 -10
  437. package/lib/sharing/resolveMatchedConfigs.js +6 -5
  438. package/lib/sharing/utils.js +338 -34
  439. package/lib/stats/DefaultStatsFactoryPlugin.js +660 -396
  440. package/lib/stats/DefaultStatsPresetPlugin.js +85 -25
  441. package/lib/stats/DefaultStatsPrinterPlugin.js +525 -145
  442. package/lib/stats/StatsFactory.js +128 -57
  443. package/lib/stats/StatsPrinter.js +77 -46
  444. package/lib/util/ArrayHelpers.js +35 -1
  445. package/lib/util/ArrayQueue.js +15 -22
  446. package/lib/util/AsyncQueue.js +37 -16
  447. package/lib/util/IterableHelpers.js +3 -4
  448. package/lib/util/LazyBucketSortedSet.js +60 -44
  449. package/lib/util/LazySet.js +11 -2
  450. package/lib/util/MapHelpers.js +17 -5
  451. package/lib/util/ParallelismFactorCalculator.js +11 -1
  452. package/lib/util/Queue.js +9 -3
  453. package/lib/util/Semaphore.js +4 -7
  454. package/lib/util/SetHelpers.js +5 -5
  455. package/lib/util/SortableSet.js +19 -6
  456. package/lib/util/StackedCacheMap.js +33 -3
  457. package/lib/util/StackedMap.js +1 -3
  458. package/lib/util/StringXor.js +46 -0
  459. package/lib/util/TupleQueue.js +9 -3
  460. package/lib/util/TupleSet.js +15 -5
  461. package/lib/util/URLAbsoluteSpecifier.js +8 -8
  462. package/lib/util/WeakTupleMap.js +70 -28
  463. package/lib/util/binarySearchBounds.js +51 -9
  464. package/lib/util/chainedImports.js +97 -0
  465. package/lib/util/cleverMerge.js +51 -36
  466. package/lib/util/comparators.js +146 -83
  467. package/lib/util/compileBooleanMatcher.js +35 -7
  468. package/lib/util/conventions.js +126 -0
  469. package/lib/util/create-schema-validation.js +9 -2
  470. package/lib/util/createHash.js +49 -14
  471. package/lib/util/deprecation.js +48 -15
  472. package/lib/util/deterministicGrouping.js +71 -39
  473. package/lib/util/extractUrlAndGlobal.js +3 -0
  474. package/lib/util/findGraphRoots.js +7 -5
  475. package/lib/util/fs.js +419 -94
  476. package/lib/util/hash/BatchedHash.js +10 -4
  477. package/lib/util/hash/md4.js +20 -0
  478. package/lib/util/hash/wasm-hash.js +163 -0
  479. package/lib/util/hash/xxhash64.js +7 -141
  480. package/lib/util/identifier.js +140 -93
  481. package/lib/util/internalSerializables.js +22 -0
  482. package/lib/util/makeSerializable.js +7 -0
  483. package/lib/util/memoize.js +10 -10
  484. package/lib/util/mergeScope.js +76 -0
  485. package/lib/util/nonNumericOnlyHash.js +22 -0
  486. package/lib/util/numberHash.js +84 -34
  487. package/lib/util/objectToMap.js +0 -1
  488. package/lib/util/processAsyncTree.js +7 -1
  489. package/lib/util/propertyAccess.js +7 -55
  490. package/lib/util/propertyName.js +77 -0
  491. package/lib/util/registerExternalSerializer.js +2 -2
  492. package/lib/util/runtime.js +188 -133
  493. package/lib/util/semver.js +64 -56
  494. package/lib/util/serialization.js +26 -1
  495. package/lib/util/smartGrouping.js +10 -10
  496. package/lib/util/source.js +1 -1
  497. package/lib/validateSchema.js +6 -2
  498. package/lib/wasm/EnableWasmLoadingPlugin.js +9 -4
  499. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +70 -30
  500. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +9 -1
  501. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +34 -16
  502. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +32 -12
  503. package/lib/wasm-async/AsyncWebAssemblyParser.js +17 -4
  504. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +72 -31
  505. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +17 -6
  506. package/lib/wasm-sync/WebAssemblyGenerator.js +72 -52
  507. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -4
  508. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +53 -43
  509. package/lib/wasm-sync/WebAssemblyParser.js +23 -9
  510. package/lib/wasm-sync/WebAssemblyUtils.js +5 -4
  511. package/lib/web/FetchCompileAsyncWasmPlugin.js +11 -1
  512. package/lib/web/FetchCompileWasmPlugin.js +59 -42
  513. package/lib/web/JsonpChunkLoadingPlugin.js +9 -0
  514. package/lib/web/JsonpChunkLoadingRuntimeModule.js +71 -41
  515. package/lib/webpack.js +43 -12
  516. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +15 -12
  517. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +55 -40
  518. package/module.d.ts +233 -0
  519. package/package.json +85 -139
  520. package/schemas/WebpackOptions.check.js +1 -1
  521. package/schemas/WebpackOptions.json +679 -47
  522. package/schemas/plugins/BannerPlugin.check.js +1 -1
  523. package/schemas/plugins/BannerPlugin.json +9 -1
  524. package/schemas/plugins/DllReferencePlugin.check.js +1 -1
  525. package/schemas/plugins/HashedModuleIdsPlugin.check.js +1 -1
  526. package/schemas/plugins/ProgressPlugin.check.js +1 -1
  527. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  528. package/schemas/plugins/SourceMapDevToolPlugin.json +4 -0
  529. package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
  530. package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.js +1 -1
  531. package/schemas/plugins/asset/AssetParserOptions.check.js +1 -1
  532. package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
  533. package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
  534. package/schemas/plugins/container/ContainerPlugin.json +10 -1
  535. package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
  536. package/schemas/plugins/container/ContainerReferencePlugin.json +2 -0
  537. package/schemas/plugins/container/ExternalsType.check.js +1 -1
  538. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  539. package/schemas/plugins/container/ModuleFederationPlugin.json +12 -1
  540. package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +7 -0
  541. package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +6 -0
  542. package/schemas/plugins/css/CssAutoGeneratorOptions.json +3 -0
  543. package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +7 -0
  544. package/schemas/plugins/css/CssAutoParserOptions.check.js +6 -0
  545. package/schemas/plugins/css/CssAutoParserOptions.json +3 -0
  546. package/schemas/plugins/css/CssGeneratorOptions.check.d.ts +7 -0
  547. package/schemas/plugins/css/CssGeneratorOptions.check.js +6 -0
  548. package/schemas/plugins/css/CssGeneratorOptions.json +3 -0
  549. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +7 -0
  550. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +6 -0
  551. package/schemas/plugins/css/CssGlobalGeneratorOptions.json +3 -0
  552. package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +7 -0
  553. package/schemas/plugins/css/CssGlobalParserOptions.check.js +6 -0
  554. package/schemas/plugins/css/CssGlobalParserOptions.json +3 -0
  555. package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +7 -0
  556. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +6 -0
  557. package/schemas/plugins/css/CssModuleGeneratorOptions.json +3 -0
  558. package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +7 -0
  559. package/schemas/plugins/css/CssModuleParserOptions.check.js +6 -0
  560. package/schemas/plugins/css/CssModuleParserOptions.json +3 -0
  561. package/schemas/plugins/css/CssParserOptions.check.d.ts +7 -0
  562. package/schemas/plugins/css/CssParserOptions.check.js +6 -0
  563. package/schemas/plugins/css/CssParserOptions.json +3 -0
  564. package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +1 -1
  565. package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +1 -1
  566. package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +1 -1
  567. package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
  568. package/schemas/plugins/schemes/HttpUriPlugin.json +4 -0
  569. package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
  570. package/types.d.ts +5026 -1756
@@ -13,6 +13,11 @@
13
13
  }
14
14
  ]
15
15
  },
16
+ "AmdContainer": {
17
+ "description": "Add a container for define/require functions in the AMD module.",
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
16
21
  "AssetFilterItemTypes": {
17
22
  "description": "Filtering value, regexp or function.",
18
23
  "cli": {
@@ -70,7 +75,7 @@
70
75
  ]
71
76
  },
72
77
  "AssetGeneratorDataUrlFunction": {
73
- "description": "Function that executes for module and should return an DataUrl string.",
78
+ "description": "Function that executes for module and should return an DataUrl string. It can have a string as 'ident' property which contributes to the module hash.",
74
79
  "instanceof": "Function",
75
80
  "tsType": "((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)"
76
81
  },
@@ -98,6 +103,10 @@
98
103
  ],
99
104
  "additionalProperties": false,
100
105
  "properties": {
106
+ "binary": {
107
+ "description": "Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.",
108
+ "type": "boolean"
109
+ },
101
110
  "dataUrl": {
102
111
  "$ref": "#/definitions/AssetGeneratorDataUrl"
103
112
  },
@@ -108,6 +117,9 @@
108
117
  "filename": {
109
118
  "$ref": "#/definitions/FilenameTemplate"
110
119
  },
120
+ "outputPath": {
121
+ "$ref": "#/definitions/AssetModuleOutputPath"
122
+ },
111
123
  "publicPath": {
112
124
  "$ref": "#/definitions/RawPublicPath"
113
125
  }
@@ -118,6 +130,10 @@
118
130
  "type": "object",
119
131
  "additionalProperties": false,
120
132
  "properties": {
133
+ "binary": {
134
+ "description": "Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.",
135
+ "type": "boolean"
136
+ },
121
137
  "dataUrl": {
122
138
  "$ref": "#/definitions/AssetGeneratorDataUrl"
123
139
  }
@@ -136,6 +152,19 @@
136
152
  }
137
153
  ]
138
154
  },
155
+ "AssetModuleOutputPath": {
156
+ "description": "Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.",
157
+ "anyOf": [
158
+ {
159
+ "type": "string",
160
+ "absolutePath": false
161
+ },
162
+ {
163
+ "instanceof": "Function",
164
+ "tsType": "((pathData: import(\"../lib/Compilation\").PathData, assetInfo?: import(\"../lib/Compilation\").AssetInfo) => string)"
165
+ }
166
+ ]
167
+ },
139
168
  "AssetParserDataUrlFunction": {
140
169
  "description": "Function that executes for module and should return whenever asset should be inlined as DataUrl.",
141
170
  "instanceof": "Function",
@@ -175,6 +204,10 @@
175
204
  "type": "object",
176
205
  "additionalProperties": false,
177
206
  "properties": {
207
+ "binary": {
208
+ "description": "Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.",
209
+ "type": "boolean"
210
+ },
178
211
  "emit": {
179
212
  "description": "Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.",
180
213
  "type": "boolean"
@@ -182,6 +215,9 @@
182
215
  "filename": {
183
216
  "$ref": "#/definitions/FilenameTemplate"
184
217
  },
218
+ "outputPath": {
219
+ "$ref": "#/definitions/AssetModuleOutputPath"
220
+ },
185
221
  "publicPath": {
186
222
  "$ref": "#/definitions/RawPublicPath"
187
223
  }
@@ -335,6 +371,170 @@
335
371
  "description": "This option enables cross-origin loading of chunks.",
336
372
  "enum": [false, "anonymous", "use-credentials"]
337
373
  },
374
+ "CssAutoGeneratorOptions": {
375
+ "description": "Generator options for css/auto modules.",
376
+ "type": "object",
377
+ "additionalProperties": false,
378
+ "properties": {
379
+ "esModule": {
380
+ "$ref": "#/definitions/CssGeneratorEsModule"
381
+ },
382
+ "exportsConvention": {
383
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
384
+ },
385
+ "exportsOnly": {
386
+ "$ref": "#/definitions/CssGeneratorExportsOnly"
387
+ },
388
+ "localIdentName": {
389
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
390
+ }
391
+ }
392
+ },
393
+ "CssAutoParserOptions": {
394
+ "description": "Parser options for css/auto modules.",
395
+ "type": "object",
396
+ "additionalProperties": false,
397
+ "properties": {
398
+ "namedExports": {
399
+ "$ref": "#/definitions/CssParserNamedExports"
400
+ }
401
+ }
402
+ },
403
+ "CssChunkFilename": {
404
+ "description": "Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.",
405
+ "oneOf": [
406
+ {
407
+ "$ref": "#/definitions/FilenameTemplate"
408
+ }
409
+ ]
410
+ },
411
+ "CssFilename": {
412
+ "description": "Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.",
413
+ "oneOf": [
414
+ {
415
+ "$ref": "#/definitions/FilenameTemplate"
416
+ }
417
+ ]
418
+ },
419
+ "CssGeneratorEsModule": {
420
+ "description": "Configure the generated JS modules that use the ES modules syntax.",
421
+ "type": "boolean"
422
+ },
423
+ "CssGeneratorExportsConvention": {
424
+ "description": "Specifies the convention of exported names.",
425
+ "anyOf": [
426
+ {
427
+ "enum": [
428
+ "as-is",
429
+ "camel-case",
430
+ "camel-case-only",
431
+ "dashes",
432
+ "dashes-only"
433
+ ]
434
+ },
435
+ {
436
+ "instanceof": "Function",
437
+ "tsType": "((name: string) => string)"
438
+ }
439
+ ]
440
+ },
441
+ "CssGeneratorExportsOnly": {
442
+ "description": "Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.",
443
+ "type": "boolean"
444
+ },
445
+ "CssGeneratorLocalIdentName": {
446
+ "description": "Configure the generated local ident name.",
447
+ "type": "string"
448
+ },
449
+ "CssGeneratorOptions": {
450
+ "description": "Generator options for css modules.",
451
+ "type": "object",
452
+ "additionalProperties": false,
453
+ "properties": {
454
+ "esModule": {
455
+ "$ref": "#/definitions/CssGeneratorEsModule"
456
+ },
457
+ "exportsOnly": {
458
+ "$ref": "#/definitions/CssGeneratorExportsOnly"
459
+ }
460
+ }
461
+ },
462
+ "CssGlobalGeneratorOptions": {
463
+ "description": "Generator options for css/global modules.",
464
+ "type": "object",
465
+ "additionalProperties": false,
466
+ "properties": {
467
+ "esModule": {
468
+ "$ref": "#/definitions/CssGeneratorEsModule"
469
+ },
470
+ "exportsConvention": {
471
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
472
+ },
473
+ "exportsOnly": {
474
+ "$ref": "#/definitions/CssGeneratorExportsOnly"
475
+ },
476
+ "localIdentName": {
477
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
478
+ }
479
+ }
480
+ },
481
+ "CssGlobalParserOptions": {
482
+ "description": "Parser options for css/global modules.",
483
+ "type": "object",
484
+ "additionalProperties": false,
485
+ "properties": {
486
+ "namedExports": {
487
+ "$ref": "#/definitions/CssParserNamedExports"
488
+ }
489
+ }
490
+ },
491
+ "CssHeadDataCompression": {
492
+ "description": "Compress the data in the head tag of CSS files.",
493
+ "type": "boolean"
494
+ },
495
+ "CssModuleGeneratorOptions": {
496
+ "description": "Generator options for css/module modules.",
497
+ "type": "object",
498
+ "additionalProperties": false,
499
+ "properties": {
500
+ "esModule": {
501
+ "$ref": "#/definitions/CssGeneratorEsModule"
502
+ },
503
+ "exportsConvention": {
504
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
505
+ },
506
+ "exportsOnly": {
507
+ "$ref": "#/definitions/CssGeneratorExportsOnly"
508
+ },
509
+ "localIdentName": {
510
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
511
+ }
512
+ }
513
+ },
514
+ "CssModuleParserOptions": {
515
+ "description": "Parser options for css/module modules.",
516
+ "type": "object",
517
+ "additionalProperties": false,
518
+ "properties": {
519
+ "namedExports": {
520
+ "$ref": "#/definitions/CssParserNamedExports"
521
+ }
522
+ }
523
+ },
524
+ "CssParserNamedExports": {
525
+ "description": "Use ES modules named export for css exports.",
526
+ "type": "boolean"
527
+ },
528
+ "CssParserOptions": {
529
+ "description": "Parser options for css modules.",
530
+ "type": "object",
531
+ "additionalProperties": false,
532
+ "properties": {
533
+ "namedExports": {
534
+ "$ref": "#/definitions/CssParserNamedExports"
535
+ }
536
+ }
537
+ },
338
538
  "Dependencies": {
339
539
  "description": "References to other configurations to depend on.",
340
540
  "type": "array",
@@ -345,7 +545,16 @@
345
545
  },
346
546
  "DevServer": {
347
547
  "description": "Options for the webpack-dev-server.",
348
- "type": "object"
548
+ "anyOf": [
549
+ {
550
+ "description": "Disable dev server.",
551
+ "enum": [false]
552
+ },
553
+ {
554
+ "description": "Options for the webpack-dev-server.",
555
+ "type": "object"
556
+ }
557
+ ]
349
558
  },
350
559
  "DevTool": {
351
560
  "description": "A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).",
@@ -434,6 +643,14 @@
434
643
  "type": "object",
435
644
  "additionalProperties": false,
436
645
  "properties": {
646
+ "asyncChunks": {
647
+ "description": "Enable/disable creating async chunks that are loaded on demand.",
648
+ "type": "boolean"
649
+ },
650
+ "baseUri": {
651
+ "description": "Base uri for this entry.",
652
+ "type": "string"
653
+ },
437
654
  "chunkLoading": {
438
655
  "$ref": "#/definitions/ChunkLoading"
439
656
  },
@@ -487,6 +704,14 @@
487
704
  "type": "object",
488
705
  "additionalProperties": false,
489
706
  "properties": {
707
+ "asyncChunks": {
708
+ "description": "Enable/disable creating async chunks that are loaded on demand.",
709
+ "type": "boolean"
710
+ },
711
+ "baseUri": {
712
+ "description": "Base uri for this entry.",
713
+ "type": "string"
714
+ },
490
715
  "chunkLoading": {
491
716
  "$ref": "#/definitions/ChunkLoading"
492
717
  },
@@ -649,6 +874,10 @@
649
874
  "description": "The environment supports arrow functions ('() => { ... }').",
650
875
  "type": "boolean"
651
876
  },
877
+ "asyncFunction": {
878
+ "description": "The environment supports async function and await ('async function () { await ... }').",
879
+ "type": "boolean"
880
+ },
652
881
  "bigIntLiteral": {
653
882
  "description": "The environment supports BigInt as literal (123n).",
654
883
  "type": "boolean"
@@ -661,17 +890,41 @@
661
890
  "description": "The environment supports destructuring ('{ a, b } = obj').",
662
891
  "type": "boolean"
663
892
  },
893
+ "document": {
894
+ "description": "The environment supports 'document'.",
895
+ "type": "boolean"
896
+ },
664
897
  "dynamicImport": {
665
898
  "description": "The environment supports an async import() function to import EcmaScript modules.",
666
899
  "type": "boolean"
667
900
  },
901
+ "dynamicImportInWorker": {
902
+ "description": "The environment supports an async import() is available when creating a worker.",
903
+ "type": "boolean"
904
+ },
668
905
  "forOf": {
669
906
  "description": "The environment supports 'for of' iteration ('for (const x of array) { ... }').",
670
907
  "type": "boolean"
671
908
  },
909
+ "globalThis": {
910
+ "description": "The environment supports 'globalThis'.",
911
+ "type": "boolean"
912
+ },
672
913
  "module": {
673
914
  "description": "The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').",
674
915
  "type": "boolean"
916
+ },
917
+ "nodePrefixForCoreModules": {
918
+ "description": "The environment supports `node:` prefix for Node.js core modules.",
919
+ "type": "boolean"
920
+ },
921
+ "optionalChaining": {
922
+ "description": "The environment supports optional chaining ('obj?.a' or 'obj?.()').",
923
+ "type": "boolean"
924
+ },
925
+ "templateLiteral": {
926
+ "description": "The environment supports template literals.",
927
+ "type": "boolean"
675
928
  }
676
929
  }
677
930
  },
@@ -681,14 +934,14 @@
681
934
  "implements": ["#/definitions/ExperimentsCommon"],
682
935
  "additionalProperties": false,
683
936
  "properties": {
684
- "asset": {
685
- "description": "Allow module type 'asset' to generate assets.",
686
- "type": "boolean"
687
- },
688
937
  "asyncWebAssembly": {
689
938
  "description": "Support WebAssembly as asynchronous EcmaScript Module.",
690
939
  "type": "boolean"
691
940
  },
941
+ "backCompat": {
942
+ "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
943
+ "type": "boolean"
944
+ },
692
945
  "buildHttp": {
693
946
  "description": "Build http(s): urls using a lockfile and resource content cache.",
694
947
  "anyOf": [
@@ -704,12 +957,16 @@
704
957
  "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
705
958
  "type": "boolean"
706
959
  },
960
+ "css": {
961
+ "description": "Enable css support.",
962
+ "type": "boolean"
963
+ },
707
964
  "futureDefaults": {
708
965
  "description": "Apply defaults of next major version.",
709
966
  "type": "boolean"
710
967
  },
711
968
  "layers": {
712
- "description": "Enable module and chunk layers.",
969
+ "description": "Enable module layers.",
713
970
  "type": "boolean"
714
971
  },
715
972
  "lazyCompilation": {
@@ -742,14 +999,14 @@
742
999
  "type": "object",
743
1000
  "additionalProperties": false,
744
1001
  "properties": {
745
- "asset": {
746
- "description": "Allow module type 'asset' to generate assets.",
747
- "type": "boolean"
748
- },
749
1002
  "asyncWebAssembly": {
750
1003
  "description": "Support WebAssembly as asynchronous EcmaScript Module.",
751
1004
  "type": "boolean"
752
1005
  },
1006
+ "backCompat": {
1007
+ "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
1008
+ "type": "boolean"
1009
+ },
753
1010
  "cacheUnaffected": {
754
1011
  "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
755
1012
  "type": "boolean"
@@ -759,7 +1016,7 @@
759
1016
  "type": "boolean"
760
1017
  },
761
1018
  "layers": {
762
- "description": "Enable module and chunk layers.",
1019
+ "description": "Enable module layers.",
763
1020
  "type": "boolean"
764
1021
  },
765
1022
  "outputModule": {
@@ -782,14 +1039,14 @@
782
1039
  "implements": ["#/definitions/ExperimentsCommon"],
783
1040
  "additionalProperties": false,
784
1041
  "properties": {
785
- "asset": {
786
- "description": "Allow module type 'asset' to generate assets.",
787
- "type": "boolean"
788
- },
789
1042
  "asyncWebAssembly": {
790
1043
  "description": "Support WebAssembly as asynchronous EcmaScript Module.",
791
1044
  "type": "boolean"
792
1045
  },
1046
+ "backCompat": {
1047
+ "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
1048
+ "type": "boolean"
1049
+ },
793
1050
  "buildHttp": {
794
1051
  "description": "Build http(s): urls using a lockfile and resource content cache.",
795
1052
  "oneOf": [
@@ -802,17 +1059,24 @@
802
1059
  "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
803
1060
  "type": "boolean"
804
1061
  },
1062
+ "css": {
1063
+ "description": "Enable css support.",
1064
+ "type": "boolean"
1065
+ },
805
1066
  "futureDefaults": {
806
1067
  "description": "Apply defaults of next major version.",
807
1068
  "type": "boolean"
808
1069
  },
809
1070
  "layers": {
810
- "description": "Enable module and chunk layers.",
1071
+ "description": "Enable module layers.",
811
1072
  "type": "boolean"
812
1073
  },
813
1074
  "lazyCompilation": {
814
1075
  "description": "Compile entrypoints and import()s only when they are accessed.",
815
- "oneOf": [
1076
+ "anyOf": [
1077
+ {
1078
+ "enum": [false]
1079
+ },
816
1080
  {
817
1081
  "$ref": "#/definitions/LazyCompilationOptions"
818
1082
  }
@@ -832,6 +1096,24 @@
832
1096
  }
833
1097
  }
834
1098
  },
1099
+ "Extends": {
1100
+ "description": "Extend configuration from another configuration (only works when using webpack-cli).",
1101
+ "anyOf": [
1102
+ {
1103
+ "type": "array",
1104
+ "items": {
1105
+ "$ref": "#/definitions/ExtendsItem"
1106
+ }
1107
+ },
1108
+ {
1109
+ "$ref": "#/definitions/ExtendsItem"
1110
+ }
1111
+ ]
1112
+ },
1113
+ "ExtendsItem": {
1114
+ "description": "Path to the configuration to be extended (only works when using webpack-cli).",
1115
+ "type": "string"
1116
+ },
835
1117
  "ExternalItem": {
836
1118
  "description": "Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.",
837
1119
  "anyOf": [
@@ -871,7 +1153,7 @@
871
1153
  {
872
1154
  "description": "The function is called on each dependency (`function(context, request, callback(err, result))`).",
873
1155
  "instanceof": "Function",
874
- "tsType": "(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>))"
1156
+ "tsType": "(((data: ExternalItemFunctionData, callback: (err?: (Error | null), result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>))"
875
1157
  }
876
1158
  ]
877
1159
  },
@@ -994,6 +1276,7 @@
994
1276
  "commonjs",
995
1277
  "commonjs2",
996
1278
  "commonjs-module",
1279
+ "commonjs-static",
997
1280
  "amd",
998
1281
  "amd-require",
999
1282
  "umd",
@@ -1002,10 +1285,20 @@
1002
1285
  "system",
1003
1286
  "promise",
1004
1287
  "import",
1288
+ "module-import",
1005
1289
  "script",
1006
1290
  "node-commonjs"
1007
1291
  ]
1008
1292
  },
1293
+ "Falsy": {
1294
+ "description": "These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.",
1295
+ "cli": {
1296
+ "exclude": true
1297
+ },
1298
+ "enum": [false, 0, "", null],
1299
+ "undefinedAsNull": true,
1300
+ "tsType": "false | 0 | '' | null | undefined"
1301
+ },
1009
1302
  "FileCacheOptions": {
1010
1303
  "description": "Options object for persistent file-based caching.",
1011
1304
  "type": "object",
@@ -1068,12 +1361,12 @@
1068
1361
  "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
1069
1362
  "anyOf": [
1070
1363
  {
1071
- "description": "A RegExp matching a immutable directory (usually a package manager cache directory, including the tailing slash)",
1364
+ "description": "A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)",
1072
1365
  "instanceof": "RegExp",
1073
1366
  "tsType": "RegExp"
1074
1367
  },
1075
1368
  {
1076
- "description": "A path to a immutable directory (usually a package manager cache directory).",
1369
+ "description": "A path to an immutable directory (usually a package manager cache directory).",
1077
1370
  "type": "string",
1078
1371
  "absolutePath": true,
1079
1372
  "minLength": 1
@@ -1123,6 +1416,10 @@
1123
1416
  "description": "Track and log detailed timing information for individual cache items.",
1124
1417
  "type": "boolean"
1125
1418
  },
1419
+ "readonly": {
1420
+ "description": "Enable/disable readonly mode.",
1421
+ "type": "boolean"
1422
+ },
1126
1423
  "store": {
1127
1424
  "description": "When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).",
1128
1425
  "enum": ["pack"]
@@ -1223,6 +1520,18 @@
1223
1520
  "asset/resource": {
1224
1521
  "$ref": "#/definitions/AssetResourceGeneratorOptions"
1225
1522
  },
1523
+ "css": {
1524
+ "$ref": "#/definitions/CssGeneratorOptions"
1525
+ },
1526
+ "css/auto": {
1527
+ "$ref": "#/definitions/CssAutoGeneratorOptions"
1528
+ },
1529
+ "css/global": {
1530
+ "$ref": "#/definitions/CssGlobalGeneratorOptions"
1531
+ },
1532
+ "css/module": {
1533
+ "$ref": "#/definitions/CssModuleGeneratorOptions"
1534
+ },
1226
1535
  "javascript": {
1227
1536
  "$ref": "#/definitions/EmptyGeneratorOptions"
1228
1537
  },
@@ -1323,6 +1632,10 @@
1323
1632
  "type": "string",
1324
1633
  "absolutePath": true
1325
1634
  },
1635
+ "proxy": {
1636
+ "description": "Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.",
1637
+ "type": "string"
1638
+ },
1326
1639
  "upgrade": {
1327
1640
  "description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
1328
1641
  "type": "boolean"
@@ -1474,6 +1787,51 @@
1474
1787
  "description": "Enable/disable parsing of magic comments in CommonJs syntax.",
1475
1788
  "type": "boolean"
1476
1789
  },
1790
+ "createRequire": {
1791
+ "description": "Enable/disable parsing \"import { createRequire } from \"module\"\" and evaluating createRequire().",
1792
+ "anyOf": [
1793
+ {
1794
+ "type": "boolean"
1795
+ },
1796
+ {
1797
+ "type": "string"
1798
+ }
1799
+ ]
1800
+ },
1801
+ "dynamicImportFetchPriority": {
1802
+ "description": "Specifies global fetchPriority for dynamic import.",
1803
+ "enum": ["low", "high", "auto", false]
1804
+ },
1805
+ "dynamicImportMode": {
1806
+ "description": "Specifies global mode for dynamic import.",
1807
+ "enum": ["eager", "weak", "lazy", "lazy-once"]
1808
+ },
1809
+ "dynamicImportPrefetch": {
1810
+ "description": "Specifies global prefetch for dynamic import.",
1811
+ "anyOf": [
1812
+ {
1813
+ "type": "number"
1814
+ },
1815
+ {
1816
+ "type": "boolean"
1817
+ }
1818
+ ]
1819
+ },
1820
+ "dynamicImportPreload": {
1821
+ "description": "Specifies global preload for dynamic import.",
1822
+ "anyOf": [
1823
+ {
1824
+ "type": "number"
1825
+ },
1826
+ {
1827
+ "type": "boolean"
1828
+ }
1829
+ ]
1830
+ },
1831
+ "exportsPresence": {
1832
+ "description": "Specifies the behavior of invalid export names in \"import ... from ...\" and \"export ... from ...\".",
1833
+ "enum": ["error", "warn", "auto", false]
1834
+ },
1477
1835
  "exprContextCritical": {
1478
1836
  "description": "Enable warnings for full dynamic dependencies.",
1479
1837
  "type": "boolean"
@@ -1506,9 +1864,29 @@
1506
1864
  "description": "Enable/disable parsing of import() syntax.",
1507
1865
  "type": "boolean"
1508
1866
  },
1867
+ "importExportsPresence": {
1868
+ "description": "Specifies the behavior of invalid export names in \"import ... from ...\".",
1869
+ "enum": ["error", "warn", "auto", false]
1870
+ },
1871
+ "importMeta": {
1872
+ "description": "Enable/disable evaluating import.meta.",
1873
+ "type": "boolean"
1874
+ },
1875
+ "importMetaContext": {
1876
+ "description": "Enable/disable evaluating import.meta.webpackContext.",
1877
+ "type": "boolean"
1878
+ },
1509
1879
  "node": {
1510
1880
  "$ref": "#/definitions/Node"
1511
1881
  },
1882
+ "overrideStrict": {
1883
+ "description": "Override the module to strict or non-strict. This may affect the behavior of the module (some behaviors differ between strict and non-strict), so please configure this option carefully.",
1884
+ "enum": ["strict", "non-strict"]
1885
+ },
1886
+ "reexportExportsPresence": {
1887
+ "description": "Specifies the behavior of invalid export names in \"export ... from ...\". This might be useful to disable during the migration from \"export ... from ...\" to \"export type ... from ...\" when reexporting types in TypeScript.",
1888
+ "enum": ["error", "warn", "auto", false]
1889
+ },
1512
1890
  "requireContext": {
1513
1891
  "description": "Enable/disable parsing of require.context syntax.",
1514
1892
  "type": "boolean"
@@ -1526,7 +1904,7 @@
1526
1904
  "type": "boolean"
1527
1905
  },
1528
1906
  "strictExportPresence": {
1529
- "description": "Emit errors instead of warnings when imported names don't exist in imported module.",
1907
+ "description": "Deprecated in favor of \"exportsPresence\". Emit errors instead of warnings when imported names don't exist in imported module.",
1530
1908
  "type": "boolean"
1531
1909
  },
1532
1910
  "strictThisContextOnImports": {
@@ -1615,20 +1993,86 @@
1615
1993
  }
1616
1994
  ]
1617
1995
  },
1618
- "LazyCompilationOptions": {
1619
- "description": "Options for compiling entrypoints and import()s only when they are accessed.",
1996
+ "LazyCompilationDefaultBackendOptions": {
1997
+ "description": "Options for the default backend.",
1620
1998
  "type": "object",
1621
1999
  "additionalProperties": false,
1622
2000
  "properties": {
1623
- "backend": {
1624
- "description": "A custom backend.",
1625
- "instanceof": "Function",
1626
- "tsType": "(((compiler: import('../lib/Compiler'), client: string, callback: (err?: Error, api?: any) => void) => void) | ((compiler: import('../lib/Compiler'), client: string) => Promise<any>))"
1627
- },
1628
2001
  "client": {
1629
2002
  "description": "A custom client.",
1630
2003
  "type": "string"
1631
2004
  },
2005
+ "listen": {
2006
+ "description": "Specifies where to listen to from the server.",
2007
+ "anyOf": [
2008
+ {
2009
+ "description": "A port.",
2010
+ "type": "number"
2011
+ },
2012
+ {
2013
+ "description": "Listen options.",
2014
+ "type": "object",
2015
+ "additionalProperties": true,
2016
+ "properties": {
2017
+ "host": {
2018
+ "description": "A host.",
2019
+ "type": "string"
2020
+ },
2021
+ "port": {
2022
+ "description": "A port.",
2023
+ "type": "number"
2024
+ }
2025
+ },
2026
+ "tsType": "import(\"net\").ListenOptions"
2027
+ },
2028
+ {
2029
+ "description": "A custom listen function.",
2030
+ "instanceof": "Function",
2031
+ "tsType": "((server: import(\"net\").Server) => void)"
2032
+ }
2033
+ ]
2034
+ },
2035
+ "protocol": {
2036
+ "description": "Specifies the protocol the client should use to connect to the server.",
2037
+ "enum": ["http", "https"]
2038
+ },
2039
+ "server": {
2040
+ "description": "Specifies how to create the server handling the EventSource requests.",
2041
+ "anyOf": [
2042
+ {
2043
+ "description": "ServerOptions for the http or https createServer call.",
2044
+ "type": "object",
2045
+ "additionalProperties": true,
2046
+ "properties": {},
2047
+ "tsType": "(import(\"https\").ServerOptions | import(\"http\").ServerOptions)"
2048
+ },
2049
+ {
2050
+ "description": "A custom create server function.",
2051
+ "instanceof": "Function",
2052
+ "tsType": "(() => import(\"net\").Server)"
2053
+ }
2054
+ ]
2055
+ }
2056
+ }
2057
+ },
2058
+ "LazyCompilationOptions": {
2059
+ "description": "Options for compiling entrypoints and import()s only when they are accessed.",
2060
+ "type": "object",
2061
+ "additionalProperties": false,
2062
+ "properties": {
2063
+ "backend": {
2064
+ "description": "Specifies the backend that should be used for handling client keep alive.",
2065
+ "anyOf": [
2066
+ {
2067
+ "description": "A custom backend.",
2068
+ "instanceof": "Function",
2069
+ "tsType": "(((compiler: import('../lib/Compiler'), callback: (err?: Error, api?: import(\"../lib/hmr/LazyCompilationPlugin\").BackendApi) => void) => void) | ((compiler: import('../lib/Compiler')) => Promise<import(\"../lib/hmr/LazyCompilationPlugin\").BackendApi>))"
2070
+ },
2071
+ {
2072
+ "$ref": "#/definitions/LazyCompilationDefaultBackendOptions"
2073
+ }
2074
+ ]
2075
+ },
1632
2076
  "entries": {
1633
2077
  "description": "Enable/disable lazy compilation for entries.",
1634
2078
  "type": "boolean"
@@ -1766,6 +2210,9 @@
1766
2210
  "type": "object",
1767
2211
  "additionalProperties": false,
1768
2212
  "properties": {
2213
+ "amdContainer": {
2214
+ "$ref": "#/definitions/AmdContainer"
2215
+ },
1769
2216
  "auxiliaryComment": {
1770
2217
  "$ref": "#/definitions/AuxiliaryComment"
1771
2218
  },
@@ -1785,7 +2232,7 @@
1785
2232
  "required": ["type"]
1786
2233
  },
1787
2234
  "LibraryType": {
1788
- "description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
2235
+ "description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
1789
2236
  "anyOf": [
1790
2237
  {
1791
2238
  "enum": [
@@ -1800,6 +2247,7 @@
1800
2247
  "commonjs",
1801
2248
  "commonjs2",
1802
2249
  "commonjs-module",
2250
+ "commonjs-static",
1803
2251
  "amd",
1804
2252
  "amd-require",
1805
2253
  "umd",
@@ -2115,11 +2563,11 @@
2115
2563
  "properties": {
2116
2564
  "__dirname": {
2117
2565
  "description": "Include a polyfill for the '__dirname' variable.",
2118
- "enum": [false, true, "warn-mock", "mock", "eval-only"]
2566
+ "enum": [false, true, "warn-mock", "mock", "node-module", "eval-only"]
2119
2567
  },
2120
2568
  "__filename": {
2121
2569
  "description": "Include a polyfill for the '__filename' variable.",
2122
- "enum": [false, true, "warn-mock", "mock", "eval-only"]
2570
+ "enum": [false, true, "warn-mock", "mock", "node-module", "eval-only"]
2123
2571
  },
2124
2572
  "global": {
2125
2573
  "description": "Include a polyfill for the 'global' variable.",
@@ -2198,6 +2646,9 @@
2198
2646
  {
2199
2647
  "enum": ["..."]
2200
2648
  },
2649
+ {
2650
+ "$ref": "#/definitions/Falsy"
2651
+ },
2201
2652
  {
2202
2653
  "$ref": "#/definitions/WebpackPluginInstance"
2203
2654
  },
@@ -2351,6 +2802,10 @@
2351
2802
  {
2352
2803
  "enum": ["initial", "async", "all"]
2353
2804
  },
2805
+ {
2806
+ "instanceof": "RegExp",
2807
+ "tsType": "RegExp"
2808
+ },
2354
2809
  {
2355
2810
  "instanceof": "Function",
2356
2811
  "tsType": "((chunk: import('../lib/Chunk')) => boolean)"
@@ -2598,6 +3053,10 @@
2598
3053
  {
2599
3054
  "enum": ["initial", "async", "all"]
2600
3055
  },
3056
+ {
3057
+ "instanceof": "RegExp",
3058
+ "tsType": "RegExp"
3059
+ },
2601
3060
  {
2602
3061
  "instanceof": "Function",
2603
3062
  "tsType": "((chunk: import('../lib/Chunk')) => boolean)"
@@ -2631,6 +3090,22 @@
2631
3090
  "type": "string",
2632
3091
  "minLength": 1
2633
3092
  },
3093
+ "chunks": {
3094
+ "description": "Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML).",
3095
+ "anyOf": [
3096
+ {
3097
+ "enum": ["initial", "async", "all"]
3098
+ },
3099
+ {
3100
+ "instanceof": "RegExp",
3101
+ "tsType": "RegExp"
3102
+ },
3103
+ {
3104
+ "instanceof": "Function",
3105
+ "tsType": "((chunk: import('../lib/Chunk')) => boolean)"
3106
+ }
3107
+ ]
3108
+ },
2634
3109
  "maxAsyncSize": {
2635
3110
  "description": "Maximal size hint for the on-demand chunks.",
2636
3111
  "oneOf": [
@@ -2798,9 +3273,23 @@
2798
3273
  "type": "object",
2799
3274
  "additionalProperties": false,
2800
3275
  "properties": {
3276
+ "amdContainer": {
3277
+ "cli": {
3278
+ "exclude": true
3279
+ },
3280
+ "oneOf": [
3281
+ {
3282
+ "$ref": "#/definitions/AmdContainer"
3283
+ }
3284
+ ]
3285
+ },
2801
3286
  "assetModuleFilename": {
2802
3287
  "$ref": "#/definitions/AssetModuleFilename"
2803
3288
  },
3289
+ "asyncChunks": {
3290
+ "description": "Enable/disable creating async chunks that are loaded on demand.",
3291
+ "type": "boolean"
3292
+ },
2804
3293
  "auxiliaryComment": {
2805
3294
  "cli": {
2806
3295
  "exclude": true
@@ -2838,6 +3327,15 @@
2838
3327
  "crossOriginLoading": {
2839
3328
  "$ref": "#/definitions/CrossOriginLoading"
2840
3329
  },
3330
+ "cssChunkFilename": {
3331
+ "$ref": "#/definitions/CssChunkFilename"
3332
+ },
3333
+ "cssFilename": {
3334
+ "$ref": "#/definitions/CssFilename"
3335
+ },
3336
+ "cssHeadDataCompression": {
3337
+ "$ref": "#/definitions/CssHeadDataCompression"
3338
+ },
2841
3339
  "devtoolFallbackModuleFilenameTemplate": {
2842
3340
  "$ref": "#/definitions/DevtoolFallbackModuleFilenameTemplate"
2843
3341
  },
@@ -2886,6 +3384,10 @@
2886
3384
  "hotUpdateMainFilename": {
2887
3385
  "$ref": "#/definitions/HotUpdateMainFilename"
2888
3386
  },
3387
+ "ignoreBrowserWarnings": {
3388
+ "description": "Ignore warnings in the browser.",
3389
+ "type": "boolean"
3390
+ },
2889
3391
  "iife": {
2890
3392
  "$ref": "#/definitions/Iife"
2891
3393
  },
@@ -2983,6 +3485,9 @@
2983
3485
  "workerChunkLoading": {
2984
3486
  "$ref": "#/definitions/ChunkLoading"
2985
3487
  },
3488
+ "workerPublicPath": {
3489
+ "$ref": "#/definitions/WorkerPublicPath"
3490
+ },
2986
3491
  "workerWasmLoading": {
2987
3492
  "$ref": "#/definitions/WasmLoading"
2988
3493
  }
@@ -3000,6 +3505,10 @@
3000
3505
  "assetModuleFilename": {
3001
3506
  "$ref": "#/definitions/AssetModuleFilename"
3002
3507
  },
3508
+ "asyncChunks": {
3509
+ "description": "Enable/disable creating async chunks that are loaded on demand.",
3510
+ "type": "boolean"
3511
+ },
3003
3512
  "charset": {
3004
3513
  "$ref": "#/definitions/Charset"
3005
3514
  },
@@ -3027,6 +3536,15 @@
3027
3536
  "crossOriginLoading": {
3028
3537
  "$ref": "#/definitions/CrossOriginLoading"
3029
3538
  },
3539
+ "cssChunkFilename": {
3540
+ "$ref": "#/definitions/CssChunkFilename"
3541
+ },
3542
+ "cssFilename": {
3543
+ "$ref": "#/definitions/CssFilename"
3544
+ },
3545
+ "cssHeadDataCompression": {
3546
+ "$ref": "#/definitions/CssHeadDataCompression"
3547
+ },
3030
3548
  "devtoolFallbackModuleFilenameTemplate": {
3031
3549
  "$ref": "#/definitions/DevtoolFallbackModuleFilenameTemplate"
3032
3550
  },
@@ -3075,6 +3593,10 @@
3075
3593
  "hotUpdateMainFilename": {
3076
3594
  "$ref": "#/definitions/HotUpdateMainFilename"
3077
3595
  },
3596
+ "ignoreBrowserWarnings": {
3597
+ "description": "Ignore warnings in the browser.",
3598
+ "type": "boolean"
3599
+ },
3078
3600
  "iife": {
3079
3601
  "$ref": "#/definitions/Iife"
3080
3602
  },
@@ -3129,6 +3651,9 @@
3129
3651
  "workerChunkLoading": {
3130
3652
  "$ref": "#/definitions/ChunkLoading"
3131
3653
  },
3654
+ "workerPublicPath": {
3655
+ "$ref": "#/definitions/WorkerPublicPath"
3656
+ },
3132
3657
  "workerWasmLoading": {
3133
3658
  "$ref": "#/definitions/WasmLoading"
3134
3659
  }
@@ -3160,6 +3685,18 @@
3160
3685
  "asset/source": {
3161
3686
  "$ref": "#/definitions/EmptyParserOptions"
3162
3687
  },
3688
+ "css": {
3689
+ "$ref": "#/definitions/CssParserOptions"
3690
+ },
3691
+ "css/auto": {
3692
+ "$ref": "#/definitions/CssAutoParserOptions"
3693
+ },
3694
+ "css/global": {
3695
+ "$ref": "#/definitions/CssGlobalParserOptions"
3696
+ },
3697
+ "css/module": {
3698
+ "$ref": "#/definitions/CssModuleParserOptions"
3699
+ },
3163
3700
  "javascript": {
3164
3701
  "$ref": "#/definitions/JavascriptParserOptions"
3165
3702
  },
@@ -3231,6 +3768,9 @@
3231
3768
  "items": {
3232
3769
  "description": "Plugin of type object or instanceof Function.",
3233
3770
  "anyOf": [
3771
+ {
3772
+ "$ref": "#/definitions/Falsy"
3773
+ },
3234
3774
  {
3235
3775
  "$ref": "#/definitions/WebpackPluginInstance"
3236
3776
  },
@@ -3475,6 +4015,29 @@
3475
4015
  "type": "string"
3476
4016
  }
3477
4017
  },
4018
+ "extensionAlias": {
4019
+ "description": "An object which maps extension to extension aliases.",
4020
+ "type": "object",
4021
+ "additionalProperties": {
4022
+ "description": "Extension alias.",
4023
+ "anyOf": [
4024
+ {
4025
+ "description": "Multiple extensions.",
4026
+ "type": "array",
4027
+ "items": {
4028
+ "description": "Aliased extension.",
4029
+ "type": "string",
4030
+ "minLength": 1
4031
+ }
4032
+ },
4033
+ {
4034
+ "description": "Aliased extension.",
4035
+ "type": "string",
4036
+ "minLength": 1
4037
+ }
4038
+ ]
4039
+ }
4040
+ },
3478
4041
  "extensions": {
3479
4042
  "description": "Extensions added to the request when trying to find the file.",
3480
4043
  "type": "array",
@@ -3558,6 +4121,9 @@
3558
4121
  {
3559
4122
  "enum": ["..."]
3560
4123
  },
4124
+ {
4125
+ "$ref": "#/definitions/Falsy"
4126
+ },
3561
4127
  {
3562
4128
  "$ref": "#/definitions/ResolvePluginInstance"
3563
4129
  }
@@ -3626,16 +4192,24 @@
3626
4192
  },
3627
4193
  "ResolvePluginInstance": {
3628
4194
  "description": "Plugin instance.",
3629
- "type": "object",
3630
- "additionalProperties": true,
3631
- "properties": {
3632
- "apply": {
3633
- "description": "The run point of the plugin, required method.",
4195
+ "anyOf": [
4196
+ {
4197
+ "type": "object",
4198
+ "additionalProperties": true,
4199
+ "properties": {
4200
+ "apply": {
4201
+ "description": "The run point of the plugin, required method.",
4202
+ "instanceof": "Function",
4203
+ "tsType": "(arg0: import('enhanced-resolve').Resolver) => void"
4204
+ }
4205
+ },
4206
+ "required": ["apply"]
4207
+ },
4208
+ {
3634
4209
  "instanceof": "Function",
3635
- "tsType": "(resolver: import('enhanced-resolve').Resolver) => void"
4210
+ "tsType": "((this: import('enhanced-resolve').Resolver, arg1: import('enhanced-resolve').Resolver) => void)"
3636
4211
  }
3637
- },
3638
- "required": ["apply"]
4212
+ ]
3639
4213
  },
3640
4214
  "RuleSetCondition": {
3641
4215
  "description": "A condition matcher.",
@@ -3918,7 +4492,10 @@
3918
4492
  "type": "array",
3919
4493
  "items": {
3920
4494
  "description": "A rule.",
3921
- "oneOf": [
4495
+ "anyOf": [
4496
+ {
4497
+ "$ref": "#/definitions/Falsy"
4498
+ },
3922
4499
  {
3923
4500
  "$ref": "#/definitions/RuleSetRule"
3924
4501
  }
@@ -3987,7 +4564,10 @@
3987
4564
  "type": "array",
3988
4565
  "items": {
3989
4566
  "description": "A rule.",
3990
- "oneOf": [
4567
+ "anyOf": [
4568
+ {
4569
+ "$ref": "#/definitions/Falsy"
4570
+ },
3991
4571
  {
3992
4572
  "$ref": "#/definitions/RuleSetRule"
3993
4573
  }
@@ -4025,6 +4605,13 @@
4025
4605
  "$ref": "#/definitions/RuleSetUse"
4026
4606
  }
4027
4607
  ]
4608
+ },
4609
+ "with": {
4610
+ "description": "Match on import attributes of the dependency.",
4611
+ "type": "object",
4612
+ "additionalProperties": {
4613
+ "$ref": "#/definitions/RuleSetConditionOrConditions"
4614
+ }
4028
4615
  }
4029
4616
  }
4030
4617
  },
@@ -4040,6 +4627,9 @@
4040
4627
  },
4041
4628
  "enum": ["..."]
4042
4629
  },
4630
+ {
4631
+ "$ref": "#/definitions/Falsy"
4632
+ },
4043
4633
  {
4044
4634
  "$ref": "#/definitions/RuleSetRule"
4045
4635
  }
@@ -4053,7 +4643,10 @@
4053
4643
  "type": "array",
4054
4644
  "items": {
4055
4645
  "description": "An use item.",
4056
- "oneOf": [
4646
+ "anyOf": [
4647
+ {
4648
+ "$ref": "#/definitions/Falsy"
4649
+ },
4057
4650
  {
4058
4651
  "$ref": "#/definitions/RuleSetUseItem"
4059
4652
  }
@@ -4062,7 +4655,7 @@
4062
4655
  },
4063
4656
  {
4064
4657
  "instanceof": "Function",
4065
- "tsType": "((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])"
4658
+ "tsType": "((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => (Falsy | RuleSetUseItem)[])"
4066
4659
  },
4067
4660
  {
4068
4661
  "$ref": "#/definitions/RuleSetUseItem"
@@ -4100,7 +4693,7 @@
4100
4693
  },
4101
4694
  {
4102
4695
  "instanceof": "Function",
4103
- "tsType": "((data: object) => RuleSetUseItem|RuleSetUseItem[])"
4696
+ "tsType": "((data: object) => RuleSetUseItem | (Falsy | RuleSetUseItem)[])"
4104
4697
  },
4105
4698
  {
4106
4699
  "$ref": "#/definitions/RuleSetLoader"
@@ -4138,12 +4731,12 @@
4138
4731
  "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
4139
4732
  "anyOf": [
4140
4733
  {
4141
- "description": "A RegExp matching a immutable directory (usually a package manager cache directory, including the tailing slash)",
4734
+ "description": "A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)",
4142
4735
  "instanceof": "RegExp",
4143
4736
  "tsType": "RegExp"
4144
4737
  },
4145
4738
  {
4146
- "description": "A path to a immutable directory (usually a package manager cache directory).",
4739
+ "description": "A path to an immutable directory (usually a package manager cache directory).",
4147
4740
  "type": "string",
4148
4741
  "absolutePath": true,
4149
4742
  "minLength": 1
@@ -4215,6 +4808,26 @@
4215
4808
  "type": "boolean"
4216
4809
  }
4217
4810
  }
4811
+ },
4812
+ "unmanagedPaths": {
4813
+ "description": "List of paths that are not managed by a package manager and the contents are subject to change.",
4814
+ "type": "array",
4815
+ "items": {
4816
+ "description": "List of paths that are not managed by a package manager and the contents are subject to change.",
4817
+ "anyOf": [
4818
+ {
4819
+ "description": "A RegExp matching an unmanaged directory.",
4820
+ "instanceof": "RegExp",
4821
+ "tsType": "RegExp"
4822
+ },
4823
+ {
4824
+ "description": "A path to an unmanaged directory.",
4825
+ "type": "string",
4826
+ "absolutePath": true,
4827
+ "minLength": 1
4828
+ }
4829
+ ]
4830
+ }
4218
4831
  }
4219
4832
  }
4220
4833
  },
@@ -4398,6 +5011,10 @@
4398
5011
  "description": "Add errors count.",
4399
5012
  "type": "boolean"
4400
5013
  },
5014
+ "errorsSpace": {
5015
+ "description": "Space to display errors (value is in number of lines).",
5016
+ "type": "number"
5017
+ },
4401
5018
  "exclude": {
4402
5019
  "description": "Please use excludeModules instead.",
4403
5020
  "cli": {
@@ -4630,6 +5247,10 @@
4630
5247
  "$ref": "#/definitions/WarningFilterTypes"
4631
5248
  }
4632
5249
  ]
5250
+ },
5251
+ "warningsSpace": {
5252
+ "description": "Space to display warnings (value is in number of lines).",
5253
+ "type": "number"
4633
5254
  }
4634
5255
  }
4635
5256
  },
@@ -4690,6 +5311,10 @@
4690
5311
  "type": "object",
4691
5312
  "additionalProperties": false,
4692
5313
  "properties": {
5314
+ "onPolicyCreationFailure": {
5315
+ "description": "If the call to `trustedTypes.createPolicy(...)` fails -- e.g., due to the policy name missing from the CSP `trusted-types` list, or it being a duplicate name, etc. -- controls whether to continue with loading in the hope that `require-trusted-types-for 'script'` isn't enforced yet, versus fail immediately. Default behavior is 'stop'.",
5316
+ "enum": ["continue", "stop"]
5317
+ },
4693
5318
  "policyName": {
4694
5319
  "description": "The name of the Trusted Types policy created by webpack to serve bundle chunks.",
4695
5320
  "type": "string",
@@ -4980,6 +5605,10 @@
4980
5605
  }
4981
5606
  },
4982
5607
  "required": ["apply"]
5608
+ },
5609
+ "WorkerPublicPath": {
5610
+ "description": "Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.",
5611
+ "type": "string"
4983
5612
  }
4984
5613
  },
4985
5614
  "title": "WebpackOptions",
@@ -5014,6 +5643,9 @@
5014
5643
  "experiments": {
5015
5644
  "$ref": "#/definitions/Experiments"
5016
5645
  },
5646
+ "extends": {
5647
+ "$ref": "#/definitions/Extends"
5648
+ },
5017
5649
  "externals": {
5018
5650
  "$ref": "#/definitions/Externals"
5019
5651
  },