@depup/webpack 5.110.3-depup.0 → 5.111.1-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/README.md +7 -8
  2. package/changes.json +7 -11
  3. package/lib/APIPlugin.js +26 -11
  4. package/lib/AutomaticPrefetchPlugin.js +1 -1
  5. package/lib/Cache.js +8 -3
  6. package/lib/CacheFacade.js +1 -1
  7. package/lib/CircularModulesPlugin.js +157 -55
  8. package/lib/CleanPlugin.js +2 -2
  9. package/lib/CompatibilityPlugin.js +3 -4
  10. package/lib/Compilation.js +336 -337
  11. package/lib/Compiler.js +213 -51
  12. package/lib/ConstPlugin.js +16 -132
  13. package/lib/CopyPlugin.js +1054 -0
  14. package/lib/DefinePlugin.js +24 -8
  15. package/lib/DependencyTemplate.js +2 -1
  16. package/lib/DotenvPlugin.js +24 -28
  17. package/lib/ErrorHelpers.js +113 -0
  18. package/lib/ExportsInfo.js +20 -16
  19. package/lib/ExternalModule.js +47 -22
  20. package/lib/FileSystemInfo.js +17 -14
  21. package/lib/FlagDependencyExportsPlugin.js +53 -34
  22. package/lib/FlagDependencyUsagePlugin.js +9 -13
  23. package/lib/Generator.js +24 -2
  24. package/lib/HotModuleReplacementPlugin.js +55 -7
  25. package/lib/IgnorePlugin.js +1 -1
  26. package/lib/JavascriptMetaInfoPlugin.js +5 -3
  27. package/lib/LoaderOptionsPlugin.js +1 -1
  28. package/lib/MainTemplate.js +5 -1
  29. package/lib/Module.js +19 -10
  30. package/lib/ModuleGraph.js +6 -9
  31. package/lib/MultiCompiler.js +7 -17
  32. package/lib/MultiWatching.js +1 -1
  33. package/lib/NormalModule.js +135 -50
  34. package/lib/NormalModuleFactory.js +1 -1
  35. package/lib/RuntimeGlobals.js +21 -7
  36. package/lib/RuntimeModule.js +28 -12
  37. package/lib/RuntimePlugin.js +30 -3
  38. package/lib/RuntimeTemplate.js +813 -518
  39. package/lib/SourceMapDevToolPlugin.js +54 -104
  40. package/lib/TemplatedPathPlugin.js +16 -59
  41. package/lib/Watching.js +9 -0
  42. package/lib/WebpackOptionsApply.js +84 -91
  43. package/lib/asset/AssetBytesGenerator.js +7 -1
  44. package/lib/asset/AssetGenerator.js +50 -24
  45. package/lib/asset/AssetModule.js +3 -0
  46. package/lib/asset/AssetSourceGenerator.js +7 -1
  47. package/lib/asset/WebManifestParser.js +7 -5
  48. package/lib/buildChunkGraph.js +11 -15
  49. package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
  50. package/lib/cache/IdleFileCachePlugin.js +2 -2
  51. package/lib/cache/MemoryCachePlugin.js +4 -4
  52. package/lib/cache/MemoryWithGcCachePlugin.js +7 -8
  53. package/lib/cache/PackFileCacheStrategy.js +17 -19
  54. package/lib/cache/getLazyHashedEtag.js +3 -5
  55. package/lib/config/browserslistTargetHandler.js +17 -4
  56. package/lib/config/defaults.js +138 -128
  57. package/lib/config/getClaimedAssetTypes.js +10 -11
  58. package/lib/config/normalization.js +82 -12
  59. package/lib/config/target.js +13 -4
  60. package/lib/container/ContainerReferencePlugin.js +6 -0
  61. package/lib/container/RemoteRuntimeModule.js +9 -0
  62. package/lib/container/declaredRemotes.js +39 -0
  63. package/lib/{ContextExclusionPlugin.js → context/ContextExclusionPlugin.js} +1 -1
  64. package/lib/{ContextModule.js → context/ContextModule.js} +54 -115
  65. package/lib/{ContextModuleFactory.js → context/ContextModuleFactory.js} +19 -21
  66. package/lib/{ContextReplacementPlugin.js → context/ContextReplacementPlugin.js} +4 -4
  67. package/lib/css/CssGenerator.js +27 -11
  68. package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
  69. package/lib/css/CssLoadingRuntimeModule.js +94 -36
  70. package/lib/css/CssModule.js +1 -1
  71. package/lib/css/CssModulesPlugin.js +7 -6
  72. package/lib/css/CssParser.js +162 -31
  73. package/lib/css/CssServerStylesRuntimeModule.js +9 -0
  74. package/lib/css/cssMinify.js +43 -32
  75. package/lib/css/data.js +3514 -869
  76. package/lib/css/syntax.js +6370 -1220
  77. package/lib/debug/ProfilingPlugin.js +7 -4
  78. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
  79. package/lib/dependencies/AMDRuntimeModules.js +18 -0
  80. package/lib/dependencies/CommonJsExportRequireDependency.js +13 -12
  81. package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
  82. package/lib/dependencies/CommonJsImportsParserPlugin.js +5 -5
  83. package/lib/dependencies/CommonJsPlugin.js +19 -3
  84. package/lib/dependencies/CommonJsRequireDependency.js +14 -5
  85. package/lib/dependencies/CommonJsSelfReferenceDependency.js +2 -4
  86. package/lib/dependencies/ContextDependency.js +1 -1
  87. package/lib/dependencies/ContextDependencyHelpers.js +3 -9
  88. package/lib/dependencies/ContextElementDependency.js +1 -1
  89. package/lib/dependencies/CssIcssExportDependency.js +13 -9
  90. package/lib/dependencies/CssIcssImportDependency.js +3 -6
  91. package/lib/dependencies/CssUrlDependency.js +3 -5
  92. package/lib/dependencies/HarmonyCompatibilityDependency.js +67 -22
  93. package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -4
  94. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +10 -7
  95. package/lib/dependencies/HarmonyExportExpressionDependency.js +47 -33
  96. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +74 -17
  97. package/lib/dependencies/HarmonyExportInitFragment.js +110 -23
  98. package/lib/dependencies/HarmonyExportSpecifierDependency.js +25 -58
  99. package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
  100. package/lib/dependencies/HarmonyImportDependency.js +6 -1
  101. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +111 -17
  102. package/lib/dependencies/HarmonyImportSideEffectDependency.js +3 -4
  103. package/lib/dependencies/HarmonyImportSpecifierDependency.js +40 -3
  104. package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
  105. package/lib/dependencies/HtmlEntryDependency.js +124 -102
  106. package/lib/dependencies/HtmlInlineScriptDependency.js +3 -4
  107. package/lib/dependencies/HtmlInlineStyleDependency.js +3 -4
  108. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
  109. package/lib/dependencies/ImportMetaGlobHelpers.js +1 -1
  110. package/lib/dependencies/ImportMetaMainDependency.js +104 -0
  111. package/lib/dependencies/ImportMetaPlugin.js +67 -25
  112. package/lib/dependencies/ImportParserPlugin.js +1 -1
  113. package/lib/dependencies/LoaderPlugin.js +26 -1
  114. package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
  115. package/lib/dependencies/SystemRuntimeModule.js +9 -0
  116. package/lib/dependencies/URLContextDependency.js +1 -1
  117. package/lib/dependencies/URLDependency.js +6 -5
  118. package/lib/dependencies/WorkerAndWorkletPlugin.js +15 -21
  119. package/lib/dependencies/WorkerDependency.js +7 -7
  120. package/lib/dependencies/WorkletDependency.js +7 -11
  121. package/lib/dll/DelegatedModule.js +18 -1
  122. package/lib/dll/DllReferencePlugin.js +11 -8
  123. package/lib/dll/LibManifestPlugin.js +1 -1
  124. package/lib/errors/AnalyzableBailoutsWarning.js +41 -0
  125. package/lib/errors/DuplicateModulesWarning.js +12 -7
  126. package/lib/errors/EmptyCopyPatternWarning.js +26 -0
  127. package/lib/errors/ExternalStarReexportError.js +44 -0
  128. package/lib/errors/HookWebpackError.js +3 -2
  129. package/lib/errors/MissingSourceMapsWarning.js +36 -0
  130. package/lib/errors/ModuleParseError.js +2 -1
  131. package/lib/errors/UnusedAssetsWarning.js +36 -0
  132. package/lib/errors/UnusedFederationWarning.js +35 -0
  133. package/lib/errors/UnusedModulesWarning.js +38 -0
  134. package/lib/esm/ExportWebpackRequireRuntimeModule.js +9 -0
  135. package/lib/esm/ModuleChunkFormatPlugin.js +28 -3
  136. package/lib/esm/ModuleChunkLoadingPlugin.js +30 -11
  137. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -60
  138. package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
  139. package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
  140. package/lib/hmr/LazyCompilationPlugin.js +3 -5
  141. package/lib/html/HtmlGenerator.js +72 -87
  142. package/lib/html/HtmlModulesPlugin.js +418 -200
  143. package/lib/html/HtmlParser.js +110 -147
  144. package/lib/html/builtinEmbeddedRenderer.js +107 -0
  145. package/lib/html/data.js +142 -7
  146. package/lib/html/htmlMinify.js +92 -122
  147. package/lib/html/syntax.js +1618 -1391
  148. package/lib/ids/HashedModuleIdsPlugin.js +2 -1
  149. package/lib/index.js +49 -3
  150. package/lib/javascript/ChunkFormatHelpers.js +4 -3
  151. package/lib/javascript/JavascriptGenerator.js +8 -1
  152. package/lib/javascript/JavascriptModule.js +1 -0
  153. package/lib/javascript/JavascriptModulesPlugin.js +73 -72
  154. package/lib/javascript/JavascriptParser.js +1970 -900
  155. package/lib/javascript/StartupHelpers.js +27 -3
  156. package/lib/javascript/data.js +172 -0
  157. package/lib/javascript/grammar.js +5546 -0
  158. package/lib/javascript/parser.js +1500 -0
  159. package/lib/javascript/regexp.js +1762 -0
  160. package/lib/javascript/regexpData.js +51 -0
  161. package/lib/javascript/syntax.js +9061 -5262
  162. package/lib/json/JsonGenerator.js +7 -1
  163. package/lib/library/ModuleLibraryPlugin.js +171 -132
  164. package/lib/loaders/LoaderRunner.js +137 -9
  165. package/lib/node/NodeWatchFileSystem.js +3 -9
  166. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
  167. package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
  168. package/lib/optimize/AggressiveMergingPlugin.js +3 -5
  169. package/lib/optimize/ConcatenatedModule.js +178 -120
  170. package/lib/optimize/ConstExportsPlugin.js +50 -39
  171. package/lib/optimize/FlagIncludedChunksPlugin.js +3 -11
  172. package/lib/optimize/InlineExports.js +20 -123
  173. package/lib/optimize/InnerGraphPlugin.js +7 -13
  174. package/lib/optimize/LimitChunkCountPlugin.js +5 -8
  175. package/lib/optimize/MangleExportsPlugin.js +13 -4
  176. package/lib/optimize/ModuleConcatenationPlugin.js +27 -5
  177. package/lib/optimize/RealContentHashPlugin.js +68 -9
  178. package/lib/optimize/SideEffectsFlagPlugin.js +24 -28
  179. package/lib/optimize/SplitChunksPlugin.js +2 -4
  180. package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
  181. package/lib/performance/BroadContextsPlugin.js +1 -1
  182. package/lib/performance/CacheEffectivenessPlugin.js +7 -7
  183. package/lib/performance/DuplicateModulesPlugin.js +57 -13
  184. package/lib/performance/EvalUsagePlugin.js +5 -2
  185. package/lib/performance/MissingSourceMapsPlugin.js +115 -0
  186. package/lib/performance/PureAnnotationsPlugin.js +6 -3
  187. package/lib/performance/SizeLimitsPlugin.js +2 -4
  188. package/lib/performance/TopLevelThisPlugin.js +5 -4
  189. package/lib/performance/UnusedAssetsPlugin.js +109 -0
  190. package/lib/performance/UnusedFederationPlugin.js +147 -0
  191. package/lib/performance/UnusedModulesPlugin.js +141 -0
  192. package/lib/performance/UnusedReexportsPlugin.js +1 -55
  193. package/lib/performance/isOnlyReexported.js +65 -0
  194. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +25 -5
  195. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +8 -8
  196. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +9 -0
  197. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +9 -0
  198. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +9 -0
  199. package/lib/prefetch/ResourceHintPlugin.js +18 -23
  200. package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
  201. package/lib/prefetch/StartupAssetHintRuntimeModule.js +16 -10
  202. package/lib/rules/RuleSetCompiler.js +211 -4
  203. package/lib/runtime/AsyncModuleRuntimeModule.js +98 -66
  204. package/lib/runtime/AutoPublicPathRuntimeModule.js +9 -0
  205. package/lib/runtime/BaseUriRuntimeModule.js +9 -0
  206. package/lib/runtime/ChunkNameRuntimeModule.js +9 -0
  207. package/lib/runtime/EnsureChunkRuntimeModule.js +35 -16
  208. package/lib/runtime/GetChunkFilenameRuntimeModule.js +12 -4
  209. package/lib/runtime/GetFullHashRuntimeModule.js +9 -0
  210. package/lib/runtime/GetMainFilenameRuntimeModule.js +9 -0
  211. package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +9 -0
  212. package/lib/runtime/GlobalRuntimeModule.js +11 -4
  213. package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
  214. package/lib/runtime/HelperRuntimeModule.js +10 -0
  215. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +305 -224
  216. package/lib/runtime/NonceRuntimeModule.js +9 -0
  217. package/lib/runtime/OnChunksLoadedRuntimeModule.js +67 -20
  218. package/lib/runtime/PublicPathRuntimeModule.js +9 -0
  219. package/lib/runtime/RuntimeIdRuntimeModule.js +9 -0
  220. package/lib/runtime/SpecNamespaceObjectRuntimeModule.js +90 -0
  221. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -0
  222. package/lib/runtime/StartupEntrypointRuntimeModule.js +9 -0
  223. package/lib/runtime/SystemContextRuntimeModule.js +9 -0
  224. package/lib/runtime/ToBinaryRuntimeModule.js +9 -0
  225. package/lib/schemes/DataUriPlugin.js +3 -6
  226. package/lib/schemes/VirtualUrlPlugin.js +1 -1
  227. package/lib/serialization/BinaryMiddleware.js +9 -9
  228. package/lib/serialization/FileMiddleware.js +16 -16
  229. package/lib/serialization/ObjectMiddleware.js +168 -139
  230. package/lib/sharing/ConsumeSharedPlugin.js +12 -0
  231. package/lib/sharing/ConsumeSharedRuntimeModule.js +11 -0
  232. package/lib/sharing/ShareRuntimeModule.js +9 -0
  233. package/lib/sharing/declaredShared.js +47 -0
  234. package/lib/stats/DefaultStatsFactoryPlugin.js +6 -5
  235. package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
  236. package/lib/typescript/TypeScriptPlugin.js +2 -3
  237. package/lib/url/URLParserPlugin.js +6 -8
  238. package/lib/util/LocConverter.js +4 -7
  239. package/lib/util/SourceProcessor.js +91 -91
  240. package/lib/util/async.js +292 -0
  241. package/lib/util/buildDiagnostics.js +69 -0
  242. package/lib/util/chainedImports.js +3 -4
  243. package/lib/util/concatenate.js +4 -4
  244. package/lib/util/createHooksRegistry.js +1 -2
  245. package/lib/util/dataURL.js +2 -3
  246. package/lib/util/deterministicGrouping.js +8 -13
  247. package/lib/util/findGraphRoots.js +6 -13
  248. package/lib/util/fs.js +27 -1
  249. package/lib/util/globUtils.js +1 -1
  250. package/lib/util/handlerKeys.js +40 -0
  251. package/lib/util/hash/wasm-hash.js +3 -4
  252. package/lib/util/identifier.js +20 -0
  253. package/lib/util/internalSerializables.js +5 -1
  254. package/lib/util/registerExternalSerializer.js +6 -45
  255. package/lib/util/semver.js +5 -3
  256. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +9 -0
  257. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
  258. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -1
  259. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -1
  260. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +12 -4
  261. package/lib/wasm-sync/WebAssemblyGenerator.js +6 -1
  262. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -1
  263. package/lib/wasm-sync/WebAssemblyUtils.js +2 -4
  264. package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
  265. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
  266. package/package.json +55 -46
  267. package/schemas/WebpackOptions.check.js +1 -1
  268. package/schemas/WebpackOptions.json +379 -66
  269. package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
  270. package/schemas/plugins/ManifestPlugin.check.js +1 -1
  271. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  272. package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
  273. package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
  274. package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
  275. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  276. package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
  277. package/schemas/plugins/dll/DllReferencePlugin.check.js +1 -1
  278. package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +1 -1
  279. package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
  280. package/types.d.ts +1723 -604
  281. package/lib/dependencies/ExportBindingInitFragment.js +0 -191
  282. package/lib/errors/EntrypointOverlapWarning.js +0 -45
  283. package/lib/performance/EntrypointOverlapPlugin.js +0 -122
package/types.d.ts CHANGED
@@ -4,7 +4,6 @@
4
4
  * Run `yarn fix:special` to update
5
5
  */
6
6
 
7
- import { Parser as ParserImport } from "acorn";
8
7
  import { Buffer } from "buffer";
9
8
  import {
10
9
  ArrayExpression,
@@ -58,7 +57,7 @@ import {
58
57
  ObjectExpression,
59
58
  ObjectPattern,
60
59
  PrivateIdentifier,
61
- Program,
60
+ Program as ProgramImport,
62
61
  Property,
63
62
  PropertyDefinition,
64
63
  RegExpLiteral,
@@ -67,7 +66,7 @@ import {
67
66
  SequenceExpression,
68
67
  SimpleCallExpression,
69
68
  SimpleLiteral,
70
- SourceLocation,
69
+ SourceLocation as SourceLocationImport,
71
70
  SpreadElement,
72
71
  StaticBlock,
73
72
  Super,
@@ -234,8 +233,11 @@ declare interface AbstractLibraryPluginOptions {
234
233
  */
235
234
  type: string;
236
235
  }
237
- declare interface AdditionalData {
238
- [index: string]: any;
236
+ type AdditionalData = AdditionalDataKnown & Record<string, any>;
237
+ declare interface AdditionalDataKnown {
238
+ /**
239
+ * the AST webpack should parse instead of the source
240
+ */
239
241
  webpackAST: object;
240
242
  }
241
243
  type AfterContextResolveData = ContextResolveData &
@@ -330,6 +332,26 @@ declare interface AllCodeGenerationSchemas {
330
332
  */
331
333
  chunkInitFragments: InitFragment<any>[];
332
334
 
335
+ /**
336
+ * native external reexport source and attributes
337
+ */
338
+ externalReexport: string;
339
+
340
+ /**
341
+ * export definitions left out of a javascript module's source on demand (see `KnownMeta.onDemandExports`), to be placed before its body where it is wrapped
342
+ */
343
+ exportsSource: string;
344
+
345
+ /**
346
+ * export definitions left out on demand that read the module's own declarations, to be placed after its body where it is wrapped
347
+ */
348
+ exportsBindingSource: string;
349
+
350
+ /**
351
+ * final name of each used export of a concatenated module whose definitions were left out on demand
352
+ */
353
+ exportsFinalName: Record<string, string>;
354
+
333
355
  /**
334
356
  * url for asset modules
335
357
  */
@@ -355,22 +377,11 @@ declare interface AllCodeGenerationSchemas {
355
377
  */
356
378
  "share-init": [{ shareScope: string; initStage: number; init: string }];
357
379
  }
358
- declare interface AnalyzableChunkUrls {
359
- /**
360
- * the urls that could be written, by chunk id
361
- */
362
- urls: Map<ChunkId, string>;
363
-
364
- /**
365
- * false when some chunk kept the runtime form, whose
366
- * ids the consumer then still resolves through the runtime name lookup
367
- */
368
- complete: boolean;
369
- }
370
380
  type AnalyzableForm =
371
381
  "import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
372
382
  type AnyLoaderContext = NormalModuleLoaderContext<any> &
373
- LoaderRunnerLoaderContext<any> &
383
+ LoaderRunnerMutableContext<any> &
384
+ LoaderRunnerReadonlyContext<any> &
374
385
  LoaderPluginLoaderContext &
375
386
  HotModuleReplacementPluginLoaderContext;
376
387
 
@@ -586,6 +597,28 @@ declare abstract class AssetSourceGenerator extends Generator {
586
597
  ): null | Source;
587
598
  }
588
599
  declare abstract class AssetSourceParser extends ParserClass {}
600
+ declare interface AssetSymlink {
601
+ /**
602
+ * what the link points at, left as it is written
603
+ */
604
+ target: string;
605
+
606
+ /**
607
+ * whether it points at a directory, which is what Windows needs in order to create one
608
+ */
609
+ isDirectory: boolean;
610
+ }
611
+ declare interface AssetTimestamps {
612
+ /**
613
+ * last access time, in milliseconds
614
+ */
615
+ atime: number;
616
+
617
+ /**
618
+ * last modification time, in milliseconds
619
+ */
620
+ mtime: number;
621
+ }
589
622
  declare class AsyncDependenciesBlock extends DependenciesBlock {
590
623
  constructor(
591
624
  groupOptions: null | string | GroupOptionsAsyncDependenciesBlock,
@@ -880,7 +913,7 @@ declare interface BasenameCacheEntry {
880
913
  */
881
914
  declare abstract class BasicEvaluatedExpression {
882
915
  expression?:
883
- | Program
916
+ | ProgramImport
884
917
  | ImportDeclaration
885
918
  | ExportNamedDeclaration
886
919
  | ExportAllDeclaration
@@ -1139,7 +1172,7 @@ declare abstract class BasicEvaluatedExpression {
1139
1172
  */
1140
1173
  setExpression(
1141
1174
  expression?:
1142
- | Program
1175
+ | ProgramImport
1143
1176
  | ImportDeclaration
1144
1177
  | ExportNamedDeclaration
1145
1178
  | ExportAllDeclaration
@@ -1229,6 +1262,17 @@ declare interface Bootstrap {
1229
1262
  afterStartup: string[];
1230
1263
  allowInlineStartup: boolean;
1231
1264
  }
1265
+
1266
+ /**
1267
+ * Which disjunction branch a named group sits in, so that the same name in two
1268
+ * alternatives of one disjunction is allowed and a repeat in one is not.
1269
+ */
1270
+ declare abstract class BranchID {
1271
+ parent: null | BranchID;
1272
+ base: BranchID;
1273
+ separatedFrom(alt: BranchID): boolean;
1274
+ sibling(): BranchID;
1275
+ }
1232
1276
  type BufferEncoding =
1233
1277
  | "ascii"
1234
1278
  | "utf8"
@@ -1283,8 +1327,82 @@ declare interface BufferedMap {
1283
1327
  */
1284
1328
  file: string;
1285
1329
  }
1330
+ type BuildDependencyItem =
1331
+ | string
1332
+ | {
1333
+ /**
1334
+ * Request to a dependency (resolved as directory relative to the context directory).
1335
+ */
1336
+ dependency: string;
1337
+ /**
1338
+ * When true, the dependency may be missing. Existence changes invalidate the cache.
1339
+ */
1340
+ optional?: boolean;
1341
+ };
1342
+ declare interface BuildDiagnostics {
1343
+ /**
1344
+ * what parser plugins reported as optimization bailouts, replayed into the module graph of every compilation that reuses the module
1345
+ */
1346
+ optimizationBailouts?: string[];
1347
+
1348
+ /**
1349
+ * the statement whose side effect keeps the module in the bundle, as `type at location`
1350
+ */
1351
+ sideEffectStatement?: string;
1352
+
1353
+ /**
1354
+ * how many `#__PURE__` annotations sit where the parser does not read them
1355
+ */
1356
+ ineffectivePureAnnotations?: number;
1357
+
1358
+ /**
1359
+ * how many times the module reads `this` at its top level
1360
+ */
1361
+ topLevelThis?: number;
1362
+
1363
+ /**
1364
+ * true when the module calls `eval` directly
1365
+ */
1366
+ usesEval?: boolean;
1367
+
1368
+ /**
1369
+ * reasons why the module is not cacheable (e.g. paths of loaders that marked it)
1370
+ */
1371
+ notCacheableReasons?: string[];
1372
+ }
1286
1373
  type BuildInfo = KnownBuildInfo & Record<string, any>;
1287
1374
  type BuildMeta = KnownBuildMeta & Record<string, any>;
1375
+ declare interface BuiltinEmbeddedRendererOptions {
1376
+ /**
1377
+ * what the target can read (the CSS entries of `output.environment`), so a spelling it would not understand is never reached for; only read while printing, and an absent entry means the modern spelling is available
1378
+ */
1379
+ environment?: CssEnvironment;
1380
+
1381
+ /**
1382
+ * rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`); off by default because it earns nothing once the asset is compressed, and only read while printing. A time is always rewritten
1383
+ */
1384
+ convertLengthUnits?: boolean;
1385
+
1386
+ /**
1387
+ * shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
1388
+ */
1389
+ rewriteCustomProperties?: boolean;
1390
+
1391
+ /**
1392
+ * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
1393
+ */
1394
+ transforms?: CssTransformOptions;
1395
+
1396
+ /**
1397
+ * names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
1398
+ */
1399
+ unusedSymbols?: string[];
1400
+
1401
+ /**
1402
+ * each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
1403
+ */
1404
+ pseudoClasses?: { [index: string]: string };
1405
+ }
1288
1406
  declare abstract class ByTypeGenerator extends Generator {
1289
1407
  map: { [index: string]: undefined | Generator };
1290
1408
  generateError?: (
@@ -1307,7 +1425,9 @@ declare class CacheClass {
1307
1425
  hooks: {
1308
1426
  get: AsyncSeriesBailHook<[string, null | Etag, GotHandler<any>[]], any>;
1309
1427
  store: AsyncParallelHook<[string, null | Etag, any]>;
1310
- storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
1428
+ storeBuildDependencies: AsyncParallelHook<
1429
+ [Iterable<string>, Iterable<string>]
1430
+ >;
1311
1431
  beginIdle: SyncHook<[]>;
1312
1432
  endIdle: AsyncParallelHook<[]>;
1313
1433
  shutdown: AsyncParallelHook<[]>;
@@ -1340,6 +1460,7 @@ declare class CacheClass {
1340
1460
  */
1341
1461
  storeBuildDependencies(
1342
1462
  dependencies: Iterable<string>,
1463
+ optionalDependencies: Iterable<string>,
1343
1464
  callback: CallbackCacheCache<void>
1344
1465
  ): void;
1345
1466
 
@@ -3003,6 +3124,10 @@ type CodeGenValue<K extends string> = K extends
3003
3124
  | "topLevelDeclarations"
3004
3125
  | "freeNames"
3005
3126
  | "chunkInitFragments"
3127
+ | "externalReexport"
3128
+ | "exportsSource"
3129
+ | "exportsBindingSource"
3130
+ | "exportsFinalName"
3006
3131
  | "url"
3007
3132
  | "fullContentHash"
3008
3133
  ? AllCodeGenerationSchemas[K]
@@ -3234,7 +3359,7 @@ declare interface ColorsOptions {
3234
3359
  type CommentJavascriptParser = CommentImport & {
3235
3360
  start: number;
3236
3361
  end: number;
3237
- loc?: null | SourceLocation;
3362
+ loc?: null | SourceLocationImport;
3238
3363
  };
3239
3364
  declare interface CommonJsImportSettings {
3240
3365
  name?: string;
@@ -3540,6 +3665,7 @@ declare class Compilation {
3540
3665
  contextDependencies: LazySet<string>;
3541
3666
  missingDependencies: LazySet<string>;
3542
3667
  buildDependencies: LazySet<string>;
3668
+ optionalBuildDependencies: LazySet<string>;
3543
3669
 
3544
3670
  /**
3545
3671
  * @deprecated
@@ -4353,7 +4479,7 @@ declare class Compiler {
4353
4479
  check?: (value: T) => boolean
4354
4480
  ): void;
4355
4481
  }
4356
- type ComponentValue = Token | FunctionNode | SimpleBlock;
4482
+ type ComponentValue = TokenSyntax | FunctionNode | SimpleBlock;
4357
4483
  declare class ConcatSource extends Source {
4358
4484
  constructor(...args: ConcatSourceChild[]);
4359
4485
  getChildren(): Source[];
@@ -4407,18 +4533,18 @@ declare interface ConcatenatedModuleInfo {
4407
4533
  eager: boolean;
4408
4534
  module: Module;
4409
4535
  index: number;
4410
- ast?: Program;
4536
+ ast?: ProgramImport;
4411
4537
  internalSource?: Source;
4412
4538
  source?: ReplaceSource;
4413
4539
  chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
4414
4540
  runtimeRequirements?: ReadonlySet<string>;
4415
- globalScope?: Scope;
4541
+ globalScope?: ScopeScopeAnalyzer;
4416
4542
 
4417
4543
  /**
4418
4544
  * the module's free references
4419
4545
  */
4420
4546
  unresolvedReferences?: Reference[];
4421
- moduleScope?: Scope;
4547
+ moduleScope?: ScopeScopeAnalyzer;
4422
4548
  internalNames: Map<string, string>;
4423
4549
  exportMap?: Map<string, string>;
4424
4550
  rawExportMap?: Map<string, string>;
@@ -5301,6 +5427,167 @@ declare interface ContextTimestampAndHash {
5301
5427
  symlinks?: Set<string>;
5302
5428
  }
5303
5429
  type ContextTypes = KnownContext & Record<any, any>;
5430
+ declare interface CopiedFileData {
5431
+ /**
5432
+ * absolute path of the source file
5433
+ */
5434
+ absoluteFilename: string;
5435
+
5436
+ /**
5437
+ * path of the source file, relative to the compiler context
5438
+ */
5439
+ sourceFilename: string;
5440
+
5441
+ /**
5442
+ * path of the copied file, relative to `to`
5443
+ */
5444
+ filename: string;
5445
+ }
5446
+
5447
+ /**
5448
+ * Options of the glob in 'from'.
5449
+ */
5450
+ declare interface CopyGlobOptions {
5451
+ /**
5452
+ * Whether the glob matches the case of a file name. Defaults to 'true'.
5453
+ */
5454
+ caseSensitive?: boolean;
5455
+
5456
+ /**
5457
+ * How many directory levels below the base of the glob are read, where '1' reads only the base itself. Defaults to no limit.
5458
+ */
5459
+ deep?: number;
5460
+
5461
+ /**
5462
+ * Whether the glob reaches a file or a directory whose name starts with a dot without naming it. Defaults to 'true'.
5463
+ */
5464
+ dot?: boolean;
5465
+
5466
+ /**
5467
+ * Whether a symbolic link is resolved and copied as what it points at. Defaults to 'true'; 'false' copies the link itself, pointing where it already points.
5468
+ */
5469
+ followSymlinks?: boolean;
5470
+
5471
+ /**
5472
+ * Globs of the files which are not copied, resolved like 'from'. A directory one of them matches is skipped whole.
5473
+ */
5474
+ ignore?: string[];
5475
+ }
5476
+
5477
+ /**
5478
+ * A pattern of files which are copied to the output directory.
5479
+ */
5480
+ declare interface CopyObjectPattern {
5481
+ /**
5482
+ * Directory 'from' is resolved from and the copied paths are relative to. Defaults to the compiler context, and to what 'from' names when it is not a glob.
5483
+ */
5484
+ context?: string;
5485
+
5486
+ /**
5487
+ * Filename template of a copied file inside 'to'. Defaults to '[path][base]', which keeps the name and the directory structure below 'from'.
5488
+ */
5489
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
5490
+
5491
+ /**
5492
+ * Glob or path from where the files are copied.
5493
+ */
5494
+ from: string | string[];
5495
+
5496
+ /**
5497
+ * Options of the glob in 'from'.
5498
+ */
5499
+ globOptions?: CopyGlobOptions;
5500
+
5501
+ /**
5502
+ * Asset info of a copied file.
5503
+ */
5504
+ info?: AssetInfo | ((file: CopiedFileData) => AssetInfo);
5505
+
5506
+ /**
5507
+ * Whether a copied file keeps the permissions of the file it was copied from. Defaults to 'false', which gives it the ones a new file gets. Has no effect on Windows.
5508
+ */
5509
+ preservePermissions?: boolean;
5510
+
5511
+ /**
5512
+ * Whether a copied file keeps the access and modification times of the file it was copied from. Defaults to 'false', which stamps it with the time it was written.
5513
+ */
5514
+ preserveTimestamps?: boolean;
5515
+
5516
+ /**
5517
+ * Directory the files are copied to, relative to 'output.path', which is where they land by default.
5518
+ */
5519
+ to?: string | ((file: CopiedFileData) => string);
5520
+
5521
+ /**
5522
+ * Modifies the content of a copied file.
5523
+ */
5524
+ transform?:
5525
+ | {
5526
+ /**
5527
+ * Whether the result of the transform is cached, and what it is cached under. Defaults to 'true'.
5528
+ */
5529
+ cache?:
5530
+ | boolean
5531
+ | {
5532
+ /**
5533
+ * Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.
5534
+ */
5535
+ keys?:
5536
+ | CopyTransformCacheKeys
5537
+ | ((
5538
+ defaultKeys: CopyTransformCacheKeys,
5539
+ absoluteFilename: string
5540
+ ) =>
5541
+ CopyTransformCacheKeys | Promise<CopyTransformCacheKeys>);
5542
+ };
5543
+ /**
5544
+ * Modifies the content of a copied file.
5545
+ */
5546
+ transformer: (
5547
+ content: Buffer,
5548
+ absoluteFilename: string
5549
+ ) => string | Buffer | Promise<string | Buffer>;
5550
+ }
5551
+ | ((
5552
+ content: Buffer,
5553
+ absoluteFilename: string
5554
+ ) => string | Buffer | Promise<string | Buffer>);
5555
+ }
5556
+
5557
+ /**
5558
+ * Patterns of files which are copied to the output directory, and the options of the copying itself.
5559
+ */
5560
+ declare interface CopyOptions {
5561
+ /**
5562
+ * Maximum number of files which are read at the same time. Defaults to '100'.
5563
+ */
5564
+ concurrency?: number;
5565
+
5566
+ /**
5567
+ * Patterns of files which are copied to the output directory.
5568
+ */
5569
+ patterns: CopyPattern[];
5570
+
5571
+ /**
5572
+ * Stage of 'processAssets' the files are copied at. Defaults to 'Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL', where a copied file is still minimized and compressed like every other asset; a later stage leaves it as it is on disk.
5573
+ */
5574
+ stage?: number;
5575
+ }
5576
+ type CopyPattern = string | CopyObjectPattern;
5577
+ declare class CopyPlugin {
5578
+ constructor(options: CopyOptions);
5579
+ patterns: CopyPattern[];
5580
+ concurrency: number;
5581
+ stage: number;
5582
+
5583
+ /**
5584
+ * Apply the plugin
5585
+ */
5586
+ apply(compiler: Compiler): void;
5587
+ }
5588
+ declare interface CopyTransformCacheKeys {
5589
+ [index: string]: any;
5590
+ }
5304
5591
  type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
5305
5592
  type CreateReadStreamFSImplementation = FSImplementation & {
5306
5593
  read: (...args: any[]) => any;
@@ -5504,6 +5791,11 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
5504
5791
  linkInsert: SyncWaterfallHook<[string, Chunk], string>;
5505
5792
  };
5506
5793
 
5794
+ /**
5795
+ * The answer a runtime module gives when it installs no chunk handler at all
5796
+ */
5797
+ static NO_CHUNK_HANDLERS: [string, string][];
5798
+
5507
5799
  /**
5508
5800
  * Runtime modules without any dependencies to other runtime modules
5509
5801
  */
@@ -5943,6 +6235,11 @@ declare interface CssPrintOptions {
5943
6235
  */
5944
6236
  convertLengthUnits?: boolean;
5945
6237
 
6238
+ /**
6239
+ * give a rule the selectors of a later one printing the same block, past the rules between them; off by default, since it reorders the cascade and is sound only where nothing between declares what the block does
6240
+ */
6241
+ mergeDistantRules?: boolean;
6242
+
5946
6243
  /**
5947
6244
  * shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
5948
6245
  */
@@ -5957,6 +6254,16 @@ declare interface CssPrintOptions {
5957
6254
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
5958
6255
  */
5959
6256
  transforms?: CssTransformOptions;
6257
+
6258
+ /**
6259
+ * names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
6260
+ */
6261
+ unusedSymbols?: string[];
6262
+
6263
+ /**
6264
+ * each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
6265
+ */
6266
+ pseudoClasses?: { [index: string]: string };
5960
6267
  }
5961
6268
  declare interface CssProcessOptions {
5962
6269
  /**
@@ -6004,6 +6311,11 @@ declare interface CssProcessOptions {
6004
6311
  */
6005
6312
  convertLengthUnits?: boolean;
6006
6313
 
6314
+ /**
6315
+ * give a rule the selectors of a later one printing the same block, past the rules between them; off by default, since it reorders the cascade and is sound only where nothing between declares what the block does
6316
+ */
6317
+ mergeDistantRules?: boolean;
6318
+
6007
6319
  /**
6008
6320
  * shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
6009
6321
  */
@@ -6017,6 +6329,16 @@ declare interface CssProcessOptions {
6017
6329
  info: { type: string; hostType: string }
6018
6330
  ) => undefined | string;
6019
6331
 
6332
+ /**
6333
+ * each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
6334
+ */
6335
+ pseudoClasses?: { [index: string]: string };
6336
+
6337
+ /**
6338
+ * names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
6339
+ */
6340
+ unusedSymbols?: string[];
6341
+
6020
6342
  /**
6021
6343
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
6022
6344
  */
@@ -6028,11 +6350,36 @@ declare interface CssProcessOptions {
6028
6350
  deferEmbeddedSource?: DeferredEmbeddedSource[];
6029
6351
  }
6030
6352
  declare interface CssTransformOptions {
6353
+ /**
6354
+ * write a color the target cannot read as an extra declaration before it, in a spelling it does read
6355
+ */
6356
+ colorFallbacks?: boolean;
6357
+
6358
+ /**
6359
+ * write a spelling the target cannot read as one it can — the same value, said another way
6360
+ */
6361
+ lowerUnsupported?: boolean;
6362
+
6363
+ /**
6364
+ * write a name that matches ASCII case-insensitively — an at-rule, property, pseudo, function, unit or keyword — in lowercase
6365
+ */
6366
+ foldCase?: boolean;
6367
+
6368
+ /**
6369
+ * write an escaped identifier the shortest way that names it, in a value or an id
6370
+ */
6371
+ rewriteEscapes?: boolean;
6372
+
6031
6373
  /**
6032
6374
  * which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text
6033
6375
  */
6034
6376
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
6035
6377
 
6378
+ /**
6379
+ * write the query or selector list a `@custom-media` / `@custom-selector` names wherever one asks for it, and drop the rule that named it
6380
+ */
6381
+ resolveCustomAtRules?: boolean;
6382
+
6036
6383
  /**
6037
6384
  * write a family of longhands as the one shorthand that sets them
6038
6385
  */
@@ -6058,6 +6405,11 @@ declare interface CssTransformOptions {
6058
6405
  */
6059
6406
  removeDeadRules?: boolean;
6060
6407
 
6408
+ /**
6409
+ * write a `:dir()` the target cannot read as the `[dir]` attribute selector, which reads the attribute rather than the directionality an element may inherit
6410
+ */
6411
+ rewriteDirSelector?: boolean;
6412
+
6061
6413
  /**
6062
6414
  * write each color in the shortest spelling of the same value
6063
6415
  */
@@ -6205,8 +6557,8 @@ declare class DelegatedPlugin {
6205
6557
  /**
6206
6558
  * Creates an instance of DelegatedPlugin.
6207
6559
  */
6208
- constructor(options: Options);
6209
- options: Options;
6560
+ constructor(options: OptionsDelegatedModuleFactoryPlugin);
6561
+ options: OptionsDelegatedModuleFactoryPlugin;
6210
6562
 
6211
6563
  /**
6212
6564
  * Applies the plugin by registering its hooks on the compiler.
@@ -6551,6 +6903,11 @@ declare interface DependencyTemplateContext {
6551
6903
  * chunkInitFragments
6552
6904
  */
6553
6905
  chunkInitFragments: InitFragment<GenerateContext>[];
6906
+
6907
+ /**
6908
+ * get access to the code generation data
6909
+ */
6910
+ getData?: () => CodeGenerationResultData;
6554
6911
  }
6555
6912
  declare abstract class DependencyTemplates {
6556
6913
  /**
@@ -7005,6 +7362,19 @@ declare interface DotenvPluginOptions {
7005
7362
  */
7006
7363
  template?: string[];
7007
7364
  }
7365
+
7366
+ declare interface DualModeResolve {
7367
+ (
7368
+ context: string,
7369
+ request: string,
7370
+ callback: (
7371
+ err: null | ErrorWithDetail,
7372
+ res?: string | false,
7373
+ req?: ResolveRequest
7374
+ ) => void
7375
+ ): void;
7376
+ (context: string, request: string): Promise<string>;
7377
+ }
7008
7378
  declare class DynamicEntryPlugin {
7009
7379
  /**
7010
7380
  * Creates an instance of DynamicEntryPlugin.
@@ -7018,16 +7388,44 @@ declare class DynamicEntryPlugin {
7018
7388
  */
7019
7389
  apply(compiler: Compiler): void;
7020
7390
  }
7021
- type Effect = EffectUse | EffectBasic;
7022
- declare interface EffectBasic {
7023
- type: string;
7024
- value: any;
7025
- }
7026
- declare interface EffectData {
7027
- resource?: string;
7028
- realResource?: string;
7029
- resourceQuery?: string;
7030
- resourceFragment?: string;
7391
+ type EcmaVersion =
7392
+ | 3
7393
+ | 5
7394
+ | 6
7395
+ | 7
7396
+ | 8
7397
+ | 9
7398
+ | 10
7399
+ | 11
7400
+ | 12
7401
+ | 13
7402
+ | 14
7403
+ | 15
7404
+ | 16
7405
+ | 17
7406
+ | 2015
7407
+ | 2016
7408
+ | 2017
7409
+ | 2018
7410
+ | 2019
7411
+ | 2020
7412
+ | 2021
7413
+ | 2022
7414
+ | 2023
7415
+ | 2024
7416
+ | 2025
7417
+ | 2026
7418
+ | "latest";
7419
+ type Effect = EffectUse | EffectBasic;
7420
+ declare interface EffectBasic {
7421
+ type: string;
7422
+ value: any;
7423
+ }
7424
+ declare interface EffectData {
7425
+ resource?: string;
7426
+ realResource?: string;
7427
+ resourceQuery?: string;
7428
+ resourceFragment?: string;
7031
7429
  scheme?: string;
7032
7430
  attributes?: ImportAttributes;
7033
7431
  mimetype?: string;
@@ -7665,6 +8063,12 @@ declare interface Environment {
7665
8063
  * The environment supports template literals.
7666
8064
  */
7667
8065
  templateLiteral?: boolean;
8066
+
8067
+ /**
8068
+ * The environment supports top-level await ('await x' at the top level of a module).
8069
+ * @since 5.111.0
8070
+ */
8071
+ topLevelAwait?: boolean;
7668
8072
  }
7669
8073
  declare class EnvironmentPlugin {
7670
8074
  /**
@@ -7872,13 +8276,6 @@ declare interface Experiments {
7872
8276
  */
7873
8277
  lazyCompilation?: boolean | LazyCompilationOptions;
7874
8278
 
7875
- /**
7876
- * Allow output javascript files as module source type.
7877
- * @since 5.0.0
7878
- * @experimental
7879
- */
7880
- outputModule?: boolean;
7881
-
7882
8279
  /**
7883
8280
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7884
8281
  * @since 5.106.0
@@ -7968,13 +8365,6 @@ declare interface ExperimentsNormalized {
7968
8365
  */
7969
8366
  lazyCompilation?: false | LazyCompilationOptions;
7970
8367
 
7971
- /**
7972
- * Allow output javascript files as module source type.
7973
- * @since 5.0.0
7974
- * @experimental
7975
- */
7976
- outputModule?: boolean;
7977
-
7978
8368
  /**
7979
8369
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7980
8370
  * @since 5.106.0
@@ -8124,7 +8514,9 @@ declare abstract class ExportInfo {
8124
8514
  isReexport(): undefined | boolean;
8125
8515
 
8126
8516
  /**
8127
- * Returns the target, undefined when there is no target, false when no target is valid.
8517
+ * Walks the reexport chain and returns the first target whose module passes
8518
+ * `validTargetModuleFilter`. Returns undefined when there is no target, false
8519
+ * when the chain ends without a valid module.
8128
8520
  */
8129
8521
  findTarget(
8130
8522
  moduleGraph: ModuleGraph,
@@ -8132,7 +8524,9 @@ declare abstract class ExportInfo {
8132
8524
  ): undefined | null | false | TargetItemWithoutConnection;
8133
8525
 
8134
8526
  /**
8135
- * Returns the target.
8527
+ * Resolves the reexport chain as far as `resolveTargetFilter` allows and
8528
+ * returns where it ends. Returns undefined when there is no target, the
8529
+ * targets disagree, or the chain is circular.
8136
8530
  */
8137
8531
  getTarget(
8138
8532
  moduleGraph: ModuleGraph,
@@ -8490,7 +8884,7 @@ declare interface ExposesConfig {
8490
8884
  declare interface ExposesObject {
8491
8885
  [index: string]: string | ExposesConfig | string[];
8492
8886
  }
8493
- type Expression =
8887
+ type ExpressionEstreeIndex =
8494
8888
  | ImportExpressionImport
8495
8889
  | UnaryExpression
8496
8890
  | ArrayExpression
@@ -8526,6 +8920,38 @@ declare interface ExpressionExpressionInfo {
8526
8920
  getMembersOptionals: () => boolean[];
8527
8921
  getMemberRanges: () => [number, number][];
8528
8922
  }
8923
+ type ExpressionParser =
8924
+ | (ImportExpressionImport & NodeLike)
8925
+ | (UnaryExpression & NodeLike)
8926
+ | (ArrayExpression & NodeLike)
8927
+ | (ArrowFunctionExpression & NodeLike)
8928
+ | (AssignmentExpression & NodeLike)
8929
+ | (AwaitExpression & NodeLike)
8930
+ | (BinaryExpression & NodeLike)
8931
+ | (SimpleCallExpression & NodeLike)
8932
+ | (NewExpression & NodeLike)
8933
+ | (ChainExpression & NodeLike)
8934
+ | (ClassExpression & NodeLike)
8935
+ | (ConditionalExpression & NodeLike)
8936
+ | (FunctionExpression & NodeLike)
8937
+ | (Identifier & NodeLike)
8938
+ | (SimpleLiteral & NodeLike)
8939
+ | (RegExpLiteral & NodeLike)
8940
+ | (BigIntLiteral & NodeLike)
8941
+ | (LogicalExpression & NodeLike)
8942
+ | (MemberExpression & NodeLike)
8943
+ | (MetaProperty & NodeLike)
8944
+ | (ObjectExpression & NodeLike)
8945
+ | (SequenceExpression & NodeLike)
8946
+ | (TaggedTemplateExpression & NodeLike)
8947
+ | (TemplateLiteral & NodeLike)
8948
+ | (ThisExpression & NodeLike)
8949
+ | (UpdateExpression & NodeLike)
8950
+ | (YieldExpression & NodeLike)
8951
+ | (NodeLike & {
8952
+ type: "ParenthesizedExpression";
8953
+ expression: ExpressionParser;
8954
+ });
8529
8955
  declare interface ExtensionAliasOption {
8530
8956
  alias: string | string[];
8531
8957
  extension: string;
@@ -8700,6 +9126,12 @@ declare class ExternalModule extends Module {
8700
9126
  normalModuleFactory: NormalModuleFactory
8701
9127
  ): void;
8702
9128
  canBeWrappedInConcatenation(): boolean;
9129
+
9130
+ /**
9131
+ * The request this external resolves to for its own type, with the record form
9132
+ * narrowed to its entry. An array is a module specifier plus a property path.
9133
+ */
9134
+ getResolvedRequest(): undefined | string | string[];
8703
9135
  static getCompilationHooks: (compilation: Compilation) => {
8704
9136
  /**
8705
9137
  * @since 5.106.0
@@ -8773,6 +9205,11 @@ declare interface ExternalModuleInfo {
8773
9205
  */
8774
9206
  deferredNamespaceObjectName?: string;
8775
9207
 
9208
+ /**
9209
+ * an import reads the spec namespace object the module hands out
9210
+ */
9211
+ specNamespaceObjectUsed: boolean;
9212
+
8776
9213
  /**
8777
9214
  * "default-with-named" namespace
8778
9215
  */
@@ -9102,7 +9539,7 @@ declare interface FileCacheOptions {
9102
9539
  /**
9103
9540
  * Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
9104
9541
  */
9105
- buildDependencies?: { [index: string]: string[] };
9542
+ buildDependencies?: { [index: string]: BuildDependencyItem[] };
9106
9543
 
9107
9544
  /**
9108
9545
  * Base directory for the cache (defaults to node_modules/.cache/webpack).
@@ -9333,6 +9770,7 @@ declare abstract class FileSystemInfo {
9333
9770
  resolveBuildDependencies(
9334
9771
  context: string,
9335
9772
  deps: Iterable<string>,
9773
+ optionalDeps: undefined | Iterable<string>,
9336
9774
  callback: (
9337
9775
  err?: null | Error,
9338
9776
  resolveBuildDependenciesResult?: ResolveBuildDependenciesResult
@@ -9499,12 +9937,23 @@ declare class Generator {
9499
9937
  [index: string]: undefined | Generator;
9500
9938
  }): ByTypeGenerator;
9501
9939
 
9940
+ /**
9941
+ * Returns what a module that failed to build says about it in the output.
9942
+ * The stack it carries is written relative to the context, keeping a
9943
+ * position only where a second build names the same one.
9944
+ */
9945
+ static buildErrorMessage(
9946
+ error: Error,
9947
+ requestShortener?: RequestShortener
9948
+ ): string;
9949
+
9502
9950
  /**
9503
9951
  * Returns the statement a module that failed to build throws when executed.
9504
9952
  */
9505
9953
  static throwBuildErrorCode(
9506
9954
  error: Error,
9507
- parseErrorConstructor?: string
9955
+ parseErrorConstructor?: string,
9956
+ requestShortener?: RequestShortener
9508
9957
  ): string;
9509
9958
  }
9510
9959
  declare interface GeneratorOptions {
@@ -9623,6 +10072,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
9623
10072
  | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
9624
10073
  allChunks: boolean;
9625
10074
 
10075
+ /**
10076
+ * The answer a runtime module gives when it installs no chunk handler at all
10077
+ */
10078
+ static NO_CHUNK_HANDLERS: [string, string][];
10079
+
9626
10080
  /**
9627
10081
  * Runtime modules without any dependencies to other runtime modules
9628
10082
  */
@@ -9650,6 +10104,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
9650
10104
  static getSourceBasicTypes(module: Module): ReadonlySet<string>;
9651
10105
  }
9652
10106
 
10107
+ declare interface GetOptionsMethod<OptionsType> {
10108
+ (): OptionsType;
10109
+ (schema: Parameters<typeof validateFunction>[0]): OptionsType;
10110
+ }
10111
+
9653
10112
  /**
9654
10113
  * Creates a callback wrapper that waits for a fixed number of completions and
9655
10114
  * forwards the first error immediately.
@@ -10058,10 +10517,6 @@ declare class HotModuleReplacementPlugin {
10058
10517
  */
10059
10518
  static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
10060
10519
  }
10061
-
10062
- /**
10063
- * These properties are added by the HotModuleReplacementPlugin
10064
- */
10065
10520
  declare interface HotModuleReplacementPluginLoaderContext {
10066
10521
  hot?: boolean;
10067
10522
  }
@@ -10114,6 +10569,7 @@ declare interface HtmlEmittedContext {
10114
10569
  declare interface HtmlEntryInfo {
10115
10570
  request: string;
10116
10571
  entryName: string;
10572
+ index: number;
10117
10573
  type:
10118
10574
  | "html"
10119
10575
  | "script"
@@ -10225,7 +10681,7 @@ declare class HtmlModulesPlugin {
10225
10681
  */
10226
10682
  static computeContentHash(
10227
10683
  content: string | Buffer,
10228
- outputOptions: Output
10684
+ outputOptions: OutputNormalizedWithDefaults
10229
10685
  ): string;
10230
10686
 
10231
10687
  /**
@@ -10235,9 +10691,14 @@ declare class HtmlModulesPlugin {
10235
10691
  */
10236
10692
  static getChunkFilenameTemplate(
10237
10693
  chunk: Chunk,
10238
- outputOptions: Output
10694
+ outputOptions: OutputNormalizedWithDefaults
10239
10695
  ): ChunkFilenameTemplate;
10240
10696
 
10697
+ /**
10698
+ * Returns true, when the chunk has html.
10699
+ */
10700
+ static chunkHasHtml(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
10701
+
10241
10702
  /**
10242
10703
  * Per-compilation hooks for the experimental HTML support.
10243
10704
  */
@@ -10381,14 +10842,11 @@ declare interface HtmlParserOptions {
10381
10842
  */
10382
10843
  urlHints?: UrlHintRule[];
10383
10844
  }
10384
- type HtmlPrintOptions = Pick<
10385
- CssProcessOptions,
10386
- "environment" | "convertLengthUnits" | "rewriteCustomProperties"
10387
- > & {
10388
- cssTransforms?: CssTransformOptions;
10845
+ declare interface HtmlPrintOptions {
10389
10846
  transforms?: HtmlTransformOptions;
10390
10847
  collapseWhitespace?: boolean | "all" | "conservative" | "smart";
10391
10848
  mergeStyles?: boolean;
10849
+ mergeScripts?: boolean;
10392
10850
  removeEmptyAttributes?: boolean;
10393
10851
  removeEmptyElements?: boolean;
10394
10852
  removeRedundantAttributes?: boolean | "all" | "smart";
@@ -10401,7 +10859,7 @@ type HtmlPrintOptions = Pick<
10401
10859
  ) => undefined | string;
10402
10860
  deferEmbeddedSource?: DeferredEmbeddedSource[];
10403
10861
  deferSrcdoc?: boolean;
10404
- };
10862
+ }
10405
10863
  declare interface HtmlProcessOptions {
10406
10864
  /**
10407
10865
  * context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
@@ -10418,26 +10876,6 @@ declare interface HtmlProcessOptions {
10418
10876
  */
10419
10877
  minimize?: boolean;
10420
10878
 
10421
- /**
10422
- * CSS's, not HTML's: handed to the CSS minifier that runs over an inline `<style>` and every `style=""`, so the inline copy of a declaration agrees with the `.css` asset
10423
- */
10424
- environment?: CssEnvironment;
10425
-
10426
- /**
10427
- * CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
10428
- */
10429
- convertLengthUnits?: boolean;
10430
-
10431
- /**
10432
- * CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
10433
- */
10434
- rewriteCustomProperties?: boolean;
10435
-
10436
- /**
10437
- * CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
10438
- */
10439
- cssTransforms?: CssTransformOptions;
10440
-
10441
10879
  /**
10442
10880
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
10443
10881
  */
@@ -10463,6 +10901,11 @@ declare interface HtmlProcessOptions {
10463
10901
  */
10464
10902
  mergeStyles?: boolean;
10465
10903
 
10904
+ /**
10905
+ * print a run of adjacent bare `<script>` elements whose bodies this print writes itself as one, which removes elements, hoists a later body's declarations into the ones before it, and lets a failing body end the whole run (default false)
10906
+ */
10907
+ mergeScripts?: boolean;
10908
+
10466
10909
  /**
10467
10910
  * print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
10468
10911
  */
@@ -10474,7 +10917,7 @@ declare interface HtmlProcessOptions {
10474
10917
  sortTokenLists?: boolean;
10475
10918
 
10476
10919
  /**
10477
- * drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match (default false)
10920
+ * drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match, and with them a value naming no keyword where that says the same (default false)
10478
10921
  */
10479
10922
  removeRedundantAttributes?: boolean | "all" | "smart";
10480
10923
 
@@ -10489,12 +10932,12 @@ declare interface HtmlProcessOptions {
10489
10932
  deferSrcdoc?: boolean;
10490
10933
 
10491
10934
  /**
10492
- * collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. A `style=""` stays with the built-in CSS minifier, whose text this print reads back to decide how the attribute is written. Takes precedence over `renderEmbeddedSource`
10935
+ * collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. Takes precedence over `renderEmbeddedSource`
10493
10936
  */
10494
10937
  deferEmbeddedSource?: DeferredEmbeddedSource[];
10495
10938
 
10496
10939
  /**
10497
- * renders each nested body this document embeds — an inline `<style>`, every `style=""` (handed over as a whole stylesheet, SVG's and MathML's included), a `<script>` holding JSON or JavaScript, an `<svg>` subtree, and the document an `<iframe srcdoc>` holds (decoded, and written back escaped). Replaces the built-in CSS and JSON minifiers wherever it answers, and returning anything but text falls back to them; it is the only way inline JavaScript, SVG and a nested document are reached at all
10940
+ * renders each nested body this document embeds — an inline `<style>`, every `style=""` (as the block's contents it is, SVG's and MathML's included), a `<script>` holding JSON or JavaScript (with `as` naming which production of it the body is — `"module"` for a `<script type=module>`, `"script"` for a classic one), every event handler attribute, with `as: "event-handler"` saying it is a function body rather than a script — the production a `return` at its top level is in, which a renderer whose engine takes only whole scripts wraps before it reads — an `<svg>` subtree, and the document an `<iframe srcdoc>` holds (decoded, and written back escaped). The only way any of them is minified: webpack minifies nothing here itself, and `builtinEmbeddedRenderer` is its own CSS and JSON minifiers for a caller to pass; returning anything but text leaves a body as written
10498
10941
  */
10499
10942
  renderEmbeddedSource?: (
10500
10943
  source: string,
@@ -10749,25 +11192,15 @@ declare interface HtmlTransformHtmlContext {
10749
11192
  }
10750
11193
  declare interface HtmlTransformOptions {
10751
11194
  /**
10752
- * write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name
11195
+ * write a boolean attribute as the bare name its presence already means; `true` only the spellings the spec canonicalizes, `"all"` any value
10753
11196
  */
10754
- collapseBooleanAttributes?: boolean;
11197
+ collapseBooleanAttributes?: boolean | "all";
10755
11198
 
10756
11199
  /**
10757
11200
  * which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text. A comment a parser or a server reads is kept whatever this says
10758
11201
  */
10759
11202
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
10760
11203
 
10761
- /**
10762
- * strip the whitespace between a JSON `<script>`'s tokens
10763
- */
10764
- minifyJson?: boolean;
10765
-
10766
- /**
10767
- * run the CSS minifier over an inline `<style>` and every `style=""`
10768
- */
10769
- minifyStyles?: boolean;
10770
-
10771
11204
  /**
10772
11205
  * drop or re-pick an attribute value's quotes
10773
11206
  */
@@ -10788,6 +11221,11 @@ declare interface HtmlTransformOptions {
10788
11221
  */
10789
11222
  normalizeNumericAttributes?: boolean;
10790
11223
 
11224
+ /**
11225
+ * drop the whitespace around a URL value (`href`, `src`, `action`, …), which resolving the URL skips over
11226
+ */
11227
+ normalizeUrlAttributes?: boolean;
11228
+
10791
11229
  /**
10792
11230
  * leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
10793
11231
  */
@@ -11280,6 +11718,15 @@ declare interface ImportMetaParserOptionsKnown {
11280
11718
  declare interface ImportMetaParserOptionsUnknown {
11281
11719
  [index: string]: boolean;
11282
11720
  }
11721
+
11722
+ declare interface ImportModuleMethod {
11723
+ (
11724
+ request: string,
11725
+ options: undefined | ImportModuleOptions,
11726
+ callback: (err?: null | Error, exports?: any) => void
11727
+ ): void;
11728
+ (request: string, options?: ImportModuleOptions): Promise<any>;
11729
+ }
11283
11730
  declare interface ImportModuleOptions {
11284
11731
  /**
11285
11732
  * the target layer
@@ -11434,13 +11881,19 @@ declare class InitFragment<GenerateContext> {
11434
11881
  declare abstract class InlinedUsedName {
11435
11882
  value: InlinedValue;
11436
11883
  suffix: string[];
11437
- render(comment: string): string;
11884
+ render(comment?: string): string;
11885
+
11886
+ /**
11887
+ * Updates the hash with the data contributed by this instance.
11888
+ */
11889
+ updateHash(hash: Hash): void;
11438
11890
  }
11439
11891
  declare abstract class InlinedValue {
11440
11892
  kind: InlinedValueKind;
11441
11893
  value?: null | string | number | boolean;
11442
11894
  renderLiteral(): string;
11443
11895
  render(comment: string): string;
11896
+ equals(other: InlinedValue): boolean;
11444
11897
  serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
11445
11898
  deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
11446
11899
  }
@@ -11715,15 +12168,6 @@ declare class JavascriptModulesPlugin {
11715
12168
  [Module, Partial<RenderBootstrapContext>],
11716
12169
  string | void
11717
12170
  >;
11718
- /**
11719
- * Offers a module's rendered export-definition call to a consumer that can place
11720
- * it better — a library whose entry exports the same bindings natively takes it
11721
- * over and emits it only where the module is wrapped. Return true to take it.
11722
- */
11723
- onDemandExportsGeneration: SyncBailHook<
11724
- [Module, RuntimeSpec, string, boolean],
11725
- boolean | void
11726
- >;
11727
12171
  /**
11728
12172
  * @since 5.22.0
11729
12173
  */
@@ -11804,15 +12248,6 @@ declare class JavascriptModulesPlugin {
11804
12248
  [Module, Partial<RenderBootstrapContext>],
11805
12249
  string | void
11806
12250
  >;
11807
- /**
11808
- * Offers a module's rendered export-definition call to a consumer that can place
11809
- * it better — a library whose entry exports the same bindings natively takes it
11810
- * over and emits it only where the module is wrapped. Return true to take it.
11811
- */
11812
- onDemandExportsGeneration: SyncBailHook<
11813
- [Module, RuntimeSpec, string, boolean],
11814
- boolean | void
11815
- >;
11816
12251
  /**
11817
12252
  * @since 5.22.0
11818
12253
  */
@@ -11893,15 +12328,6 @@ declare class JavascriptModulesPlugin {
11893
12328
  [Module, Partial<RenderBootstrapContext>],
11894
12329
  string | void
11895
12330
  >;
11896
- /**
11897
- * Offers a module's rendered export-definition call to a consumer that can place
11898
- * it better — a library whose entry exports the same bindings natively takes it
11899
- * over and emits it only where the module is wrapped. Return true to take it.
11900
- */
11901
- onDemandExportsGeneration: SyncBailHook<
11902
- [Module, RuntimeSpec, string, boolean],
11903
- boolean | void
11904
- >;
11905
12331
  /**
11906
12332
  * @since 5.22.0
11907
12333
  */
@@ -11984,15 +12410,6 @@ declare class JavascriptModulesPlugin {
11984
12410
  [Module, Partial<RenderBootstrapContext>],
11985
12411
  string | void
11986
12412
  >;
11987
- /**
11988
- * Offers a module's rendered export-definition call to a consumer that can place
11989
- * it better — a library whose entry exports the same bindings natively takes it
11990
- * over and emits it only where the module is wrapped. Return true to take it.
11991
- */
11992
- onDemandExportsGeneration: SyncBailHook<
11993
- [Module, RuntimeSpec, string, boolean],
11994
- boolean | void
11995
- >;
11996
12413
  /**
11997
12414
  * @since 5.22.0
11998
12415
  */
@@ -12073,15 +12490,6 @@ declare class JavascriptModulesPlugin {
12073
12490
  [Module, Partial<RenderBootstrapContext>],
12074
12491
  string | void
12075
12492
  >;
12076
- /**
12077
- * Offers a module's rendered export-definition call to a consumer that can place
12078
- * it better — a library whose entry exports the same bindings natively takes it
12079
- * over and emits it only where the module is wrapped. Return true to take it.
12080
- */
12081
- onDemandExportsGeneration: SyncBailHook<
12082
- [Module, RuntimeSpec, string, boolean],
12083
- boolean | void
12084
- >;
12085
12493
  /**
12086
12494
  * @since 5.22.0
12087
12495
  */
@@ -12162,15 +12570,6 @@ declare class JavascriptModulesPlugin {
12162
12570
  [Module, Partial<RenderBootstrapContext>],
12163
12571
  string | void
12164
12572
  >;
12165
- /**
12166
- * Offers a module's rendered export-definition call to a consumer that can place
12167
- * it better — a library whose entry exports the same bindings natively takes it
12168
- * over and emits it only where the module is wrapped. Return true to take it.
12169
- */
12170
- onDemandExportsGeneration: SyncBailHook<
12171
- [Module, RuntimeSpec, string, boolean],
12172
- boolean | void
12173
- >;
12174
12573
  /**
12175
12574
  * @since 5.22.0
12176
12575
  */
@@ -12250,15 +12649,6 @@ declare class JavascriptModulesPlugin {
12250
12649
  [Module, Partial<RenderBootstrapContext>],
12251
12650
  string | void
12252
12651
  >;
12253
- /**
12254
- * Offers a module's rendered export-definition call to a consumer that can place
12255
- * it better — a library whose entry exports the same bindings natively takes it
12256
- * over and emits it only where the module is wrapped. Return true to take it.
12257
- */
12258
- onDemandExportsGeneration: SyncBailHook<
12259
- [Module, RuntimeSpec, string, boolean],
12260
- boolean | void
12261
- >;
12262
12652
  /**
12263
12653
  * @since 5.22.0
12264
12654
  */
@@ -12420,6 +12810,11 @@ declare class JavascriptParser extends ParserClass {
12420
12810
  boolean | void
12421
12811
  >
12422
12812
  >;
12813
+ /**
12814
+ * Every statement the hoisting pass reads, which a tap on this turns
12815
+ * back into a walk of them all. Tap `preStatementByType` instead.
12816
+ * @deprecated TODO webpack 6: remove, with the statement walk it turns on
12817
+ */
12423
12818
  preStatement: SyncBailHook<
12424
12819
  [
12425
12820
  | ImportDeclaration
@@ -12454,6 +12849,9 @@ declare class JavascriptParser extends ParserClass {
12454
12849
  boolean | void
12455
12850
  >;
12456
12851
  /**
12852
+ * Each declaration the parser records: a variable, function or class
12853
+ * one. Any other type turns the pass back into a walk of every
12854
+ * statement, and goes away with that walk in webpack 6.
12457
12855
  * @since 5.109.0
12458
12856
  */
12459
12857
  preStatementByType: HookMap<
@@ -12491,6 +12889,11 @@ declare class JavascriptParser extends ParserClass {
12491
12889
  boolean | void
12492
12890
  >
12493
12891
  >;
12892
+ /**
12893
+ * Every statement the block pass reads, which a tap on this turns back
12894
+ * into a walk of them all. Tap `blockPreStatementByType` instead.
12895
+ * @deprecated TODO webpack 6: remove, with the statement walk it turns on
12896
+ */
12494
12897
  blockPreStatement: SyncBailHook<
12495
12898
  [
12496
12899
  | ImportDeclaration
@@ -12525,6 +12928,9 @@ declare class JavascriptParser extends ParserClass {
12525
12928
  boolean | void
12526
12929
  >;
12527
12930
  /**
12931
+ * Each statement the parser records for the block pass: a variable, class
12932
+ * or export declaration. Any other type turns the pass back into a walk
12933
+ * of every statement, and goes away with that walk in webpack 6.
12528
12934
  * @since 5.109.0
12529
12935
  */
12530
12936
  blockPreStatementByType: HookMap<
@@ -12599,10 +13005,13 @@ declare class JavascriptParser extends ParserClass {
12599
13005
  /**
12600
13006
  * @since 5.105.0
12601
13007
  */
12602
- collectGuards: SyncBailHook<[Expression], void | GuardCollection>;
13008
+ collectGuards: SyncBailHook<
13009
+ [ExpressionEstreeIndex],
13010
+ void | GuardCollection
13011
+ >;
12603
13012
  classExtendsExpression: SyncBailHook<
12604
13013
  [
12605
- Expression,
13014
+ ExpressionEstreeIndex,
12606
13015
  ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
12607
13016
  ],
12608
13017
  boolean | void
@@ -12619,7 +13028,7 @@ declare class JavascriptParser extends ParserClass {
12619
13028
  */
12620
13029
  classBodyValue: SyncBailHook<
12621
13030
  [
12622
- Expression,
13031
+ ExpressionEstreeIndex,
12623
13032
  MethodDefinition | PropertyDefinition,
12624
13033
  ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
12625
13034
  ],
@@ -12728,16 +13137,20 @@ declare class JavascriptParser extends ParserClass {
12728
13137
  * @since 5.101.3
12729
13138
  */
12730
13139
  collectDestructuringAssignmentProperties: SyncBailHook<
12731
- [Expression],
13140
+ [ExpressionEstreeIndex],
12732
13141
  boolean | void
12733
13142
  >;
12734
- canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
12735
- rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
13143
+ canRename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
13144
+ rename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12736
13145
  assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
13146
+ write: HookMap<SyncBailHook<[WriteStatement], boolean | void>>;
13147
+ writeMemberChain: HookMap<
13148
+ SyncBailHook<[WriteStatement, string[]], boolean | void>
13149
+ >;
12737
13150
  assignMemberChain: HookMap<
12738
13151
  SyncBailHook<[AssignmentExpression, string[]], boolean | void>
12739
13152
  >;
12740
- typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
13153
+ typeof: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12741
13154
  importCall: SyncBailHook<
12742
13155
  [
12743
13156
  ImportExpressionJavascriptParser,
@@ -12788,7 +13201,13 @@ declare class JavascriptParser extends ParserClass {
12788
13201
  >;
12789
13202
  memberChainOfCallMemberChain: HookMap<
12790
13203
  SyncBailHook<
12791
- [Expression, string[], CallExpression, string[], [number, number][]],
13204
+ [
13205
+ ExpressionEstreeIndex,
13206
+ string[],
13207
+ CallExpression,
13208
+ string[],
13209
+ [number, number][]
13210
+ ],
12792
13211
  boolean | void
12793
13212
  >
12794
13213
  >;
@@ -12810,7 +13229,7 @@ declare class JavascriptParser extends ParserClass {
12810
13229
  * @since 5.71.0
12811
13230
  */
12812
13231
  binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
12813
- expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
13232
+ expression: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12814
13233
  expressionMemberChain: HookMap<
12815
13234
  SyncBailHook<
12816
13235
  [MemberExpression, string[], boolean[], [number, number][]],
@@ -12828,12 +13247,18 @@ declare class JavascriptParser extends ParserClass {
12828
13247
  [LogicalExpression],
12829
13248
  boolean | void
12830
13249
  >;
12831
- program: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
13250
+ program: SyncBailHook<
13251
+ [ProgramImport, CommentJavascriptParser[]],
13252
+ boolean | void
13253
+ >;
12832
13254
  /**
12833
13255
  * @since 5.99.0
12834
13256
  */
12835
13257
  terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
12836
- finish: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
13258
+ finish: SyncBailHook<
13259
+ [ProgramImport, CommentJavascriptParser[]],
13260
+ boolean | void
13261
+ >;
12837
13262
  /**
12838
13263
  * @since 5.99.9
12839
13264
  */
@@ -12911,7 +13336,7 @@ declare class JavascriptParser extends ParserClass {
12911
13336
  | ForOfStatement
12912
13337
  | ExportDefaultDeclaration;
12913
13338
  destructuringAssignmentProperties?: WeakMap<
12914
- Expression,
13339
+ ExpressionEstreeIndex,
12915
13340
  Set<DestructuringAssignmentProperty>
12916
13341
  >;
12917
13342
  currentTagData?:
@@ -12927,7 +13352,7 @@ declare class JavascriptParser extends ParserClass {
12927
13352
  * Destructuring assignment properties for.
12928
13353
  */
12929
13354
  destructuringAssignmentPropertiesFor(
12930
- node: Expression
13355
+ node: ExpressionEstreeIndex
12931
13356
  ): undefined | Set<DestructuringAssignmentProperty>;
12932
13357
 
12933
13358
  /**
@@ -12973,9 +13398,11 @@ declare class JavascriptParser extends ParserClass {
12973
13398
  ): void;
12974
13399
 
12975
13400
  /**
12976
- * Module pre walking iterates the scope for import entries
13401
+ * Walk every statement of a scope to declare what hoists to it. Only a tap
13402
+ * on the deprecated `preStatement` hook asks for this.
13403
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
12977
13404
  */
12978
- modulePreWalkStatements(
13405
+ preWalkStatements(
12979
13406
  statements: (
12980
13407
  | ImportDeclaration
12981
13408
  | ExportNamedDeclaration
@@ -13007,9 +13434,89 @@ declare class JavascriptParser extends ParserClass {
13007
13434
  ): void;
13008
13435
 
13009
13436
  /**
13010
- * Pre walking iterates the scope for variable declarations
13437
+ * Pre walk block statement.
13438
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13011
13439
  */
13012
- preWalkStatements(
13440
+ preWalkBlockStatement(statement: BlockStatement): void;
13441
+
13442
+ /**
13443
+ * Pre walk if statement.
13444
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13445
+ */
13446
+ preWalkIfStatement(statement: IfStatement): void;
13447
+
13448
+ /**
13449
+ * Pre walk labeled statement.
13450
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13451
+ */
13452
+ preWalkLabeledStatement(statement: LabeledStatement): void;
13453
+
13454
+ /**
13455
+ * Pre walk with statement.
13456
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13457
+ */
13458
+ preWalkWithStatement(statement: WithStatement): void;
13459
+
13460
+ /**
13461
+ * Pre walk switch statement.
13462
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13463
+ */
13464
+ preWalkSwitchStatement(statement: SwitchStatement): void;
13465
+
13466
+ /**
13467
+ * Pre walk switch cases.
13468
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13469
+ */
13470
+ preWalkSwitchCases(switchCases: SwitchCase[]): void;
13471
+
13472
+ /**
13473
+ * Pre walk try statement.
13474
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13475
+ */
13476
+ preWalkTryStatement(statement: TryStatement): void;
13477
+
13478
+ /**
13479
+ * Pre walk catch clause.
13480
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13481
+ */
13482
+ preWalkCatchClause(catchClause: CatchClause): void;
13483
+
13484
+ /**
13485
+ * Pre walk while statement.
13486
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13487
+ */
13488
+ preWalkWhileStatement(statement: WhileStatement): void;
13489
+
13490
+ /**
13491
+ * Pre walk do while statement.
13492
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13493
+ */
13494
+ preWalkDoWhileStatement(statement: DoWhileStatement): void;
13495
+
13496
+ /**
13497
+ * Pre walk for statement.
13498
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13499
+ */
13500
+ preWalkForStatement(statement: ForStatement): void;
13501
+
13502
+ /**
13503
+ * Pre walk for in statement.
13504
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13505
+ */
13506
+ preWalkForInStatement(statement: ForInStatement): void;
13507
+
13508
+ /**
13509
+ * Pre walk for of statement. `for await` is reported by the walk, not here.
13510
+ * @deprecated TODO webpack 6: remove, with the `preStatement` hook
13511
+ */
13512
+ preWalkForOfStatement(statement: ForOfStatement): void;
13513
+
13514
+ /**
13515
+ * Scan every top-level statement for the program's module declarations.
13516
+ * The parser records them now, so nothing inside webpack scans for them.
13517
+ * @deprecated TODO webpack 6: remove
13518
+ */
13519
+ modulePreWalkStatements(
13013
13520
  statements: (
13014
13521
  | ImportDeclaration
13015
13522
  | ExportNamedDeclaration
@@ -13041,7 +13548,9 @@ declare class JavascriptParser extends ParserClass {
13041
13548
  ): void;
13042
13549
 
13043
13550
  /**
13044
- * Block pre walking iterates the scope for block variable declarations
13551
+ * Walk every statement of a list to declare what it binds. Only a tap on the
13552
+ * deprecated `blockPreStatement` hook asks for this.
13553
+ * @deprecated TODO webpack 6: remove, with the `blockPreStatement` hook
13045
13554
  */
13046
13555
  blockPreWalkStatements(
13047
13556
  statements: (
@@ -13220,11 +13729,6 @@ declare class JavascriptParser extends ParserClass {
13220
13729
  */
13221
13730
  walkNestedStatement(statement: Statement): void;
13222
13731
 
13223
- /**
13224
- * Pre walk block statement.
13225
- */
13226
- preWalkBlockStatement(statement: BlockStatement): void;
13227
-
13228
13732
  /**
13229
13733
  * Walk block statement.
13230
13734
  */
@@ -13235,11 +13739,6 @@ declare class JavascriptParser extends ParserClass {
13235
13739
  */
13236
13740
  walkExpressionStatement(statement: ExpressionStatement): void;
13237
13741
 
13238
- /**
13239
- * Pre walk if statement.
13240
- */
13241
- preWalkIfStatement(statement: IfStatement): void;
13242
-
13243
13742
  /**
13244
13743
  * Walks a conditional branch with its guard frame (if any) pushed onto the
13245
13744
  * parser-state guard stack for the duration of the branch body.
@@ -13251,31 +13750,16 @@ declare class JavascriptParser extends ParserClass {
13251
13750
  */
13252
13751
  walkIfStatement(statement: IfStatement): void;
13253
13752
 
13254
- /**
13255
- * Pre walk labeled statement.
13256
- */
13257
- preWalkLabeledStatement(statement: LabeledStatement): void;
13258
-
13259
13753
  /**
13260
13754
  * Walk labeled statement.
13261
13755
  */
13262
13756
  walkLabeledStatement(statement: LabeledStatement): void;
13263
13757
 
13264
- /**
13265
- * Pre walk with statement.
13266
- */
13267
- preWalkWithStatement(statement: WithStatement): void;
13268
-
13269
13758
  /**
13270
13759
  * Walk with statement.
13271
13760
  */
13272
13761
  walkWithStatement(statement: WithStatement): void;
13273
13762
 
13274
- /**
13275
- * Pre walk switch statement.
13276
- */
13277
- preWalkSwitchStatement(statement: SwitchStatement): void;
13278
-
13279
13763
  /**
13280
13764
  * Walk switch statement.
13281
13765
  */
@@ -13296,61 +13780,31 @@ declare class JavascriptParser extends ParserClass {
13296
13780
  */
13297
13781
  walkThrowStatement(statement: ThrowStatement): void;
13298
13782
 
13299
- /**
13300
- * Pre walk try statement.
13301
- */
13302
- preWalkTryStatement(statement: TryStatement): void;
13303
-
13304
13783
  /**
13305
13784
  * Walk try statement.
13306
13785
  */
13307
13786
  walkTryStatement(statement: TryStatement): void;
13308
13787
 
13309
- /**
13310
- * Pre walk while statement.
13311
- */
13312
- preWalkWhileStatement(statement: WhileStatement): void;
13313
-
13314
13788
  /**
13315
13789
  * Walk while statement.
13316
13790
  */
13317
13791
  walkWhileStatement(statement: WhileStatement): void;
13318
13792
 
13319
- /**
13320
- * Pre walk do while statement.
13321
- */
13322
- preWalkDoWhileStatement(statement: DoWhileStatement): void;
13323
-
13324
13793
  /**
13325
13794
  * Walk do while statement.
13326
13795
  */
13327
13796
  walkDoWhileStatement(statement: DoWhileStatement): void;
13328
13797
 
13329
- /**
13330
- * Pre walk for statement.
13331
- */
13332
- preWalkForStatement(statement: ForStatement): void;
13333
-
13334
13798
  /**
13335
13799
  * Walk for statement.
13336
13800
  */
13337
13801
  walkForStatement(statement: ForStatement): void;
13338
13802
 
13339
- /**
13340
- * Pre walk for in statement.
13341
- */
13342
- preWalkForInStatement(statement: ForInStatement): void;
13343
-
13344
13803
  /**
13345
13804
  * Walk for in statement.
13346
13805
  */
13347
13806
  walkForInStatement(statement: ForInStatement): void;
13348
13807
 
13349
- /**
13350
- * Pre walk for of statement.
13351
- */
13352
- preWalkForOfStatement(statement: ForOfStatement): void;
13353
-
13354
13808
  /**
13355
13809
  * Walk for of statement.
13356
13810
  */
@@ -13385,7 +13839,7 @@ declare class JavascriptParser extends ParserClass {
13385
13839
  */
13386
13840
  enterDestructuringAssignment(
13387
13841
  pattern: Pattern,
13388
- expression: Expression
13842
+ expression: ExpressionEstreeIndex
13389
13843
  ):
13390
13844
  | undefined
13391
13845
  | ImportExpressionImport
@@ -13495,21 +13949,11 @@ declare class JavascriptParser extends ParserClass {
13495
13949
  statement: ClassDeclaration | MaybeNamedClassDeclaration
13496
13950
  ): void;
13497
13951
 
13498
- /**
13499
- * Pre walk switch cases.
13500
- */
13501
- preWalkSwitchCases(switchCases: SwitchCase[]): void;
13502
-
13503
13952
  /**
13504
13953
  * Processes the provided switch case.
13505
13954
  */
13506
13955
  walkSwitchCases(switchCases: SwitchCase[]): void;
13507
13956
 
13508
- /**
13509
- * Pre walk catch clause.
13510
- */
13511
- preWalkCatchClause(catchClause: CatchClause): void;
13512
-
13513
13957
  /**
13514
13958
  * Processes the provided catch clause.
13515
13959
  */
@@ -14076,12 +14520,14 @@ declare class JavascriptParser extends ParserClass {
14076
14520
  /**
14077
14521
  * Returns parsed string.
14078
14522
  */
14079
- parseString(expression: Expression): string;
14523
+ parseString(expression: ExpressionEstreeIndex): string;
14080
14524
 
14081
14525
  /**
14082
14526
  * Parses calculated string.
14083
14527
  */
14084
- parseCalculatedString(expression: Expression): CalculatedStringResult;
14528
+ parseCalculatedString(
14529
+ expression: ExpressionEstreeIndex
14530
+ ): CalculatedStringResult;
14085
14531
 
14086
14532
  /**
14087
14533
  * Returns evaluation result.
@@ -14142,7 +14588,7 @@ declare class JavascriptParser extends ParserClass {
14142
14588
  start?: number;
14143
14589
  end?: number;
14144
14590
  range?: [number, number];
14145
- loc?: null | SourceLocation;
14591
+ loc?: null | SourceLocationImport;
14146
14592
  }): DependencyLocation;
14147
14593
 
14148
14594
  /**
@@ -14150,6 +14596,12 @@ declare class JavascriptParser extends ParserClass {
14150
14596
  */
14151
14597
  getComments(range: [number, number]): CommentJavascriptParser[];
14152
14598
 
14599
+ /**
14600
+ * Where the comments written for `statement` begin: the run of comments
14601
+ * before it that whitespace alone separates from it and from each other.
14602
+ */
14603
+ getAttachedCommentsStart(statement: StatementPathItem): number;
14604
+
14153
14605
  /**
14154
14606
  * Reports whether `identifier` may occur as a word in the source text of
14155
14607
  * `range`. A conservative pre-filter for expensive AST scans: `false` means
@@ -14180,7 +14632,7 @@ declare class JavascriptParser extends ParserClass {
14180
14632
  /**
14181
14633
  * Checks whether this javascript parser is statement level expression.
14182
14634
  */
14183
- isStatementLevelExpression(expr: Expression): boolean;
14635
+ isStatementLevelExpression(expr: ExpressionEstreeIndex): boolean;
14184
14636
 
14185
14637
  /**
14186
14638
  * Returns tag data.
@@ -14439,7 +14891,7 @@ declare class JavascriptParser extends ParserClass {
14439
14891
  * Gets name for expression.
14440
14892
  */
14441
14893
  getNameForExpression(
14442
- expression: Expression
14894
+ expression: ExpressionEstreeIndex
14443
14895
  ):
14444
14896
  | undefined
14445
14897
  | {
@@ -14452,7 +14904,7 @@ declare class JavascriptParser extends ParserClass {
14452
14904
  * Returns parser.
14453
14905
  */
14454
14906
  static extend(
14455
- ...plugins: ((BaseParser: typeof ParserImport) => typeof ParserImport)[]
14907
+ ...plugins: ((BaseParser: typeof ParserParser) => typeof ParserParser)[]
14456
14908
  ): typeof JavascriptParser;
14457
14909
  static ALLOWED_MEMBER_TYPES_ALL: number;
14458
14910
  static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
@@ -14645,6 +15097,12 @@ declare interface JavascriptParserOptions {
14645
15097
  */
14646
15098
  sourceImport?: boolean;
14647
15099
 
15100
+ /**
15101
+ * Hand out a spec-compliant Module Namespace Exotic Object for 'import * as ns' and 'import()' of this module instead of the plain exports object. Requires 'Proxy' in the target environment, keeps every exported name, and costs runtime code, so enable it per module. Set it on the imported module, not on the importer.
15102
+ * @since 5.111.0
15103
+ */
15104
+ specNamespaceObject?: boolean;
15105
+
14648
15106
  /**
14649
15107
  * Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
14650
15108
  * @deprecated
@@ -14830,6 +15288,11 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
14830
15288
  compilation: Compilation
14831
15289
  ) => JsonpCompilationPluginHooks;
14832
15290
 
15291
+ /**
15292
+ * The answer a runtime module gives when it installs no chunk handler at all
15293
+ */
15294
+ static NO_CHUNK_HANDLERS: [string, string][];
15295
+
14833
15296
  /**
14834
15297
  * Runtime modules without any dependencies to other runtime modules
14835
15298
  */
@@ -14917,6 +15380,26 @@ declare interface KnownAssetInfo {
14917
15380
  */
14918
15381
  sourceFilename?: string;
14919
15382
 
15383
+ /**
15384
+ * true, when the asset was copied from a file by `output.copy`
15385
+ */
15386
+ copied?: boolean;
15387
+
15388
+ /**
15389
+ * when set, the asset is emitted as a symbolic link rather than as its content
15390
+ */
15391
+ symlink?: AssetSymlink;
15392
+
15393
+ /**
15394
+ * when set, the file the asset is written to is given these permissions
15395
+ */
15396
+ mode?: number;
15397
+
15398
+ /**
15399
+ * when set, the file the asset is written to is stamped with these times
15400
+ */
15401
+ timestamps?: AssetTimestamps;
15402
+
14920
15403
  /**
14921
15404
  * size in bytes, only set after asset has been emitted
14922
15405
  */
@@ -14955,14 +15438,20 @@ declare interface KnownAssetModuleBuildInfo {
14955
15438
  filename?: string;
14956
15439
  assetInfo?: AssetInfo;
14957
15440
  fullContentHash?: string;
15441
+
15442
+ /**
15443
+ * the resource this asset is named after, when
15444
+ * something re-encoded it. Unlike `matchResource` this is serialized, so a
15445
+ * rename set while building survives the persistent cache
15446
+ */
15447
+ assetResource?: string;
14958
15448
  }
14959
15449
  declare interface KnownBuildInfo {
14960
- cacheable?: boolean;
14961
-
14962
15450
  /**
14963
- * reasons why the module is not cacheable (e.g. paths of loaders that marked it)
15451
+ * the module hands out a spec Module Namespace Exotic Object
14964
15452
  */
14965
- notCacheableReasons?: string[];
15453
+ specNamespaceObject?: boolean;
15454
+ cacheable?: boolean;
14966
15455
  strict?: boolean;
14967
15456
  moduleArgument?: string;
14968
15457
  exportsArgument?: string;
@@ -14979,50 +15468,30 @@ declare interface KnownBuildInfo {
14979
15468
  topLevelDeclarations?: Set<string>;
14980
15469
 
14981
15470
  /**
14982
- * true when the module is part of a circular dependency chain
15471
+ * true when the module is in a synchronous circular dependency chain
14983
15472
  */
14984
15473
  isCircular?: boolean;
14985
15474
 
14986
15475
  /**
14987
- * true when the module calls `eval` directly
15476
+ * CircularKind bit flags from CircularModulesPlugin; unset when the plugin did not run
14988
15477
  */
14989
- usesEval?: boolean;
15478
+ circularKind?: number;
14990
15479
 
14991
15480
  /**
14992
- * how many `#__PURE__` annotations sit where the parser does not read them
14993
- */
14994
- ineffectivePureAnnotations?: number;
14995
-
14996
- /**
14997
- * how many times the module reads `this` at its top level
15481
+ * module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
14998
15482
  */
14999
- topLevelThis?: number;
15483
+ usesTopLevelAwaitForOf?: boolean;
15000
15484
 
15001
15485
  /**
15002
- * module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
15486
+ * what the build recorded for stats and the performance hints to report
15003
15487
  */
15004
- usesTopLevelAwaitForOf?: boolean;
15488
+ diagnostics?: BuildDiagnostics;
15005
15489
  }
15006
15490
  declare interface KnownBuildMeta {
15007
15491
  exportsType?: "default" | "namespace" | "flagged" | "dynamic";
15008
15492
  defaultObject?: false | "redirect" | "redirect-warn";
15009
15493
  async?: boolean;
15010
15494
  sideEffectFree?: boolean;
15011
-
15012
- /**
15013
- * using in ModuleLibraryPlugin
15014
- */
15015
- exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
15016
-
15017
- /**
15018
- * using in ModuleLibraryPlugin
15019
- */
15020
- exportsSourceByRuntime?: Map<string, string>;
15021
-
15022
- /**
15023
- * export definitions `ModuleLibraryPlugin` took over, re-emitted only where the module is wrapped
15024
- */
15025
- exportsBindingSourceByRuntime?: Map<string, string>;
15026
15495
  }
15027
15496
  declare interface KnownConcatenatedModuleBuildInfo {
15028
15497
  fileDependencies?: LazySet<string>;
@@ -15118,6 +15587,11 @@ declare interface KnownJavascriptModuleBuildInfo {
15118
15587
  */
15119
15588
  moduleConcatenationBailout?: string;
15120
15589
 
15590
+ /**
15591
+ * what rules the module out as a concatenation root, while it may still be an inner module
15592
+ */
15593
+ moduleConcatenationRootBailout?: string;
15594
+
15121
15595
  /**
15122
15596
  * using in APIPlugin
15123
15597
  */
@@ -15159,6 +15633,11 @@ declare interface KnownJsonModuleBuildInfo {
15159
15633
  declare interface KnownMeta {
15160
15634
  importVarMap?: Map<Module, string>;
15161
15635
  deferredImportVarMap?: Map<Module, string>;
15636
+
15637
+ /**
15638
+ * generate export definitions on demand
15639
+ */
15640
+ onDemandExports?: boolean;
15162
15641
  }
15163
15642
  declare interface KnownNormalModuleBuildInfo {
15164
15643
  parsed?: boolean;
@@ -15644,6 +16123,11 @@ declare interface LStatTypes {
15644
16123
  ) => void
15645
16124
  ): void;
15646
16125
  }
16126
+ declare interface LabelLike {
16127
+ kind?: null | string;
16128
+ name?: string;
16129
+ statementStart?: number;
16130
+ }
15647
16131
 
15648
16132
  /**
15649
16133
  * Options for the default backend.
@@ -16015,6 +16499,11 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
16015
16499
  compilation: Compilation
16016
16500
  ) => LoadScriptCompilationHooks;
16017
16501
 
16502
+ /**
16503
+ * The answer a runtime module gives when it installs no chunk handler at all
16504
+ */
16505
+ static NO_CHUNK_HANDLERS: [string, string][];
16506
+
16018
16507
  /**
16019
16508
  * Runtime modules without any dependencies to other runtime modules
16020
16509
  */
@@ -16048,10 +16537,33 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
16048
16537
  declare interface Loader {
16049
16538
  [index: string]: any;
16050
16539
  }
16051
- type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> &
16052
- LoaderRunnerLoaderContext<OptionsType> &
16540
+ type LoaderContextLibIndex<OptionsType> =
16541
+ NormalModuleLoaderContext<OptionsType> &
16542
+ LoaderRunnerMutableContext<OptionsType> &
16543
+ LoaderRunnerReadonlyContext<OptionsType> &
16544
+ LoaderPluginLoaderContext &
16545
+ HotModuleReplacementPluginLoaderContext;
16546
+ type LoaderContextNormalModule<T> = NormalModuleLoaderContext<T> &
16547
+ LoaderRunnerMutableContext<T> &
16548
+ LoaderRunnerReadonlyContext<T> &
16053
16549
  LoaderPluginLoaderContext &
16054
16550
  HotModuleReplacementPluginLoaderContext;
16551
+ declare interface LoaderContextUtils {
16552
+ /**
16553
+ * returns a new request string using absolute paths when possible
16554
+ */
16555
+ absolutify: (context: string, request: string) => string;
16556
+
16557
+ /**
16558
+ * returns a new request string avoiding absolute paths when possible
16559
+ */
16560
+ contextify: (context: string, request: string) => string;
16561
+
16562
+ /**
16563
+ * creates a hash with the compilation's function
16564
+ */
16565
+ createHash: (algorithm?: string | typeof Hash) => Hash;
16566
+ }
16055
16567
  type LoaderDefinition<
16056
16568
  OptionsType = {},
16057
16569
  ContextAdditions = {}
@@ -16065,7 +16577,8 @@ declare interface LoaderDefinitionFunction<
16065
16577
  > {
16066
16578
  (
16067
16579
  this: NormalModuleLoaderContext<OptionsType> &
16068
- LoaderRunnerLoaderContext<OptionsType> &
16580
+ LoaderRunnerMutableContext<OptionsType> &
16581
+ LoaderRunnerReadonlyContext<OptionsType> &
16069
16582
  LoaderPluginLoaderContext &
16070
16583
  HotModuleReplacementPluginLoaderContext &
16071
16584
  ContextAdditions,
@@ -16074,6 +16587,21 @@ declare interface LoaderDefinitionFunction<
16074
16587
  additionalData?: AdditionalData
16075
16588
  ): string | void | Buffer | Promise<string | Buffer>;
16076
16589
  }
16590
+ declare interface LoaderEntry {
16591
+ request: string;
16592
+ path: string;
16593
+ query: string;
16594
+ fragment: string;
16595
+ options?: string | object;
16596
+ ident: string;
16597
+ normal?: Function;
16598
+ pitch?: Function;
16599
+ raw?: boolean;
16600
+ data?: object;
16601
+ pitchExecuted: boolean;
16602
+ normalExecuted: boolean;
16603
+ type?: "module" | "commonjs";
16604
+ }
16077
16605
  declare interface LoaderItem {
16078
16606
  loader: string;
16079
16607
  options?: null | string | Record<string, any>;
@@ -16123,10 +16651,6 @@ declare interface LoaderOptionsPluginOptions {
16123
16651
  context?: string;
16124
16652
  };
16125
16653
  }
16126
-
16127
- /**
16128
- * These properties are added by the LoaderPlugin
16129
- */
16130
16654
  declare interface LoaderPluginLoaderContext {
16131
16655
  /**
16132
16656
  * Resolves the given request to a module, applies all configured loaders and calls
@@ -16134,7 +16658,7 @@ declare interface LoaderPluginLoaderContext {
16134
16658
  * instance of NormalModule). Use this function if you need to know the source code
16135
16659
  * of another module to generate the result.
16136
16660
  */
16137
- loadModule(
16661
+ loadModule: (
16138
16662
  request: string,
16139
16663
  callback: (
16140
16664
  err: null | Error,
@@ -16142,36 +16666,27 @@ declare interface LoaderPluginLoaderContext {
16142
16666
  sourceMap?: null | object,
16143
16667
  module?: Module
16144
16668
  ) => void
16145
- ): void;
16146
- importModule(
16147
- request: string,
16148
- options: undefined | ImportModuleOptions,
16149
- callback: (err?: null | Error, exports?: any) => void
16150
- ): void;
16151
- importModule(request: string, options?: ImportModuleOptions): Promise<any>;
16669
+ ) => void;
16670
+ importModule: ImportModuleMethod;
16152
16671
  }
16153
-
16154
- /**
16155
- * The properties are added by https://github.com/webpack/loader-runner
16156
- */
16157
- declare interface LoaderRunnerLoaderContext<OptionsType> {
16672
+ declare interface LoaderRunnerMutableContext<OptionsType> {
16158
16673
  /**
16159
16674
  * Add a directory as dependency of the loader result.
16160
16675
  */
16161
- addContextDependency(context: string): void;
16676
+ addContextDependency: (context: string) => void;
16162
16677
 
16163
16678
  /**
16164
16679
  * Adds a file as dependency of the loader result in order to make them watchable.
16165
16680
  * For example, html-loader uses this technique as it finds src and src-set attributes.
16166
16681
  * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
16167
16682
  */
16168
- addDependency(file: string): void;
16169
- addMissingDependency(context: string): void;
16683
+ addDependency: (file: string) => void;
16684
+ addMissingDependency: (context: string) => void;
16170
16685
 
16171
16686
  /**
16172
16687
  * Make this loader async.
16173
16688
  */
16174
- async(): (
16689
+ async: () => (
16175
16690
  err?: null | Error,
16176
16691
  content?: string | Buffer,
16177
16692
  sourceMap?: null | string | RawSourceMap,
@@ -16184,7 +16699,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
16184
16699
  * This means the loader shouldn't have other dependencies than specified with this.addDependency.
16185
16700
  * Most loaders are deterministic and cacheable.
16186
16701
  */
16187
- cacheable(flag?: boolean): void;
16702
+ cacheable: (flag?: boolean) => void;
16188
16703
  callback: (
16189
16704
  err?: null | Error,
16190
16705
  content?: string | Buffer,
@@ -16195,15 +16710,13 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
16195
16710
  /**
16196
16711
  * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
16197
16712
  */
16198
- clearDependencies(): void;
16713
+ clearDependencies: () => void;
16199
16714
 
16200
16715
  /**
16201
16716
  * The directory of the module. Can be used as context for resolving other stuff.
16202
16717
  * eg '/workspaces/ts-loader/examples/vanilla/src'
16203
16718
  */
16204
16719
  context: string;
16205
- readonly currentRequest: string;
16206
- readonly data: any;
16207
16720
 
16208
16721
  /**
16209
16722
  * alias of addDependency
@@ -16211,53 +16724,22 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
16211
16724
  * For example, html-loader uses this technique as it finds src and src-set attributes.
16212
16725
  * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
16213
16726
  */
16214
- dependency(file: string): void;
16215
- getContextDependencies(): string[];
16216
- getDependencies(): string[];
16217
- getMissingDependencies(): string[];
16727
+ dependency: (file: string) => void;
16728
+ getContextDependencies: () => string[];
16729
+ getDependencies: () => string[];
16730
+ getMissingDependencies: () => string[];
16218
16731
 
16219
16732
  /**
16220
16733
  * The index in the loaders array of the current loader.
16221
16734
  * In the example: in loader1: 0, in loader2: 1
16222
16735
  */
16223
16736
  loaderIndex: number;
16224
- readonly previousRequest: string;
16225
- readonly query: string | OptionsType;
16226
- readonly remainingRequest: string;
16227
- readonly request: string;
16228
16737
 
16229
16738
  /**
16230
16739
  * An array of all the loaders. It is writeable in the pitch phase.
16231
16740
  * loaders = [{request: string, path: string, query: string, module: function}]
16232
- * In the example:
16233
- * [
16234
- * { request: "/abc/loader1.js?xyz",
16235
- * path: "/abc/loader1.js",
16236
- * query: "?xyz",
16237
- * module: [Function]
16238
- * },
16239
- * { request: "/abc/node_modules/loader2/index.js",
16240
- * path: "/abc/node_modules/loader2/index.js",
16241
- * query: "",
16242
- * module: [Function]
16243
- * }
16244
- * ]
16245
- */
16246
- loaders: {
16247
- request: string;
16248
- path: string;
16249
- query: string;
16250
- fragment: string;
16251
- options?: string | object;
16252
- ident: string;
16253
- normal?: Function;
16254
- pitch?: Function;
16255
- raw?: boolean;
16256
- data?: object;
16257
- pitchExecuted: boolean;
16258
- normalExecuted: boolean;
16259
- type?: "module" | "commonjs";
16260
- }[];
16741
+ */
16742
+ loaders: LoaderEntry[];
16261
16743
 
16262
16744
  /**
16263
16745
  * The resource path.
@@ -16295,6 +16777,14 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
16295
16777
  */
16296
16778
  environment: Environment;
16297
16779
  }
16780
+ declare interface LoaderRunnerReadonlyContext<OptionsType> {
16781
+ readonly currentRequest: string;
16782
+ readonly data: any;
16783
+ readonly previousRequest: string;
16784
+ readonly query: string | OptionsType;
16785
+ readonly remainingRequest: string;
16786
+ readonly request: string;
16787
+ }
16298
16788
  declare class LoaderTargetPlugin {
16299
16789
  /**
16300
16790
  * Creates an instance of LoaderTargetPlugin.
@@ -16507,7 +16997,7 @@ declare abstract class MainTemplate {
16507
16997
  options: PathData
16508
16998
  ) => InterpolatedPathAndAssetInfo;
16509
16999
  get requireFn(): "__webpack_require__";
16510
- get outputOptions(): Output;
17000
+ get outputOptions(): OutputNormalizedWithDefaults;
16511
17001
  }
16512
17002
  declare interface MakeCacheableResult<T> {
16513
17003
  (value: string, cache?: object): T;
@@ -17211,6 +17701,11 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
17211
17701
  linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
17212
17702
  };
17213
17703
 
17704
+ /**
17705
+ * The answer a runtime module gives when it installs no chunk handler at all
17706
+ */
17707
+ static NO_CHUNK_HANDLERS: [string, string][];
17708
+
17214
17709
  /**
17215
17710
  * Runtime modules without any dependencies to other runtime modules
17216
17711
  */
@@ -18014,7 +18509,7 @@ declare interface ModuleOptions {
18014
18509
  defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
18015
18510
 
18016
18511
  /**
18017
- * Enable warnings for full dynamic dependencies.
18512
+ * Enable warnings for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextCritical'.
18018
18513
  * @deprecated
18019
18514
  */
18020
18515
  exprContextCritical?: boolean;
@@ -18703,7 +19198,7 @@ declare interface NodeEnvironmentPluginOptions {
18703
19198
  infrastructureLogging: InfrastructureLogging;
18704
19199
  }
18705
19200
  type NodeEstreeIndex =
18706
- | Program
19201
+ | ProgramImport
18707
19202
  | ImportDeclaration
18708
19203
  | ExportNamedDeclaration
18709
19204
  | ExportAllDeclaration
@@ -18777,6 +19272,14 @@ type NodeEstreeIndex =
18777
19272
  | AssignmentPattern
18778
19273
  | SwitchCase
18779
19274
  | TemplateElement;
19275
+ declare interface NodeLike {
19276
+ type: string;
19277
+ start: number;
19278
+ end: number;
19279
+ loc?: any;
19280
+ sourceFile?: string;
19281
+ range?: [number, number];
19282
+ }
18780
19283
 
18781
19284
  /**
18782
19285
  * Options object for node compatibility features.
@@ -18922,7 +19425,12 @@ declare class NormalModule extends Module {
18922
19425
  sourceMap?: null | string | RawSourceMap,
18923
19426
  associatedObjectForCache?: object
18924
19427
  ): Source;
18925
- markModuleAsErrored(error: Error): void;
19428
+
19429
+ /**
19430
+ * Marks the module as failed, so what it generates says so. A tap or a
19431
+ * loader may fail with anything, and what reads the failure expects an error.
19432
+ */
19433
+ markModuleAsErrored(error?: any): void;
18926
19434
  applyNoParseRule(
18927
19435
  rule: string | RegExp | ((content: string) => boolean),
18928
19436
  content: string
@@ -18963,9 +19471,11 @@ declare class NormalModule extends Module {
18963
19471
  */
18964
19472
  beforeSnapshot: SyncHook<[NormalModule]>;
18965
19473
  /**
19474
+ * Async since 5.111.0, so a tap can await work of its own — minifying an
19475
+ * asset, say, which before only a loader could do. `tap` keeps working.
18966
19476
  * @since 5.99.0
18967
19477
  */
18968
- processResult: SyncWaterfallHook<
19478
+ processResult: AsyncSeriesWaterfallHook<
18969
19479
  [
18970
19480
  [
18971
19481
  string | Buffer,
@@ -19543,62 +20053,38 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
19543
20053
  resolveOptions?: ResolveOptionsWithDependencyType
19544
20054
  ): ResolverWithOptions;
19545
20055
  }
19546
-
19547
- /**
19548
- * These properties are added by the NormalModule
19549
- */
19550
20056
  declare interface NormalModuleLoaderContext<OptionsType> {
19551
20057
  version: number;
19552
20058
 
19553
- /**
19554
- * Extracts and parses the options of the current loader.
19555
- * Parses string options as JSON or a query string.
19556
- * Extracts and parses the options of the current loader.
19557
- * Parses string options as JSON or a query string, and optionally validates them against a provided schema.
19558
- */
19559
-
19560
20059
  /**
19561
20060
  * Extracts and parses the options of the current loader.
19562
20061
  * Parses string options as JSON or a query string.
19563
20062
  */
19564
- getOptions(): OptionsType;
19565
-
19566
- /**
19567
- * Extracts and parses the options of the current loader.
19568
- * Parses string options as JSON or a query string.
19569
- * Extracts and parses the options of the current loader.
19570
- * Parses string options as JSON or a query string, and optionally validates them against a provided schema.
19571
- */
19572
-
19573
- /**
19574
- * Extracts and parses the options of the current loader.
19575
- * Parses string options as JSON or a query string, and optionally validates them against a provided schema.
19576
- */
19577
- getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
20063
+ getOptions: GetOptionsMethod<OptionsType>;
19578
20064
 
19579
20065
  /**
19580
20066
  * Emits a warning for this module.
19581
20067
  * The warning will be displayed to the user during compilation.
19582
20068
  */
19583
- emitWarning(warning: string | Error): void;
20069
+ emitWarning: (warning: string | Error) => void;
19584
20070
 
19585
20071
  /**
19586
20072
  * Emits an error for this module.
19587
20073
  * The error will be displayed to the user and typically causes the compilation to fail.
19588
20074
  */
19589
- emitError(error: string | Error): void;
20075
+ emitError: (error: string | Error) => void;
19590
20076
 
19591
20077
  /**
19592
20078
  * Gets a logger instance scoped to this loader and module.
19593
20079
  * Useful for emitting debug or compilation information in a structured way.
19594
20080
  */
19595
- getLogger(name?: string): WebpackLogger;
20081
+ getLogger: (name?: string) => WebpackLogger;
19596
20082
 
19597
20083
  /**
19598
20084
  * Resolves a module request (e.g., a relative path or module name) to an absolute file path.
19599
20085
  * It uses Webpack's internal resolver, taking into account configured aliases and extensions.
19600
20086
  */
19601
- resolve(
20087
+ resolve: (
19602
20088
  context: string,
19603
20089
  request: string,
19604
20090
  callback: (
@@ -19606,41 +20092,26 @@ declare interface NormalModuleLoaderContext<OptionsType> {
19606
20092
  res?: string | false,
19607
20093
  req?: ResolveRequest
19608
20094
  ) => void
19609
- ): void;
20095
+ ) => void;
19610
20096
 
19611
20097
  /**
19612
20098
  * Creates a resolve function with specific options.
19613
20099
  * The returned function can be used as a Promise-based resolver or a callback-based resolver.
19614
20100
  */
19615
- getResolve(options?: ResolveOptionsWithDependencyType): {
19616
- (
19617
- context: string,
19618
- request: string,
19619
- callback: (
19620
- err: null | ErrorWithDetail,
19621
- res?: string | false,
19622
- req?: ResolveRequest
19623
- ) => void
19624
- ): void;
19625
- (context: string, request: string): Promise<string>;
19626
- };
20101
+ getResolve: (options?: ResolveOptionsWithDependencyType) => DualModeResolve;
19627
20102
 
19628
20103
  /**
19629
20104
  * Emits a new file (asset) to the compilation output directory.
19630
20105
  * This allows loaders to generate additional files alongside the main module output.
19631
20106
  */
19632
- emitFile(
20107
+ emitFile: (
19633
20108
  name: string,
19634
20109
  content: string | Buffer,
19635
20110
  sourceMap?: string,
19636
20111
  assetInfo?: AssetInfo
19637
- ): void;
19638
- addBuildDependency(dep: string): void;
19639
- utils: {
19640
- absolutify: (context: string, request: string) => string;
19641
- contextify: (context: string, request: string) => string;
19642
- createHash: (algorithm?: string | typeof Hash) => Hash;
19643
- };
20112
+ ) => void;
20113
+ addBuildDependency: (dep: string) => void;
20114
+ utils: LoaderContextUtils;
19644
20115
  rootContext: string;
19645
20116
  fs: InputFileSystem;
19646
20117
  sourceMap?: boolean;
@@ -19774,7 +20245,7 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
19774
20245
  }
19775
20246
 
19776
20247
  /**
19777
- * Updates set size using the provided set.
20248
+ * Updates map size using the provided map.
19778
20249
  */
19779
20250
  declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
19780
20251
  T extends ReadonlyArray<any> = ReadonlyArray<any>
@@ -19785,7 +20256,7 @@ declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
19785
20256
  }
19786
20257
 
19787
20258
  /**
19788
- * Updates set size using the provided set.
20259
+ * Updates map size using the provided map.
19789
20260
  */
19790
20261
  declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
19791
20262
  read: () => string;
@@ -19833,7 +20304,7 @@ declare interface ObjectEncodingOptionsTypes {
19833
20304
  }
19834
20305
 
19835
20306
  /**
19836
- * Updates set size using the provided set.
20307
+ * Updates map size using the provided map.
19837
20308
  */
19838
20309
  declare interface ObjectSerializer {
19839
20310
  serialize: (
@@ -19846,7 +20317,7 @@ declare interface ObjectSerializer {
19846
20317
  }
19847
20318
 
19848
20319
  /**
19849
- * Updates set size using the provided set.
20320
+ * Updates map size using the provided map.
19850
20321
  */
19851
20322
  declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
19852
20323
  write: (
@@ -19878,7 +20349,7 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
19878
20349
  }
19879
20350
 
19880
20351
  /**
19881
- * Updates set size using the provided set.
20352
+ * Updates map size using the provided map.
19882
20353
  */
19883
20354
  declare interface ObjectSerializerContextObjectMiddlewareObject_3<
19884
20355
  T extends ReadonlyArray<any> = ReadonlyArray<any>
@@ -19897,7 +20368,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_3<
19897
20368
  }
19898
20369
 
19899
20370
  /**
19900
- * Updates set size using the provided set.
20371
+ * Updates map size using the provided map.
19901
20372
  */
19902
20373
  declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
19903
20374
  write: (
@@ -19916,7 +20387,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
19916
20387
  }
19917
20388
 
19918
20389
  /**
19919
- * Updates set size using the provided set.
20390
+ * Updates map size using the provided map.
19920
20391
  */
19921
20392
  declare interface ObjectSerializerSnapshot {
19922
20393
  length: number;
@@ -20143,6 +20614,12 @@ declare interface Optimization {
20143
20614
  * @since 5.110.0
20144
20615
  */
20145
20616
  declare interface OptimizationMinimizeCss {
20617
+ /**
20618
+ * Write a color the `browserslist` target cannot read as an extra declaration before the one naming it, in a spelling it does read: `color: oklch(59.686% 0.15619 49.7694)` is written as `color: #c65d06` and then the `oklch()` itself, so an engine reading neither the Lab family nor `hwb()` is left with a color rather than with nothing. The fallback is that color clipped into the sRGB gamut and rounded, which the declaration standing after it corrects wherever it is read. Nothing is written where the author already set the property earlier in the same block, where the color holds a substitution or a relative reference this cannot fold, or where the fallback would still name a function the target cannot read. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for.
20619
+ * @since 5.111.0
20620
+ */
20621
+ colorFallbacks?: boolean;
20622
+
20146
20623
  /**
20147
20624
  * 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.
20148
20625
  * @since 5.110.0
@@ -20155,6 +20632,24 @@ declare interface OptimizationMinimizeCss {
20155
20632
  */
20156
20633
  convertLengthUnits?: boolean;
20157
20634
 
20635
+ /**
20636
+ * Write a name that matches ASCII case-insensitively in lowercase: an at-rule name, a property name, a pseudo-class or pseudo-element name, a function name, a unit, and a keyword standing in a value whose grammar takes keywords alone. `@MEDIA`, `COLOR`, `:NTH-CHILD`, `URL(`, `1PX` and `currentColor` become `@media`, `color`, `:nth-child`, `url(`, `1px` and `currentcolor`. On by default, and exact: CSS matches every one of these ASCII case-insensitively, so the fold names the same thing. What it never touches is a name the author chose — a custom property, a custom ident such as an animation or grid-area name, an id, a class, a type selector, an attribute's value, or anything inside a substituted value. `@charset` is left as written, being read as bytes rather than matched, and `!important` is always written in lowercase because the printer writes the keyword rather than copying it.
20637
+ * @since 5.111.0
20638
+ */
20639
+ foldCase?: boolean;
20640
+
20641
+ /**
20642
+ * Write a spelling the `browserslist` target cannot read as one it can — the same value said another way, rather than left for an engine that will drop it: a 4-/8-digit hex as `rgba()`, a double-position gradient stop as the two stops it names, `inset` / `overflow` / `place-*` as the longhands they set, `text-decoration` as its own longhands where a slot is newer than the shorthand, `system-ui` as the stack of platform font names it stands for, a `:lang()` or `:not()` holding a list as the `:is()` that means it, a media feature range as the `min-`/`max-` pair, and `light-dark()` as the custom-property pair a color scheme switches. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for. Off leaves every such spelling as written, which is how a stylesheet one of these rewrites gets wrong is minified; it never makes the minifier write a spelling the target cannot read.
20643
+ * @since 5.111.0
20644
+ */
20645
+ lowerUnsupported?: boolean;
20646
+
20647
+ /**
20648
+ * Give a rule the selectors of a later one printing the same block, past the rules standing between them. Off by default because it reorders the cascade, so it holds only where nothing between the two declares a property the shared block does. A block repeated at a distance already compresses on its own, so the join is taken only where the copy of the block it drops is worth more than twice the selector it writes instead. `mergeRules` is the safe half of this, joining only what nothing stands between.
20649
+ * @since 5.111.0
20650
+ */
20651
+ mergeDistantRules?: boolean;
20652
+
20158
20653
  /**
20159
20654
  * 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.
20160
20655
  * @since 5.110.0
@@ -20173,6 +20668,12 @@ declare interface OptimizationMinimizeCss {
20173
20668
  */
20174
20669
  normalizeQuotes?: boolean;
20175
20670
 
20671
+ /**
20672
+ * Each pseudo-class to write as an ordinary class instead, as `{ "focus-visible": "focus-visible" }` — so a script can apply the class where the engine reads no such pseudo. Only a plain pseudo-class is rewritten, wherever it stands in a selector: a pseudo-element (`::hover`) and a functional pseudo of the same name (`:hover(…)`) are not what a class stands in for, and a `:name` inside a quoted attribute value is nobody's pseudo. Nothing applies the class — that is the script's part.
20673
+ * @since 5.111.0
20674
+ */
20675
+ pseudoClasses?: { [index: string]: string };
20676
+
20176
20677
  /**
20177
20678
  * 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.
20178
20679
  * @since 5.110.0
@@ -20180,17 +20681,35 @@ declare interface OptimizationMinimizeCss {
20180
20681
  reduceFunctions?: boolean;
20181
20682
 
20182
20683
  /**
20183
- * 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`.
20684
+ * Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration a later one in the same block overrides, a rule an identical later sibling makes dead, and the `@charset` naming an encoding the output is not written in. On by default. Joining rules that are not dead is `mergeRules`.
20184
20685
  * @since 5.110.0
20185
20686
  */
20186
20687
  removeDeadRules?: boolean;
20187
20688
 
20689
+ /**
20690
+ * Resolve the `@custom-media` and `@custom-selector` at-rules: write the query or the selector list a name stands for wherever one asks for it, and drop the rule that named it. `@custom-media --wide (width>400px)` with `@media (--wide)` becomes `@media (width>400px)`, and `@custom-selector :--heading h1, h2` with `:--heading` becomes `:is(h1, h2)`. Off until asked for: `module.parser.css.customMedia` and `module.parser.css.customSelectors` already resolve both in every stylesheet webpack parses, so this is for a `.css` asset that reached the minimizer without being parsed — one emitted by `asset/resource` or copied in. Only a name stated before the rule asking for it is written out — the rules are read in the order they are written — and a rule naming one this has not come to is left as the author had it. A selector list is written as `:is(…)`, so a name is substituted only where the target reads `:is()`.
20691
+ * @since 5.111.0
20692
+ */
20693
+ resolveCustomAtRules?: boolean;
20694
+
20188
20695
  /**
20189
20696
  * 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.
20190
20697
  * @since 5.110.0
20191
20698
  */
20192
20699
  rewriteCustomProperties?: boolean;
20193
20700
 
20701
+ /**
20702
+ * Write a `:dir()` the `browserslist` target cannot read as the `[dir]` attribute selector it approximates: `a:dir(rtl)` becomes `a[dir=rtl]`. Off until asked for, because the two are not the same question — `:dir()` reads the directionality an element resolves to, which it may inherit from an ancestor, while `[dir=rtl]` reads the attribute on the element itself, so an element inside a `dir="rtl"` ancestor matches the first and not the second. Only in effect for a `browserslist` target that reads no `:dir()`; any other target names no browsers to answer for.
20703
+ * @since 5.111.0
20704
+ */
20705
+ rewriteDirSelector?: boolean;
20706
+
20707
+ /**
20708
+ * Write an escaped identifier the shortest way that names the same thing, in a value or an id: `grid-area:\66oot` becomes `grid-area:foot` and `#\41 x` becomes `#Ax`. On by default, and exact: the escape and what replaces it are the same identifier. Off leaves every escape as the author wrote it, which is what a consumer comparing the text rather than reading the identifier needs.
20709
+ * @since 5.111.0
20710
+ */
20711
+ rewriteEscapes?: boolean;
20712
+
20194
20713
  /**
20195
20714
  * 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.
20196
20715
  * @since 5.110.0
@@ -20198,7 +20717,7 @@ declare interface OptimizationMinimizeCss {
20198
20717
  shortenColors?: boolean;
20199
20718
 
20200
20719
  /**
20201
- * 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.
20720
+ * Shorten a rule's condition prelude: a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), an `and` of two one-sided ranges collapsed into the interval it describes, the `all` a query states before an `and` (which matches what the condition alone matches), and an operand a condition already states — in `@supports` and `@container` as well as `@media`. On by default.
20202
20721
  * @since 5.110.0
20203
20722
  */
20204
20723
  shortenMediaQueries?: boolean;
@@ -20221,6 +20740,12 @@ declare interface OptimizationMinimizeCss {
20221
20740
  */
20222
20741
  shortenValues?: boolean;
20223
20742
 
20743
+ /**
20744
+ * Names a whole-project analysis found nothing uses, which the minimizer then takes out: a bare name is matched against every class and id a selector names and against every `@keyframes` name, and a `--`-prefixed one against every custom property a declaration sets. A selector list keeps the selectors that do not name one, and a rule left with none goes; a name inside a functional pseudo (`:not(.gone)`, `:is(.gone, .kept)`) is not one the rule needs, so it is left alone. Nothing is derived here — the list is the caller's, and a name on it that something does use takes working CSS out.
20745
+ * @since 5.111.0
20746
+ */
20747
+ unusedSymbols?: string[];
20748
+
20224
20749
  /**
20225
20750
  * 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.
20226
20751
  * @since 5.110.0
@@ -20234,10 +20759,10 @@ declare interface OptimizationMinimizeCss {
20234
20759
  */
20235
20760
  declare interface OptimizationMinimizeHtml {
20236
20761
  /**
20237
- * Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default.
20762
+ * Write a boolean attribute as the bare name its presence already means. The DOM reads `checked` from the attribute being there and never from its value, so `checked="checked"` and `checked=""` are the same element — but `getAttribute` hands back what was written. `true`, the default, rewrites only the spelling the spec itself canonicalizes, the attribute's own name; `"all"` rewrites any value, including the `checked="false"` that already means checked.
20238
20763
  * @since 5.110.0
20239
20764
  */
20240
- collapseBooleanAttributes?: boolean;
20765
+ collapseBooleanAttributes?: boolean | "all";
20241
20766
 
20242
20767
  /**
20243
20768
  * 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.
@@ -20251,6 +20776,12 @@ declare interface OptimizationMinimizeHtml {
20251
20776
  */
20252
20777
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
20253
20778
 
20779
+ /**
20780
+ * Print a run of adjacent `<script>` elements as one, joined by a newline and a `;`. Only bare ones fold — any attribute at all, a `src`, `type`, `nonce`, `async` or `id` among them, says the two are not interchangeable with one — and only where the print writes the bodies itself, so a `<script>` that `output.html.inline` fills in after the print is left alone. A body is left alone too wherever appending it would change what it means: one still inside a string, template or block comment would swallow the next, and a directive prologue, a hashbang or a leading `-->` mean what they do only at a start the appended body no longer has. Off by default: it removes elements, so `document.scripts`, a `script:nth-child()` selector and `querySelectorAll("script").length` all read a different document; a later body's `var` and `function` declarations become visible to the bodies before it; and a body that throws takes the rest of its run with it rather than only itself, while one that does not parse takes the whole run, its own code included.
20781
+ * @since 5.111.0
20782
+ */
20783
+ mergeScripts?: boolean;
20784
+
20254
20785
  /**
20255
20786
  * 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.
20256
20787
  * @since 5.110.0
@@ -20263,24 +20794,6 @@ declare interface OptimizationMinimizeHtml {
20263
20794
  */
20264
20795
  minifyConditionalComments?: boolean;
20265
20796
 
20266
- /**
20267
- * 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.
20268
- * @since 5.110.0
20269
- */
20270
- minifyJson?: boolean;
20271
-
20272
- /**
20273
- * 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.
20274
- * @since 5.110.0
20275
- */
20276
- minifySrcdoc?: boolean;
20277
-
20278
- /**
20279
- * Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
20280
- * @since 5.110.0
20281
- */
20282
- minifyStyles?: boolean;
20283
-
20284
20797
  /**
20285
20798
  * 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.
20286
20799
  * @since 5.110.0
@@ -20294,7 +20807,7 @@ declare interface OptimizationMinimizeHtml {
20294
20807
  normalizeEnumeratedAttributes?: boolean;
20295
20808
 
20296
20809
  /**
20297
- * 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.
20810
+ * 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. A list is read as the set the DOM reflects, so a repeat folds away, only where every token of it is a word: one holding a delimiter another language wrote a statement in is text, and keeps every token it names. Reordering a token list is `sortTokenLists`, which is separate and off by default.
20298
20811
  * @since 5.110.0
20299
20812
  */
20300
20813
  normalizeListAttributes?: boolean;
@@ -20305,6 +20818,12 @@ declare interface OptimizationMinimizeHtml {
20305
20818
  */
20306
20819
  normalizeNumericAttributes?: boolean;
20307
20820
 
20821
+ /**
20822
+ * Drop the ASCII whitespace around a URL value (`href`, `src`, `action`, `poster`, …), which resolving the URL skips over, so the request goes to the same place either way. On by default: `getAttribute` hands back the attribute as written, so a script comparing those bytes is the one this is turned off for.
20823
+ * @since 5.111.0
20824
+ */
20825
+ normalizeUrlAttributes?: boolean;
20826
+
20308
20827
  /**
20309
20828
  * 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.
20310
20829
  * @since 5.110.0
@@ -20342,7 +20861,7 @@ declare interface OptimizationMinimizeHtml {
20342
20861
  sortAttributes?: boolean;
20343
20862
 
20344
20863
  /**
20345
- * 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.
20864
+ * 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. Asked for on its own: a list this reorders is rewritten whether or not `normalizeListAttributes` is on, since another order is another spelling. 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.
20346
20865
  * @since 5.110.0
20347
20866
  */
20348
20867
  sortTokenLists?: boolean;
@@ -20863,7 +21382,17 @@ declare interface OptimizationSplitChunksOptions {
20863
21382
  */
20864
21383
  usedExports?: boolean;
20865
21384
  }
20866
- declare interface Options {
21385
+ declare abstract class OptionsApply {
21386
+ /**
21387
+ * Returns options object.
21388
+ */
21389
+ process(
21390
+ options: WebpackOptionsNormalizedWithDefaults,
21391
+ compiler: Compiler,
21392
+ interception?: WebpackOptionsInterception
21393
+ ): WebpackOptionsNormalizedWithDefaults;
21394
+ }
21395
+ declare interface OptionsDelegatedModuleFactoryPlugin {
20867
21396
  /**
20868
21397
  * source
20869
21398
  */
@@ -20899,15 +21428,126 @@ declare interface Options {
20899
21428
  */
20900
21429
  associatedObjectForCache?: object;
20901
21430
  }
20902
- declare abstract class OptionsApply {
21431
+ declare interface OptionsParser {
20903
21432
  /**
20904
- * Returns options object.
21433
+ * which edition to parse
20905
21434
  */
20906
- process(
20907
- options: WebpackOptionsNormalizedWithDefaults,
20908
- compiler: Compiler,
20909
- interception?: WebpackOptionsInterception
20910
- ): WebpackOptionsNormalizedWithDefaults;
21435
+ ecmaVersion: EcmaVersion;
21436
+
21437
+ /**
21438
+ * the goal symbol
21439
+ */
21440
+ sourceType?: "module" | "commonjs" | "script";
21441
+
21442
+ /**
21443
+ * whether the code is strict whatever it says
21444
+ */
21445
+ strict?: boolean;
21446
+
21447
+ /**
21448
+ * called where a semicolon was inserted
21449
+ */
21450
+ onInsertedSemicolon?: (
21451
+ lastTokEnd: number,
21452
+ lastTokEndLoc?: null | Position
21453
+ ) => void;
21454
+
21455
+ /**
21456
+ * called at a trailing comma
21457
+ */
21458
+ onTrailingComma?: (
21459
+ lastTokEnd: number,
21460
+ lastTokEndLoc?: null | Position
21461
+ ) => void;
21462
+
21463
+ /**
21464
+ * whether reserved words may name things
21465
+ */
21466
+ allowReserved?: boolean | "never";
21467
+
21468
+ /**
21469
+ * whether `return` may sit at the top level
21470
+ */
21471
+ allowReturnOutsideFunction?: boolean;
21472
+
21473
+ /**
21474
+ * whether module syntax may sit anywhere
21475
+ */
21476
+ allowImportExportEverywhere?: boolean;
21477
+
21478
+ /**
21479
+ * whether `await` may sit outside a function
21480
+ */
21481
+ allowAwaitOutsideFunction?: boolean;
21482
+
21483
+ /**
21484
+ * whether `super` may sit outside a method
21485
+ */
21486
+ allowSuperOutsideMethod?: boolean;
21487
+
21488
+ /**
21489
+ * whether a leading `#!` line is skipped
21490
+ */
21491
+ allowHashBang?: boolean;
21492
+
21493
+ /**
21494
+ * whether private names must be declared
21495
+ */
21496
+ checkPrivateFields?: boolean;
21497
+
21498
+ /**
21499
+ * whether nodes carry `loc`
21500
+ */
21501
+ locations?: boolean;
21502
+
21503
+ /**
21504
+ * where the first offset falls
21505
+ */
21506
+ startLocation?: { line: number; column: number };
21507
+
21508
+ /**
21509
+ * where tokens are reported
21510
+ */
21511
+ onToken?: any[] | ((token?: any) => void);
21512
+
21513
+ /**
21514
+ * where comments are reported
21515
+ */
21516
+ onComment?:
21517
+ | any[]
21518
+ | ((
21519
+ isBlock: boolean,
21520
+ text: string,
21521
+ start: number,
21522
+ end: number,
21523
+ startLoc?: null | Position,
21524
+ endLoc?: null | Position
21525
+ ) => void);
21526
+
21527
+ /**
21528
+ * whether nodes carry `range`
21529
+ */
21530
+ ranges?: boolean;
21531
+
21532
+ /**
21533
+ * a program node to append to
21534
+ */
21535
+ program?: NodeLike;
21536
+
21537
+ /**
21538
+ * the name errors and locations carry
21539
+ */
21540
+ sourceFile?: string;
21541
+
21542
+ /**
21543
+ * the name every node carries
21544
+ */
21545
+ directSourceFile?: string;
21546
+
21547
+ /**
21548
+ * whether parentheses become nodes
21549
+ */
21550
+ preserveParens?: boolean;
20911
21551
  }
20912
21552
  declare interface OriginRecord {
20913
21553
  module: null | Module;
@@ -21001,6 +21641,12 @@ declare interface Output {
21001
21641
  */
21002
21642
  compareBeforeEmit?: boolean;
21003
21643
 
21644
+ /**
21645
+ * Copy files and directories to the output directory.
21646
+ * @since 5.111.0
21647
+ */
21648
+ copy?: string | CopyPattern[];
21649
+
21004
21650
  /**
21005
21651
  * This option enables cross-origin loading of chunks.
21006
21652
  */
@@ -21285,6 +21931,24 @@ declare interface OutputFileSystem {
21285
21931
  pathLike: PathLikeFs,
21286
21932
  callback: (err: null | NodeJS.ErrnoException) => void
21287
21933
  ) => void;
21934
+ symlink?: (
21935
+ target: PathLikeFs,
21936
+ path: PathLikeFs,
21937
+ type: undefined | null | "file" | "dir" | "junction",
21938
+ callback: (err: null | NodeJS.ErrnoException) => void
21939
+ ) => void;
21940
+ readlink?: ReadlinkFs;
21941
+ chmod?: (
21942
+ path: PathLikeFs,
21943
+ mode: string | number,
21944
+ callback: (err: null | NodeJS.ErrnoException) => void
21945
+ ) => void;
21946
+ utimes?: (
21947
+ path: PathLikeFs,
21948
+ atime: string | number | Date,
21949
+ mtime: string | number | Date,
21950
+ callback: (err: null | NodeJS.ErrnoException) => void
21951
+ ) => void;
21288
21952
  stat: StatFs;
21289
21953
  lstat?: LStatFs;
21290
21954
  readFile: ReadFileFs;
@@ -21526,6 +22190,11 @@ declare interface OutputNormalized {
21526
22190
  */
21527
22191
  compareBeforeEmit?: boolean;
21528
22192
 
22193
+ /**
22194
+ * Patterns of files which are copied to the output directory, and the options of the copying itself.
22195
+ */
22196
+ copy?: CopyOptions;
22197
+
21529
22198
  /**
21530
22199
  * This option enables cross-origin loading of chunks.
21531
22200
  */
@@ -21823,7 +22492,7 @@ declare interface ParameterizedComparator<TArg extends object, T> {
21823
22492
  type ParseErrorSeverity = "error" | "warning";
21824
22493
  declare interface ParseOptionsJavascriptParser {
21825
22494
  sourceType: "module" | "script";
21826
- ecmaVersion: ecmaVersion;
22495
+ ecmaVersion: EcmaVersion;
21827
22496
  locations?: boolean;
21828
22497
  comments?: boolean;
21829
22498
  ranges?: boolean;
@@ -21831,7 +22500,7 @@ declare interface ParseOptionsJavascriptParser {
21831
22500
  allowReturnOutsideFunction?: boolean;
21832
22501
 
21833
22502
  /**
21834
- * internal: serve `range` lazily and skip acorn's location/range tracking
22503
+ * internal: serve `range` lazily and skip the parser's location/range tracking
21835
22504
  */
21836
22505
  lazyNodes?: boolean;
21837
22506
 
@@ -21857,7 +22526,7 @@ declare interface ParseOptionsSyntax {
21857
22526
  comment?: (input: string, start: number, end: number) => number;
21858
22527
  }
21859
22528
  declare interface ParseResult {
21860
- ast: Program;
22529
+ ast: ProgramImport;
21861
22530
  comments: CommentJavascriptParser[];
21862
22531
  }
21863
22532
  declare interface ParsedIdentifier {
@@ -21999,6 +22668,111 @@ declare interface ParserOptionsByModuleTypeKnown {
21999
22668
  declare interface ParserOptionsByModuleTypeUnknown {
22000
22669
  [index: string]: { [index: string]: any };
22001
22670
  }
22671
+
22672
+ /**
22673
+ * The ECMAScript parser webpack owns, ported from acorn 8.18.0 so the bundler
22674
+ * ships no parser dependency. `lib/javascript/syntax.js` subclasses it and
22675
+ * overrides the hot paths.
22676
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/state.js
22677
+ */
22678
+ declare class ParserParser {
22679
+ constructor(
22680
+ options: undefined | null | Partial<OptionsParser>,
22681
+ input: string,
22682
+ startPos?: number
22683
+ );
22684
+ options: ResolvedOptionsParser;
22685
+ sourceFile: null | string;
22686
+ keywords: RegExp;
22687
+ reservedWords: RegExp;
22688
+ reservedWordsStrict: RegExp;
22689
+ reservedWordsStrictBind: RegExp;
22690
+ input: string;
22691
+ containsEsc: boolean;
22692
+ pos: number;
22693
+ curLine: number;
22694
+ lineStart: number;
22695
+ type: TokenType;
22696
+ value: any;
22697
+ end: number;
22698
+ start: number;
22699
+ endLoc?: Position;
22700
+ startLoc?: Position;
22701
+ lastTokStartLoc?: null | Position;
22702
+ lastTokEndLoc?: null | Position;
22703
+ lastTokEnd: number;
22704
+ lastTokStart: number;
22705
+ context: TokContextLike[];
22706
+ exprAllowed: boolean;
22707
+ inModule: boolean;
22708
+ strict: boolean;
22709
+ potentialArrowAt: number;
22710
+ potentialArrowInForAwait: boolean;
22711
+ awaitIdentPos: number;
22712
+ awaitPos: number;
22713
+ yieldPos: number;
22714
+ labels: LabelLike[];
22715
+ undefinedExports: Record<string, NodeLike>;
22716
+ scopeStack: ScopeParser[];
22717
+ regexpState: null | RegExpValidationState;
22718
+ privateNameStack: any[];
22719
+ get inFunction(): boolean;
22720
+ get inGenerator(): boolean;
22721
+ get inAsync(): boolean;
22722
+ get canAwait(): boolean;
22723
+ get allowReturn(): boolean;
22724
+ get allowSuper(): boolean;
22725
+ get allowDirectSuper(): boolean;
22726
+ get treatFunctionsAsVar(): number | boolean;
22727
+ get allowNewDotTarget(): boolean;
22728
+ get allowUsing(): boolean;
22729
+ get inClassStaticBlock(): boolean;
22730
+
22731
+ /**
22732
+ * Whether a directive prologue starting at `start` opens with `"use strict"`.
22733
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/parseutil.js
22734
+ */
22735
+ strictDirective(start: number): boolean;
22736
+ unexpected(pos?: number): never;
22737
+ parse(): any;
22738
+
22739
+ /**
22740
+ * Read a full expression, including the comma operator.
22741
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/expression.js
22742
+ */
22743
+ parseExpression(
22744
+ forInit?: string | boolean,
22745
+ refDestructuringErrors?: any
22746
+ ): any;
22747
+ getToken(): TokenParser;
22748
+ initialContext(): TokContextLike[];
22749
+ enterScope(flags: number): void;
22750
+ treatFunctionsAsVarInScope(scope: { flags: number }): number | boolean;
22751
+ currentScope(): ScopeParser;
22752
+ currentVarScope(): ScopeParser;
22753
+ currentThisScope(): ScopeParser;
22754
+
22755
+ /**
22756
+ * Report a parse error, naming where in the source it was found.
22757
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/location.js
22758
+ */
22759
+ raise(pos: number, message: string): never;
22760
+ raiseRecoverable(pos: number, message: string): never;
22761
+ curPosition(): undefined | Position;
22762
+ skipLineComment(startSkip: number): void;
22763
+ [Symbol.iterator](): Iterator<TokenParser>;
22764
+ static extend(...plugins: ((parser?: any) => any)[]): any;
22765
+ static parse(input: string, options?: Partial<OptionsParser>): ProgramParser;
22766
+ static parseExpressionAt(
22767
+ input: string,
22768
+ pos: number,
22769
+ options?: Partial<OptionsParser>
22770
+ ): ExpressionParser;
22771
+ static tokenizer(
22772
+ input: string,
22773
+ options?: Partial<OptionsParser>
22774
+ ): ParserParser;
22775
+ }
22002
22776
  type ParserState = ParserStateBase & Record<string, any>;
22003
22777
  declare interface ParserStateBase {
22004
22778
  source: string | Buffer;
@@ -22104,6 +22878,12 @@ declare interface PerformanceOptions {
22104
22878
  */
22105
22879
  all?: boolean;
22106
22880
 
22881
+ /**
22882
+ * Report references in ESM output that keep webpack's runtime form, naming what stops each from being written as a literal 'import()' or 'new URL()' another bundler can follow (requires 'hints' to be enabled).
22883
+ * @since 5.111.0
22884
+ */
22885
+ analyzableBailouts?: boolean;
22886
+
22107
22887
  /**
22108
22888
  * Filter function to select assets that are checked.
22109
22889
  */
@@ -22157,18 +22937,6 @@ declare interface PerformanceOptions {
22157
22937
  */
22158
22938
  dynamicExports?: boolean;
22159
22939
 
22160
- /**
22161
- * 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).
22162
- * @since 5.110.0
22163
- */
22164
- embeddedSourceMaps?: boolean;
22165
-
22166
- /**
22167
- * Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
22168
- * @since 5.110.0
22169
- */
22170
- entrypointOverlap?: boolean;
22171
-
22172
22940
  /**
22173
22941
  * Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
22174
22942
  * @since 5.110.0
@@ -22250,6 +23018,12 @@ declare interface PerformanceOptions {
22250
23018
  */
22251
23019
  scopeHoistingBailouts?: boolean;
22252
23020
 
23021
+ /**
23022
+ * Report source maps that cost more than they give: a production 'devtool' that writes the map into the JavaScript, and modules a loader transformed without returning a map, which leaves positions pointing at the loader's output (requires 'hints' to be enabled).
23023
+ * @since 5.111.0
23024
+ */
23025
+ sourceMaps?: boolean;
23026
+
22253
23027
  /**
22254
23028
  * Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
22255
23029
  * @since 5.110.0
@@ -22275,34 +23049,22 @@ declare interface PerformanceOptions {
22275
23049
  unsplitVendors?: boolean;
22276
23050
 
22277
23051
  /**
22278
- * Report 'resolve.alias' entries that no request matched.
22279
- * @since 5.110.0
23052
+ * Report asset files emitted for an import whose binding nothing reads, so the bytes ship for nothing (requires 'hints' to be enabled).
23053
+ * @since 5.111.0
22280
23054
  */
22281
- unusedAliases?: boolean;
23055
+ unusedAssets?: boolean;
22282
23056
 
22283
23057
  /**
22284
- * 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.
22285
- * @since 5.110.0
23058
+ * Report configuration that no build used: 'resolve.alias' entries nothing matched, 'DefinePlugin' keys nothing referenced, 'externals' nothing imported, 'module.rules' that never matched, and Module Federation 'shared' keys or 'remotes' nothing imported.
23059
+ * @since 5.111.0
22286
23060
  */
22287
- unusedDefines?: boolean;
23061
+ unusedConfig?: boolean;
22288
23062
 
22289
23063
  /**
22290
- * Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.
22291
- * @since 5.110.0
23064
+ * Report modules bundled although nothing uses what they export, naming the re-export or the side-effect statement that kept each one (requires 'hints' to be enabled).
23065
+ * @since 5.111.0
22292
23066
  */
22293
- unusedExternals?: boolean;
22294
-
22295
- /**
22296
- * Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).
22297
- * @since 5.110.0
22298
- */
22299
- unusedReexports?: boolean;
22300
-
22301
- /**
22302
- * 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.
22303
- * @since 5.110.0
22304
- */
22305
- unusedRules?: boolean;
23067
+ unusedModules?: boolean;
22306
23068
  }
22307
23069
  declare interface PitchLoaderDefinitionFunction<
22308
23070
  OptionsType = {},
@@ -22310,7 +23072,8 @@ declare interface PitchLoaderDefinitionFunction<
22310
23072
  > {
22311
23073
  (
22312
23074
  this: NormalModuleLoaderContext<OptionsType> &
22313
- LoaderRunnerLoaderContext<OptionsType> &
23075
+ LoaderRunnerMutableContext<OptionsType> &
23076
+ LoaderRunnerReadonlyContext<OptionsType> &
22314
23077
  LoaderPluginLoaderContext &
22315
23078
  HotModuleReplacementPluginLoaderContext &
22316
23079
  ContextAdditions,
@@ -22404,6 +23167,19 @@ declare interface PnpApi {
22404
23167
  options: { considerBuiltins: boolean }
22405
23168
  ) => null | string;
22406
23169
  }
23170
+
23171
+ /**
23172
+ * A `{ line, column }` pair, as `options.locations` reports one.
23173
+ */
23174
+ declare abstract class Position {
23175
+ line: number;
23176
+ column: number;
23177
+ offset(n: number): Position;
23178
+ }
23179
+ declare interface PositionLike {
23180
+ line: number;
23181
+ column: number;
23182
+ }
22407
23183
  declare class PrefetchPlugin {
22408
23184
  /**
22409
23185
  * Creates an instance of PrefetchPlugin.
@@ -22635,7 +23411,7 @@ declare class PrintContext<TPath, TNode, TPrintOptions = object> {
22635
23411
  * them ahead of the next top-level node as well.
22636
23412
  */
22637
23413
  takeInserts(start: number, end: number): string;
22638
- sourceMap(options: SourceMapOptions): SourceMap;
23414
+ sourceMap(options: SourceMapOptions, code?: string): SourceMap;
22639
23415
 
22640
23416
  /**
22641
23417
  * Stand the text `resolve` gives back in place of every deferred write left
@@ -22727,6 +23503,7 @@ declare interface ProfilingPluginOptions {
22727
23503
  */
22728
23504
  outputPath?: string;
22729
23505
  }
23506
+ type ProgramParser = ProgramImport & NodeLike;
22730
23507
  declare class ProgressPlugin {
22731
23508
  /**
22732
23509
  * Creates an instance of ProgressPlugin.
@@ -22965,7 +23742,8 @@ declare interface RawLoaderDefinitionFunction<
22965
23742
  > {
22966
23743
  (
22967
23744
  this: NormalModuleLoaderContext<OptionsType> &
22968
- LoaderRunnerLoaderContext<OptionsType> &
23745
+ LoaderRunnerMutableContext<OptionsType> &
23746
+ LoaderRunnerReadonlyContext<OptionsType> &
22969
23747
  LoaderPluginLoaderContext &
22970
23748
  HotModuleReplacementPluginLoaderContext &
22971
23749
  ContextAdditions,
@@ -23202,21 +23980,7 @@ declare interface ReadFileSync {
23202
23980
  ): string;
23203
23981
  (
23204
23982
  path: PathOrFileDescriptorFs,
23205
- options?:
23206
- | null
23207
- | "ascii"
23208
- | "utf8"
23209
- | "utf-8"
23210
- | "utf16le"
23211
- | "utf-16le"
23212
- | "ucs2"
23213
- | "ucs-2"
23214
- | "base64"
23215
- | "base64url"
23216
- | "latin1"
23217
- | "binary"
23218
- | "hex"
23219
- | (ObjectEncodingOptionsFs & { flag?: string })
23983
+ options: ObjectEncodingOptionsFs & { flag?: string }
23220
23984
  ): string | Buffer;
23221
23985
  }
23222
23986
  declare interface ReadFileTypes {
@@ -23618,6 +24382,11 @@ declare interface RealContentHashPluginOptions {
23618
24382
  * the hash digest to use
23619
24383
  */
23620
24384
  hashDigest: string;
24385
+
24386
+ /**
24387
+ * run only where analyzable output marked a name for repair
24388
+ */
24389
+ onDemand?: boolean;
23621
24390
  }
23622
24391
  declare interface RealDependencyLocation {
23623
24392
  start: SourcePosition;
@@ -23700,7 +24469,7 @@ declare interface RecursiveNonNullable<T> {}
23700
24469
  */
23701
24470
  declare abstract class Reference {
23702
24471
  identifier: Identifier;
23703
- from: Scope;
24472
+ from: ScopeScopeAnalyzer;
23704
24473
  resolved?: Variable;
23705
24474
  }
23706
24475
  type ReferenceableItem = string | object;
@@ -23720,6 +24489,44 @@ declare interface ReferencedExport {
23720
24489
  */
23721
24490
  canInline?: boolean;
23722
24491
  }
24492
+
24493
+ /**
24494
+ * The cursor a regexp literal is validated through.
24495
+ */
24496
+ declare abstract class RegExpValidationState {
24497
+ parser: ParserParser;
24498
+ validFlags: string;
24499
+ unicodeProperties: any;
24500
+ source: string;
24501
+ flags: string;
24502
+ start: number;
24503
+ switchU: boolean;
24504
+ switchV: boolean;
24505
+ switchN: boolean;
24506
+ pos: number;
24507
+ lastIntValue: number;
24508
+ lastStringValue: string;
24509
+ lastAssertionIsQuantifiable: boolean;
24510
+ numCapturingParens: number;
24511
+ maxBackReference: number;
24512
+ groupNames: any;
24513
+ backReferenceNames: string[];
24514
+ branchID: null | BranchID;
24515
+ reset(start: number, pattern: string, flags: string): void;
24516
+ raise(message: string): void;
24517
+
24518
+ /**
24519
+ * The code point at an index, joining a surrogate pair where the `u` flag
24520
+ * asks for code points rather than units.
24521
+ */
24522
+ at(i: number, forceU?: boolean): number;
24523
+ nextIndex(i: number, forceU?: boolean): number;
24524
+ current(forceU?: boolean): number;
24525
+ lookahead(forceU?: boolean): number;
24526
+ advance(forceU?: boolean): void;
24527
+ eat(ch: number, forceU?: boolean): boolean;
24528
+ eatChars(chs: number[], forceU?: boolean): boolean;
24529
+ }
23723
24530
  type Remotes = (string | RemotesObject)[] | RemotesObject;
23724
24531
 
23725
24532
  /**
@@ -24470,7 +25277,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24470
25277
  resolver?: Resolver;
24471
25278
 
24472
25279
  /**
24473
- * A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` `URL` instance
25280
+ * A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` URL
24474
25281
  */
24475
25282
  modules?: string | URL_url | (string | URL_url)[];
24476
25283
 
@@ -24497,7 +25304,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24497
25304
  pnpApi?: null | PnpApi;
24498
25305
 
24499
25306
  /**
24500
- * A list of root paths, each an absolute path or a `file:` `URL` instance
25307
+ * A list of root paths, each an absolute path or a `file:` URL
24501
25308
  */
24502
25309
  roots?: (string | URL_url)[];
24503
25310
 
@@ -24512,7 +25319,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24512
25319
  resolveToContext?: boolean;
24513
25320
 
24514
25321
  /**
24515
- * A list of resolve restrictions, each an absolute path, a `file:` `URL` instance, or a RegExp
25322
+ * A list of resolve restrictions, each an absolute path, a `file:` URL, or a RegExp
24516
25323
  */
24517
25324
  restrictions?: (string | RegExp | URL_url)[];
24518
25325
 
@@ -24532,7 +25339,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24532
25339
  preferAbsolute?: boolean;
24533
25340
 
24534
25341
  /**
24535
- * TypeScript config file path (or `file:` `URL` instance) or config object with configFile and references
25342
+ * TypeScript config file path (or `file:` URL) or config object with configFile and references
24536
25343
  */
24537
25344
  tsconfig?: string | boolean | URL_url | UserTsconfigOptions;
24538
25345
  }
@@ -24559,12 +25366,129 @@ declare interface ResolvedContextTimestampAndHash {
24559
25366
  timestampHash?: string;
24560
25367
  hash: string;
24561
25368
  }
24562
- declare interface ResolvedOptions {
25369
+ declare interface ResolvedOptionsDefaults {
24563
25370
  /**
24564
25371
  * - platform target properties
24565
25372
  */
24566
25373
  platform: false | PlatformTargetProperties;
24567
25374
  }
25375
+ declare interface ResolvedOptionsParser {
25376
+ /**
25377
+ * the edition, as the number the parser compares against
25378
+ */
25379
+ ecmaVersion: number;
25380
+
25381
+ /**
25382
+ * the goal symbol
25383
+ */
25384
+ sourceType: "module" | "commonjs" | "script";
25385
+
25386
+ /**
25387
+ * whether the code is strict whatever it says
25388
+ */
25389
+ strict: boolean;
25390
+
25391
+ /**
25392
+ * called where a semicolon was inserted
25393
+ */
25394
+ onInsertedSemicolon:
25395
+ null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
25396
+
25397
+ /**
25398
+ * called at a trailing comma
25399
+ */
25400
+ onTrailingComma:
25401
+ null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
25402
+
25403
+ /**
25404
+ * whether reserved words may name things
25405
+ */
25406
+ allowReserved: boolean | "never";
25407
+
25408
+ /**
25409
+ * whether `return` may sit at the top level
25410
+ */
25411
+ allowReturnOutsideFunction: boolean;
25412
+
25413
+ /**
25414
+ * whether module syntax may sit anywhere
25415
+ */
25416
+ allowImportExportEverywhere: boolean;
25417
+
25418
+ /**
25419
+ * whether `await` may sit outside a function
25420
+ */
25421
+ allowAwaitOutsideFunction: boolean;
25422
+
25423
+ /**
25424
+ * whether `super` may sit outside a method
25425
+ */
25426
+ allowSuperOutsideMethod: boolean;
25427
+
25428
+ /**
25429
+ * whether a leading `#!` line is skipped
25430
+ */
25431
+ allowHashBang: boolean;
25432
+
25433
+ /**
25434
+ * whether private names must be declared
25435
+ */
25436
+ checkPrivateFields: boolean;
25437
+
25438
+ /**
25439
+ * whether nodes carry `loc`
25440
+ */
25441
+ locations: boolean;
25442
+
25443
+ /**
25444
+ * where the first offset falls
25445
+ */
25446
+ startLocation: null | { line: number; column: number };
25447
+
25448
+ /**
25449
+ * where tokens are reported
25450
+ */
25451
+ onToken: null | ((token?: any) => void);
25452
+
25453
+ /**
25454
+ * where comments are reported
25455
+ */
25456
+ onComment:
25457
+ | null
25458
+ | ((
25459
+ isBlock: boolean,
25460
+ text: string,
25461
+ start: number,
25462
+ end: number,
25463
+ startLoc?: null | Position,
25464
+ endLoc?: null | Position
25465
+ ) => void);
25466
+
25467
+ /**
25468
+ * whether nodes carry `range`
25469
+ */
25470
+ ranges: boolean;
25471
+
25472
+ /**
25473
+ * a program node to append to
25474
+ */
25475
+ program: null | NodeLike;
25476
+
25477
+ /**
25478
+ * the name errors and locations carry
25479
+ */
25480
+ sourceFile: null | string;
25481
+
25482
+ /**
25483
+ * the name every node carries
25484
+ */
25485
+ directSourceFile: null | string;
25486
+
25487
+ /**
25488
+ * whether parentheses become nodes
25489
+ */
25490
+ preserveParens: boolean;
25491
+ }
24568
25492
  declare abstract class Resolver {
24569
25493
  fileSystem: FileSystem;
24570
25494
  options: ResolveOptionsResolverFactoryObject1;
@@ -25339,6 +26263,12 @@ declare class RuntimeModule extends Module {
25339
26263
  */
25340
26264
  attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
25341
26265
 
26266
+ /**
26267
+ * The `[handlerMap, key]` pairs this module installs onto a chunk handler map
26268
+ * such as `__webpack_require__.f`, or `null` where it cannot name them.
26269
+ */
26270
+ getInstalledChunkHandlers(): null | [string, string][];
26271
+
25342
26272
  /**
25343
26273
  * Generates runtime code for this runtime module.
25344
26274
  */
@@ -25356,6 +26286,11 @@ declare class RuntimeModule extends Module {
25356
26286
  */
25357
26287
  shouldIsolate(): boolean;
25358
26288
 
26289
+ /**
26290
+ * The answer a runtime module gives when it installs no chunk handler at all
26291
+ */
26292
+ static NO_CHUNK_HANDLERS: [string, string][];
26293
+
25359
26294
  /**
25360
26295
  * Runtime modules without any dependencies to other runtime modules
25361
26296
  */
@@ -25506,6 +26441,7 @@ declare abstract class RuntimeTemplate {
25506
26441
  supportsArrowFunction(): boolean;
25507
26442
  supportsAsyncFunction(): boolean;
25508
26443
  supportsGenerator(): boolean;
26444
+ supportsTopLevelAwait(): boolean;
25509
26445
  supportsOptionalChaining(): boolean;
25510
26446
  supportsSpread(): boolean;
25511
26447
  supportsObjectHasOwn(): boolean;
@@ -25519,6 +26455,19 @@ declare abstract class RuntimeTemplate {
25519
26455
  supportsSourceImport(): boolean;
25520
26456
  supportsModulePreload(): boolean;
25521
26457
 
26458
+ /**
26459
+ * Whether the deferred fill rewrote a chunk whose hashed name would otherwise go
26460
+ * stale, which `RealContentHashPlugin` reads to run — and to repair `[chunkhash]`
26461
+ * names — where `optimization.realContentHash` did not ask for it.
26462
+ */
26463
+ needsAnalyzableRepair(): boolean;
26464
+
26465
+ /**
26466
+ * The assets the deferred fill rewrote under a name that has to be repaired: an
26467
+ * on-demand repair renames only these and whatever names them.
26468
+ */
26469
+ analyzableRepairedAssets(): ReadonlySet<string>;
26470
+
25522
26471
  /**
25523
26472
  * Whether a reference a foreign bundler can follow without running webpack's runtime
25524
26473
  * may be emitted — the one question every caller asks, in the form it is asking for:
@@ -25542,6 +26491,30 @@ declare abstract class RuntimeTemplate {
25542
26491
  runtime?: RuntimeSpec
25543
26492
  ): boolean;
25544
26493
 
26494
+ /**
26495
+ * Names the module whose code generation starts, so the reasons its references
26496
+ * record are handed back by `finishAnalyzableBailouts` and attributed to it.
26497
+ */
26498
+ beginAnalyzableBailouts(module: Module): void;
26499
+
26500
+ /**
26501
+ * Ends the collection `beginAnalyzableBailouts` started, so the reasons can be
26502
+ * stored beside the result and reapplied when the cache restores it.
26503
+ */
26504
+ finishAnalyzableBailouts(): undefined | string[];
26505
+
26506
+ /**
26507
+ * Reapplies the bailouts a cached code generation result was stored with, so a
26508
+ * restored module reports the same reasons a generated one does.
26509
+ */
26510
+ restoreAnalyzableBailouts(module: Module, reasons: string[]): void;
26511
+
26512
+ /**
26513
+ * The reasons a module's references keep the runtime form, as recorded while its
26514
+ * code was generated.
26515
+ */
26516
+ analyzableBailoutsOf(module: Module): string[];
26517
+
25545
26518
  /**
25546
26519
  * Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
25547
26520
  * wasm/asset loader backends use to reference an emitted binary relative to the
@@ -26104,30 +27077,16 @@ declare abstract class RuntimeTemplate {
26104
27077
  */
26105
27078
  runtimeRequirements: Set<string>;
26106
27079
  /**
26107
- * the module the `import()` is emitted into
27080
+ * the module the `import()` is emitted into, to report against
26108
27081
  */
26109
27082
  originModule?: Module;
26110
27083
  }): string;
26111
27084
 
26112
- /**
26113
- * For ESM module output, load a single statically-named chunk through the
26114
- * `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
26115
- * and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
26116
- * Returns `null` to fall back to the runtime `ensureChunk` form.
26117
- */
26118
- analyzableChunkImport(
26119
- chunk: Chunk,
26120
- comment: string,
26121
- runtimeRequirements: Set<string>,
26122
- originModule: undefined | Module,
26123
- chunkGraph: ChunkGraph
26124
- ): null | string;
26125
-
26126
27085
  /**
26127
27086
  * The `../` path from a chunk's own asset back to the output root. Hashes are
26128
27087
  * neutralized first: a runtime module is generated once to be hashed, before any
26129
27088
  * hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
26130
- * swallows that, pinning the module's hash to the message.
27089
+ * lets that throw fail the build rather than hashing it.
26131
27090
  */
26132
27091
  chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
26133
27092
 
@@ -26141,32 +27100,30 @@ declare abstract class RuntimeTemplate {
26141
27100
  overridePublicPath: undefined | string,
26142
27101
  chunk: Chunk,
26143
27102
  module: Module,
26144
- chunkGraph: ChunkGraph,
26145
- runtimeRequirements: Set<string>
27103
+ chunkGraph: ChunkGraph
26146
27104
  ): null | string;
26147
27105
 
26148
27106
  /**
26149
27107
  * Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
26150
- * keyed by chunk id — one that cannot be named leaves the map incomplete, and its
26151
- * id keeps the runtime `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
27108
+ * keyed by chunk id, or `null` when they have to keep the runtime
27109
+ * `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
26152
27110
  * and the plugin declaring what it needs ask this, so the two always agree. The
26153
27111
  * runtime hands an absolute url string to `link.href`, and so does this — the browser
26154
27112
  * resolves the element against the document, which is not where the chunk sits, and
26155
- * the loader reads the url as text either way. Nothing is written out for a runtime
26156
- * that also carries the hot handler; see below.
27113
+ * the loader reads the url as text either way.
26157
27114
  */
26158
27115
  analyzableCssChunkUrls(
26159
27116
  runtimeChunk: Chunk,
26160
27117
  chunkGraph: ChunkGraph,
26161
27118
  runtimeRequirements: ReadonlySet<string>,
26162
27119
  consumingModule?: Module
26163
- ): null | AnalyzableChunkUrls;
27120
+ ): null | Map<ChunkId, string>;
26164
27121
 
26165
27122
  /**
26166
27123
  * Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
26167
27124
  * runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
26168
- * id — one that cannot be named leaves the map incomplete, and its id keeps the
26169
- * runtime `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
27125
+ * id, or `null` when they have to keep the runtime
27126
+ * `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
26170
27127
  * them and the plugin declaring what it needs ask this, so the two always agree.
26171
27128
  */
26172
27129
  analyzableChunkScriptUrls(
@@ -26174,7 +27131,37 @@ declare abstract class RuntimeTemplate {
26174
27131
  chunkGraph: ChunkGraph,
26175
27132
  runtimeRequirements: ReadonlySet<string>,
26176
27133
  consumingModule?: Module
26177
- ): null | AnalyzableChunkUrls;
27134
+ ): null | Map<ChunkId, string>;
27135
+
27136
+ /**
27137
+ * Records that this runtime reads its chunks some way other than a native
27138
+ * `import()`, so no literal can name what it loads. Recorded on the entries that
27139
+ * chose it, which is where the setting behind it lives.
27140
+ */
27141
+ reportChunkImportBailout(chunk: Chunk, chunkGraph: ChunkGraph): void;
27142
+
27143
+ /**
27144
+ * Whether the loader still needs to build a url from a chunk id, which is the case
27145
+ * for a chunk it can be asked for that `analyzableChunkImports` leaves unnamed: one
27146
+ * carrying a runtime of its own, or one a second entrypoint has at startup.
27147
+ */
27148
+ chunkImportsNeedRuntimeUrl(
27149
+ runtimeChunk: Chunk,
27150
+ chunkGraph: ChunkGraph
27151
+ ): boolean;
27152
+
27153
+ /**
27154
+ * A literal `import()` specifier for every javascript chunk a runtime loads on
27155
+ * demand, keyed by chunk id, or `null` when one of them cannot be named here. The
27156
+ * map is written into the runtime chunk rather than at each import site, so a
27157
+ * hashed chunk name reaches no module that imports it.
27158
+ */
27159
+ analyzableChunkImports(
27160
+ runtimeChunk: Chunk,
27161
+ chunkGraph: ChunkGraph,
27162
+ runtimeRequirements: ReadonlySet<string>,
27163
+ consumingModule?: Module
27164
+ ): null | Map<ChunkId, string>;
26178
27165
 
26179
27166
  /**
26180
27167
  * Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
@@ -26276,17 +27263,46 @@ declare interface RuntimeValueOptions {
26276
27263
  version?: string | (() => string);
26277
27264
  }
26278
27265
 
27266
+ /**
27267
+ * Helper function for joining two ranges into a single range. This is useful
27268
+ * when working with AST nodes, as it allows you to combine the ranges of child nodes
27269
+ * to create the range of the _parent node_.
27270
+ */
27271
+ declare interface ScopeInfo {
27272
+ definitions: StackedMap<string, VariableInfo | ScopeInfo>;
27273
+ topLevelScope: boolean | "arrow";
27274
+ inShorthand: string | boolean;
27275
+ inTaggedTemplateTag: boolean;
27276
+ inTry: boolean;
27277
+ isStrict: boolean;
27278
+ isAsmJs: boolean;
27279
+ terminated?: 1 | 2;
27280
+ }
27281
+
27282
+ /**
27283
+ * One lexical scope, holding the names declared directly in it. Each set is
27284
+ * built only once a name goes into it, which most scopes never do.
27285
+ */
27286
+ declare abstract class ScopeParser {
27287
+ flags: number;
27288
+ var?: Set<string>;
27289
+ lexical?: Set<string>;
27290
+ functions?: Set<string>;
27291
+ firstLexical?: string;
27292
+ hoisted?: (number | NodeLike)[];
27293
+ }
27294
+
26279
27295
  /**
26280
27296
  * A lexical scope. One shape for every kind, so the property loads in the
26281
27297
  * resolution loop stay monomorphic.
26282
27298
  */
26283
- declare abstract class Scope {
27299
+ declare abstract class ScopeScopeAnalyzer {
26284
27300
  type: ScopeType;
26285
27301
  block: NodeEstreeIndex;
26286
- upper: null | Scope;
26287
- childScopes: Scope[];
27302
+ upper: null | ScopeScopeAnalyzer;
27303
+ childScopes: ScopeScopeAnalyzer[];
26288
27304
  variables: Variable[];
26289
- variableScope: Scope;
27305
+ variableScope: ScopeScopeAnalyzer;
26290
27306
 
26291
27307
  /**
26292
27308
  * For a function scope with parameters, the offset where its body
@@ -26298,22 +27314,6 @@ declare abstract class Scope {
26298
27314
  paramBoundary: number;
26299
27315
  getBinding(name: string): undefined | Variable;
26300
27316
  }
26301
-
26302
- /**
26303
- * Helper function for joining two ranges into a single range. This is useful
26304
- * when working with AST nodes, as it allows you to combine the ranges of child nodes
26305
- * to create the range of the _parent node_.
26306
- */
26307
- declare interface ScopeInfo {
26308
- definitions: StackedMap<string, VariableInfo | ScopeInfo>;
26309
- topLevelScope: boolean | "arrow";
26310
- inShorthand: string | boolean;
26311
- inTaggedTemplateTag: boolean;
26312
- inTry: boolean;
26313
- isStrict: boolean;
26314
- isAsmJs: boolean;
26315
- terminated?: 1 | 2;
26316
- }
26317
27317
  type ScopeType =
26318
27318
  | "function"
26319
27319
  | "module"
@@ -26905,6 +27905,15 @@ declare interface SourceLike {
26905
27905
  */
26906
27906
  clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
26907
27907
  }
27908
+
27909
+ /**
27910
+ * The `loc` a node carries when `options.locations` is on.
27911
+ */
27912
+ declare abstract class SourceLocationParser {
27913
+ start?: null | PositionLike;
27914
+ end?: null | PositionLike;
27915
+ source: any;
27916
+ }
26908
27917
  declare interface SourceMap {
26909
27918
  version: 3;
26910
27919
  file: string;
@@ -27515,7 +28524,7 @@ declare abstract class StackedMap<K, V> {
27515
28524
  }
27516
28525
 
27517
28526
  /**
27518
- * Updates set size using the provided set.
28527
+ * Updates map size using the provided map.
27519
28528
  */
27520
28529
  declare interface StarListDeserializerContext {
27521
28530
  read: () => HarmonyExportImportedSpecifierDependency[];
@@ -27524,7 +28533,7 @@ declare interface StarListDeserializerContext {
27524
28533
  }
27525
28534
 
27526
28535
  /**
27527
- * Updates set size using the provided set.
28536
+ * Updates map size using the provided map.
27528
28537
  */
27529
28538
  declare interface StarListSerializerContext {
27530
28539
  write: (
@@ -28644,16 +29653,25 @@ declare interface TimestampAndHash {
28644
29653
  timestamp?: number;
28645
29654
  hash: string;
28646
29655
  }
28647
- type Token = NodeSyntax & {
28648
- value: string;
28649
- unescaped: string;
28650
- numericValue: number;
28651
- typeFlag: "number" | "id" | "integer" | "unrestricted";
28652
- sign: "" | "+" | "-";
28653
- unit: string;
28654
- contentStart: number;
28655
- contentEnd: number;
28656
- };
29656
+ declare interface TokContextLike {
29657
+ token: string;
29658
+ isExpr: boolean;
29659
+ preserveSpace?: boolean;
29660
+ override?: any;
29661
+ generator?: boolean;
29662
+ }
29663
+
29664
+ /**
29665
+ * A token as `options.onToken` receives one.
29666
+ */
29667
+ declare abstract class TokenParser {
29668
+ type: any;
29669
+ value: any;
29670
+ start: any;
29671
+ end: any;
29672
+ loc?: SourceLocationParser;
29673
+ range?: any[];
29674
+ }
28657
29675
 
28658
29676
  /**
28659
29677
  * Position-based view over the lexer — webpack's stand-in for the spec's
@@ -28716,6 +29734,22 @@ declare class TokenStream {
28716
29734
  */
28717
29735
  advance(): void;
28718
29736
 
29737
+ /**
29738
+ * Step over the whitespace the next token would be, without tokenizing it —
29739
+ * for the sites that discard whitespace tokens. No-op while a token is cached.
29740
+ */
29741
+ skipWhitespace(): void;
29742
+
29743
+ /**
29744
+ * Step over the run of selector-prelude leaves a skip-mode parse drops (CSS
29745
+ * Syntax §5.4.3's "append to prelude", which skip mode does not do), without
29746
+ * lexing one token each. Only valid where every leaf up to the next
29747
+ * `BC_PRELUDE_STOP` code point is dropped whatever it is — which in
29748
+ * `consumeAQualifiedRule` is once the two tokens the `--foo: {`
29749
+ * disambiguation reads have both been seen. No-op while a token is cached.
29750
+ */
29751
+ skipPreludeLeaves(): void;
29752
+
28719
29753
  /**
28720
29754
  * Mark (CSS Syntax §3 "mark") — push the current cursor position.
28721
29755
  */
@@ -28733,6 +29767,34 @@ declare class TokenStream {
28733
29767
  */
28734
29768
  discardMark(): void;
28735
29769
  }
29770
+ type TokenSyntax = NodeSyntax & {
29771
+ value: string;
29772
+ unescaped: string;
29773
+ numericValue: number;
29774
+ typeFlag: "number" | "id" | "integer" | "unrestricted";
29775
+ sign: "" | "+" | "-";
29776
+ unit: string;
29777
+ contentStart: number;
29778
+ contentEnd: number;
29779
+ };
29780
+
29781
+ /**
29782
+ * A token's kind, carrying what the parser needs to know about it without
29783
+ * re-inspecting the source: whether an expression may follow, its binary
29784
+ * precedence, and how it updates the tokenizer's context.
29785
+ */
29786
+ declare abstract class TokenType {
29787
+ label: string;
29788
+ keyword?: string;
29789
+ beforeExpr: boolean;
29790
+ startsExpr: boolean;
29791
+ isLoop: boolean;
29792
+ isAssign: boolean;
29793
+ prefix: boolean;
29794
+ postfix: boolean;
29795
+ binop: null | number;
29796
+ updateContext: null | ((prevType: TokenType) => void);
29797
+ }
28736
29798
  declare class TopLevelSymbol {
28737
29799
  /**
28738
29800
  * Creates an instance of TopLevelSymbol.
@@ -28926,17 +29988,17 @@ declare interface UserAliasOptions {
28926
29988
  }
28927
29989
  declare interface UserTsconfigOptions {
28928
29990
  /**
28929
- * A path, or `file:` `URL` instance, pointing at the tsconfig file
29991
+ * A path, or `file:` URL, pointing at the tsconfig file
28930
29992
  */
28931
29993
  configFile?: string | URL_url;
28932
29994
 
28933
29995
  /**
28934
- * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` `URL` instances
29996
+ * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` URLs
28935
29997
  */
28936
29998
  references?: "auto" | (string | URL_url)[];
28937
29999
 
28938
30000
  /**
28939
- * Override baseUrl from tsconfig.json with a path or `file:` `URL` instance
30001
+ * Override baseUrl from tsconfig.json with a path or `file:` URL
28940
30002
  */
28941
30003
  baseUrl?: string | URL_url;
28942
30004
  }
@@ -28953,7 +30015,7 @@ declare abstract class Variable {
28953
30015
  name: string;
28954
30016
  identifiers: Identifier[];
28955
30017
  references: Reference[];
28956
- scope: Scope;
30018
+ scope: ScopeScopeAnalyzer;
28957
30019
  }
28958
30020
  declare class VariableInfo {
28959
30021
  /**
@@ -28995,7 +30057,7 @@ declare interface VirtualModule {
28995
30057
  * The source function that provides the virtual content.
28996
30058
  */
28997
30059
  source: (
28998
- loaderContext: LoaderContext<any>
30060
+ loaderContext: LoaderContextNormalModule<any>
28999
30061
  ) => string | Buffer | Promise<string | Buffer>;
29000
30062
 
29001
30063
  /**
@@ -29011,7 +30073,7 @@ declare interface VirtualModule {
29011
30073
  type VirtualModuleContent =
29012
30074
  | string
29013
30075
  | ((
29014
- loaderContext: LoaderContext<any>
30076
+ loaderContext: LoaderContextNormalModule<any>
29015
30077
  ) => string | Buffer | Promise<string | Buffer>)
29016
30078
  | VirtualModule;
29017
30079
  declare interface VirtualModules {
@@ -29917,6 +30979,8 @@ type WriteFileOptions =
29917
30979
  declare interface WriteOnlySet<T> {
29918
30980
  add: (item: T) => void;
29919
30981
  }
30982
+ type WriteStatement =
30983
+ AssignmentExpression | UpdateExpression | ForInStatement | ForOfStatement;
29920
30984
  type WriteStreamOptions = StreamOptions & {
29921
30985
  fs?: null | CreateWriteStreamFSImplementation;
29922
30986
  flush?: boolean;
@@ -29981,34 +31045,6 @@ declare interface chunkModuleHashMap {
29981
31045
  [index: number]: string;
29982
31046
  [index: string]: string;
29983
31047
  }
29984
- type ecmaVersion =
29985
- | 3
29986
- | 5
29987
- | 6
29988
- | 7
29989
- | 8
29990
- | 9
29991
- | 10
29992
- | 11
29993
- | 12
29994
- | 13
29995
- | 14
29996
- | 15
29997
- | 16
29998
- | 17
29999
- | 2015
30000
- | 2016
30001
- | 2017
30002
- | 2018
30003
- | 2019
30004
- | 2020
30005
- | 2021
30006
- | 2022
30007
- | 2023
30008
- | 2024
30009
- | 2025
30010
- | 2026
30011
- | "latest";
30012
31048
  declare function exports(
30013
31049
  options: Configuration,
30014
31050
  callback: CallbackWebpackFunction_2<Stats, void>
@@ -30134,7 +31170,6 @@ declare namespace exports {
30134
31170
  export namespace RuntimeGlobals {
30135
31171
  export let amdDefine: "__webpack_require__.amdD";
30136
31172
  export let amdOptions: "__webpack_require__.amdO";
30137
- export let analyzableChunkImport: "__webpack_require__.ei";
30138
31173
  export let asyncModule: "__webpack_require__.a";
30139
31174
  export let asyncModuleDoneSymbol: "__webpack_require__.aD";
30140
31175
  export let asyncModuleExportSymbol: "__webpack_require__.aE";
@@ -30177,7 +31212,10 @@ declare namespace exports {
30177
31212
  export let harmonyModuleDecorator: "__webpack_require__.hmd";
30178
31213
  export let hasCssModules: "has css modules";
30179
31214
  export let hasFetchPriority: "has fetch priority";
31215
+ export let hasChunkPriority: "has chunk priority";
30180
31216
  export let hasOwnProperty: "__webpack_require__.o";
31217
+ export let hasSealedDeferredNamespace: "has sealed deferred namespace";
31218
+ export let hasSynthesizedDeferredNamespace: "has synthesized deferred namespace";
30181
31219
  export let hmrDownloadManifest: "__webpack_require__.hmrM";
30182
31220
  export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
30183
31221
  export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
@@ -30213,6 +31251,7 @@ declare namespace exports {
30213
31251
  export let scriptNonce: "__webpack_require__.nc";
30214
31252
  export let setAnonymousDefaultName: "__webpack_require__.dn";
30215
31253
  export let shareScopeMap: "__webpack_require__.S";
31254
+ export let specNamespaceObject: "__webpack_require__.ns";
30216
31255
  export let startup: "__webpack_require__.x";
30217
31256
  export let startupAssetHints: "__webpack_require__.SAH";
30218
31257
  export let startupEntrypoint: "__webpack_require__.X";
@@ -30244,7 +31283,7 @@ declare namespace exports {
30244
31283
  export const applyWebpackOptionsDefaults: (
30245
31284
  options: WebpackOptionsNormalized,
30246
31285
  compilerIndex?: number
30247
- ) => ResolvedOptions;
31286
+ ) => ResolvedOptionsDefaults;
30248
31287
  }
30249
31288
  export namespace dependencies {
30250
31289
  export {
@@ -30468,6 +31507,38 @@ declare namespace exports {
30468
31507
  errors?: (string | Error)[];
30469
31508
  }[]
30470
31509
  ) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
31510
+ export function cssMinify(
31511
+ input: { [index: string]: string | Buffer },
31512
+ sourceMap?: object,
31513
+ minimizerOptions?: {
31514
+ as?: "stylesheet" | "block-contents";
31515
+ environment?: CssEnvironment;
31516
+ convertLengthUnits?: boolean;
31517
+ mergeDistantRules?: boolean;
31518
+ rewriteCustomProperties?: boolean;
31519
+ unusedSymbols?: string[];
31520
+ pseudoClasses?: { [index: string]: string };
31521
+ renderEmbeddedSource?: (
31522
+ source: string,
31523
+ info: { type: string; hostType: string }
31524
+ ) =>
31525
+ | undefined
31526
+ | string
31527
+ | EmbeddedSourceResult
31528
+ | Promise<undefined | string | EmbeddedSourceResult>;
31529
+ } & CssTransformOptions
31530
+ ): Promise<{
31531
+ code: string;
31532
+ map?: SourceMap;
31533
+ warnings?: (string | Error)[];
31534
+ errors?: (string | Error)[];
31535
+ }>;
31536
+ export namespace cssMinify {
31537
+ export let supportsWorkerThreads: () => boolean;
31538
+ export let getTypes: () => string[];
31539
+ export let getEmbeddedTypes: () => string[];
31540
+ export let filter: (name: string) => boolean;
31541
+ }
30471
31542
  export let embeddedText: (
30472
31543
  answer?: string | { code?: string }
30473
31544
  ) => undefined | string;
@@ -30492,7 +31563,7 @@ declare namespace exports {
30492
31563
  input: string | TokenStream,
30493
31564
  pos?: number,
30494
31565
  options?: ParseOptionsSyntax
30495
- ) => undefined | Token | FunctionNode | SimpleBlock;
31566
+ ) => undefined | TokenSyntax | FunctionNode | SimpleBlock;
30496
31567
  export let parseADeclaration: (
30497
31568
  input: string | TokenStream,
30498
31569
  pos?: number,
@@ -30720,7 +31791,12 @@ declare namespace exports {
30720
31791
  parentOf(n?: number): number;
30721
31792
  children(n?: number): number[];
30722
31793
  };
31794
+ export let BLOCK_CONTENTS: "block-contents";
31795
+ export let CLASSIC_SCRIPT: "script";
30723
31796
  export let EMBEDDED_LANGUAGES: string[];
31797
+ export let EVENT_HANDLER: "event-handler";
31798
+ export let JSON_TYPE: "json";
31799
+ export let MODULE_SCRIPT: "module";
30724
31800
  export let NS_HTML: 0;
30725
31801
  export let NS_MATHML: 1;
30726
31802
  export let NS_SVG: 2;
@@ -30764,6 +31840,12 @@ declare namespace exports {
30764
31840
  }
30765
31841
  ) => string;
30766
31842
  export let buildHeadTags: (opts: OutputHtmlOptions) => string;
31843
+ export let builtinEmbeddedRenderer: (
31844
+ options?: BuiltinEmbeddedRendererOptions
31845
+ ) => (
31846
+ source: string,
31847
+ info: { type: string; hostType: string; as?: string }
31848
+ ) => undefined | string;
30767
31849
  export let collectEmbeddedDiagnostics: (
30768
31850
  reported: {
30769
31851
  warnings?: (string | Error)[];
@@ -30780,6 +31862,41 @@ declare namespace exports {
30780
31862
  minimal?: boolean
30781
31863
  ) => string;
30782
31864
  export let escapeText: (s: string) => string;
31865
+ export function htmlMinify(
31866
+ input: { [index: string]: string | Buffer },
31867
+ sourceMap?: RawSourceMap,
31868
+ minimizerOptions?: Omit<
31869
+ HtmlPrintOptions,
31870
+ "renderEmbeddedSource" | "deferEmbeddedSource"
31871
+ > & {
31872
+ environment?: CssEnvironment;
31873
+ css?: {
31874
+ convertLengthUnits?: boolean;
31875
+ rewriteCustomProperties?: boolean;
31876
+ unusedSymbols?: string[];
31877
+ pseudoClasses?: { [index: string]: string };
31878
+ };
31879
+ minifyConditionalComments?: boolean;
31880
+ renderEmbeddedSource?: (
31881
+ source: string,
31882
+ info: { type: string; hostType: string; as?: string }
31883
+ ) =>
31884
+ | undefined
31885
+ | string
31886
+ | EmbeddedSourceResult
31887
+ | Promise<undefined | string | EmbeddedSourceResult>;
31888
+ }
31889
+ ): Promise<{
31890
+ code: string;
31891
+ warnings?: (string | Error)[];
31892
+ errors?: (string | Error)[];
31893
+ }>;
31894
+ export namespace htmlMinify {
31895
+ export let supportsWorkerThreads: () => boolean;
31896
+ export let getTypes: () => string[];
31897
+ export let getEmbeddedTypes: () => string[];
31898
+ export let filter: (name: string) => boolean;
31899
+ }
30783
31900
  export let isAsciiWhitespace: (cc: number) => boolean;
30784
31901
  export let metaTag: (name: string, content: string) => string;
30785
31902
  export let parseCssUrls: (input: string) => [string, number, number][];
@@ -30936,6 +32053,7 @@ declare namespace exports {
30936
32053
  HtmlPrintOptions
30937
32054
  >
30938
32055
  ) => string;
32056
+ export let stripJsonWhitespace: (json: string) => string;
30939
32057
  export let tokenize: (
30940
32058
  input: string,
30941
32059
  pos?: number,
@@ -31260,6 +32378,7 @@ declare namespace exports {
31260
32378
  ConcatenationScope,
31261
32379
  ContextExclusionPlugin,
31262
32380
  ContextReplacementPlugin,
32381
+ CopyPlugin,
31263
32382
  DefinePlugin,
31264
32383
  Dependency,
31265
32384
  DynamicEntryPlugin,
@@ -31398,7 +32517,7 @@ declare namespace exports {
31398
32517
  LoaderDefinitionFunction,
31399
32518
  PitchLoaderDefinitionFunction,
31400
32519
  RawLoaderDefinitionFunction,
31401
- LoaderContext
32520
+ LoaderContextLibIndex as LoaderContext
31402
32521
  };
31403
32522
  }
31404
32523
  declare const topLevelSymbolTag: unique symbol;