webpack 5.110.3 → 5.111.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 (208) hide show
  1. package/README.md +5 -0
  2. package/lib/APIPlugin.js +23 -7
  3. package/lib/AutomaticPrefetchPlugin.js +1 -1
  4. package/lib/Cache.js +8 -3
  5. package/lib/CacheFacade.js +1 -1
  6. package/lib/CircularModulesPlugin.js +157 -55
  7. package/lib/CleanPlugin.js +2 -2
  8. package/lib/Compilation.js +320 -302
  9. package/lib/Compiler.js +209 -46
  10. package/lib/ContextModule.js +17 -81
  11. package/lib/ContextModuleFactory.js +1 -1
  12. package/lib/CopyPlugin.js +1054 -0
  13. package/lib/DefinePlugin.js +24 -8
  14. package/lib/ExternalModule.js +41 -14
  15. package/lib/FileSystemInfo.js +17 -14
  16. package/lib/FlagDependencyExportsPlugin.js +45 -21
  17. package/lib/HotModuleReplacementPlugin.js +53 -7
  18. package/lib/JavascriptMetaInfoPlugin.js +5 -3
  19. package/lib/MainTemplate.js +5 -1
  20. package/lib/Module.js +16 -7
  21. package/lib/MultiCompiler.js +1 -1
  22. package/lib/MultiWatching.js +1 -1
  23. package/lib/NormalModule.js +45 -12
  24. package/lib/NormalModuleFactory.js +1 -1
  25. package/lib/RuntimeGlobals.js +21 -7
  26. package/lib/RuntimeModule.js +28 -12
  27. package/lib/RuntimePlugin.js +30 -3
  28. package/lib/RuntimeTemplate.js +780 -475
  29. package/lib/SourceMapDevToolPlugin.js +1 -1
  30. package/lib/Watching.js +9 -0
  31. package/lib/WebpackOptionsApply.js +84 -91
  32. package/lib/asset/AssetGenerator.js +25 -8
  33. package/lib/asset/AssetModule.js +3 -0
  34. package/lib/asset/WebManifestParser.js +7 -5
  35. package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
  36. package/lib/cache/IdleFileCachePlugin.js +2 -2
  37. package/lib/cache/PackFileCacheStrategy.js +14 -1
  38. package/lib/config/browserslistTargetHandler.js +19 -0
  39. package/lib/config/defaults.js +86 -50
  40. package/lib/config/normalization.js +82 -12
  41. package/lib/config/target.js +10 -0
  42. package/lib/container/ContainerReferencePlugin.js +6 -0
  43. package/lib/container/RemoteRuntimeModule.js +9 -0
  44. package/lib/container/declaredRemotes.js +39 -0
  45. package/lib/css/CssGenerator.js +8 -0
  46. package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
  47. package/lib/css/CssLoadingRuntimeModule.js +94 -36
  48. package/lib/css/CssModule.js +1 -1
  49. package/lib/css/CssModulesPlugin.js +7 -6
  50. package/lib/css/CssParser.js +144 -11
  51. package/lib/css/CssServerStylesRuntimeModule.js +9 -0
  52. package/lib/css/cssMinify.js +11 -3
  53. package/lib/css/data.js +2814 -678
  54. package/lib/css/syntax.js +4082 -248
  55. package/lib/debug/ProfilingPlugin.js +4 -0
  56. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
  57. package/lib/dependencies/AMDRuntimeModules.js +18 -0
  58. package/lib/dependencies/CommonJsExportRequireDependency.js +3 -1
  59. package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
  60. package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -0
  61. package/lib/dependencies/CommonJsPlugin.js +19 -3
  62. package/lib/dependencies/CommonJsRequireDependency.js +14 -5
  63. package/lib/dependencies/CssIcssExportDependency.js +7 -1
  64. package/lib/dependencies/HarmonyCompatibilityDependency.js +58 -4
  65. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +8 -3
  66. package/lib/dependencies/HarmonyExportExpressionDependency.js +44 -29
  67. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +71 -13
  68. package/lib/dependencies/HarmonyExportInitFragment.js +99 -19
  69. package/lib/dependencies/HarmonyExportSpecifierDependency.js +18 -30
  70. package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
  71. package/lib/dependencies/HarmonyImportDependency.js +6 -1
  72. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +8 -1
  73. package/lib/dependencies/HarmonyImportSpecifierDependency.js +24 -1
  74. package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
  75. package/lib/dependencies/HtmlEntryDependency.js +50 -0
  76. package/lib/dependencies/ImportMetaMainDependency.js +104 -0
  77. package/lib/dependencies/ImportMetaPlugin.js +59 -15
  78. package/lib/dependencies/SystemRuntimeModule.js +9 -0
  79. package/lib/dependencies/WorkerDependency.js +1 -2
  80. package/lib/dependencies/WorkletDependency.js +1 -2
  81. package/lib/dll/DelegatedModule.js +18 -1
  82. package/lib/dll/DllReferencePlugin.js +11 -8
  83. package/lib/dll/LibManifestPlugin.js +1 -1
  84. package/lib/errors/AnalyzableBailoutsWarning.js +41 -0
  85. package/lib/errors/DuplicateModulesWarning.js +12 -7
  86. package/lib/errors/EmptyCopyPatternWarning.js +26 -0
  87. package/lib/errors/ExternalStarReexportError.js +44 -0
  88. package/lib/errors/MissingSourceMapsWarning.js +36 -0
  89. package/lib/errors/ModuleParseError.js +2 -1
  90. package/lib/errors/UnusedAssetsWarning.js +36 -0
  91. package/lib/errors/UnusedFederationWarning.js +35 -0
  92. package/lib/errors/UnusedModulesWarning.js +38 -0
  93. package/lib/esm/ExportWebpackRequireRuntimeModule.js +9 -0
  94. package/lib/esm/ModuleChunkFormatPlugin.js +28 -3
  95. package/lib/esm/ModuleChunkLoadingPlugin.js +30 -11
  96. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -60
  97. package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
  98. package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
  99. package/lib/html/HtmlGenerator.js +11 -5
  100. package/lib/html/HtmlModulesPlugin.js +331 -62
  101. package/lib/html/HtmlParser.js +13 -6
  102. package/lib/html/builtinEmbeddedRenderer.js +107 -0
  103. package/lib/html/data.js +121 -7
  104. package/lib/html/htmlMinify.js +84 -113
  105. package/lib/html/syntax.js +763 -426
  106. package/lib/ids/HashedModuleIdsPlugin.js +2 -1
  107. package/lib/index.js +3 -0
  108. package/lib/javascript/JavascriptModule.js +1 -0
  109. package/lib/javascript/JavascriptModulesPlugin.js +52 -24
  110. package/lib/javascript/JavascriptParser.js +1255 -728
  111. package/lib/javascript/StartupHelpers.js +27 -3
  112. package/lib/javascript/data.js +172 -0
  113. package/lib/javascript/grammar.js +5546 -0
  114. package/lib/javascript/parser.js +1494 -0
  115. package/lib/javascript/regexp.js +1762 -0
  116. package/lib/javascript/regexpData.js +51 -0
  117. package/lib/javascript/syntax.js +8696 -5225
  118. package/lib/library/ModuleLibraryPlugin.js +116 -5
  119. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
  120. package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
  121. package/lib/optimize/ConcatenatedModule.js +97 -20
  122. package/lib/optimize/ConstExportsPlugin.js +50 -39
  123. package/lib/optimize/InlineExports.js +20 -123
  124. package/lib/optimize/MangleExportsPlugin.js +10 -0
  125. package/lib/optimize/ModuleConcatenationPlugin.js +24 -1
  126. package/lib/optimize/RealContentHashPlugin.js +68 -9
  127. package/lib/optimize/SideEffectsFlagPlugin.js +17 -9
  128. package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
  129. package/lib/performance/CacheEffectivenessPlugin.js +4 -3
  130. package/lib/performance/DuplicateModulesPlugin.js +57 -13
  131. package/lib/performance/EvalUsagePlugin.js +5 -2
  132. package/lib/performance/MissingSourceMapsPlugin.js +115 -0
  133. package/lib/performance/PureAnnotationsPlugin.js +6 -3
  134. package/lib/performance/TopLevelThisPlugin.js +5 -4
  135. package/lib/performance/UnusedAssetsPlugin.js +109 -0
  136. package/lib/performance/UnusedFederationPlugin.js +147 -0
  137. package/lib/performance/UnusedModulesPlugin.js +141 -0
  138. package/lib/performance/UnusedReexportsPlugin.js +1 -55
  139. package/lib/performance/isOnlyReexported.js +65 -0
  140. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +25 -5
  141. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +2 -0
  142. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +9 -0
  143. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +9 -0
  144. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +9 -0
  145. package/lib/prefetch/ResourceHintPlugin.js +1 -2
  146. package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
  147. package/lib/prefetch/StartupAssetHintRuntimeModule.js +9 -0
  148. package/lib/rules/RuleSetCompiler.js +211 -4
  149. package/lib/runtime/AsyncModuleRuntimeModule.js +100 -66
  150. package/lib/runtime/AutoPublicPathRuntimeModule.js +9 -0
  151. package/lib/runtime/BaseUriRuntimeModule.js +9 -0
  152. package/lib/runtime/ChunkNameRuntimeModule.js +9 -0
  153. package/lib/runtime/EnsureChunkRuntimeModule.js +35 -16
  154. package/lib/runtime/GetChunkFilenameRuntimeModule.js +9 -0
  155. package/lib/runtime/GetFullHashRuntimeModule.js +9 -0
  156. package/lib/runtime/GetMainFilenameRuntimeModule.js +9 -0
  157. package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +9 -0
  158. package/lib/runtime/GlobalRuntimeModule.js +9 -0
  159. package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
  160. package/lib/runtime/HelperRuntimeModule.js +10 -0
  161. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +330 -219
  162. package/lib/runtime/NonceRuntimeModule.js +9 -0
  163. package/lib/runtime/OnChunksLoadedRuntimeModule.js +67 -20
  164. package/lib/runtime/PublicPathRuntimeModule.js +9 -0
  165. package/lib/runtime/RuntimeIdRuntimeModule.js +9 -0
  166. package/lib/runtime/SpecNamespaceObjectRuntimeModule.js +90 -0
  167. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -0
  168. package/lib/runtime/StartupEntrypointRuntimeModule.js +9 -0
  169. package/lib/runtime/SystemContextRuntimeModule.js +9 -0
  170. package/lib/runtime/ToBinaryRuntimeModule.js +9 -0
  171. package/lib/serialization/ObjectMiddleware.js +138 -106
  172. package/lib/sharing/ConsumeSharedPlugin.js +12 -0
  173. package/lib/sharing/ConsumeSharedRuntimeModule.js +11 -0
  174. package/lib/sharing/ShareRuntimeModule.js +9 -0
  175. package/lib/sharing/declaredShared.js +47 -0
  176. package/lib/stats/DefaultStatsFactoryPlugin.js +3 -1
  177. package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
  178. package/lib/util/SourceProcessor.js +76 -69
  179. package/lib/util/async.js +292 -0
  180. package/lib/util/buildDiagnostics.js +69 -0
  181. package/lib/util/fs.js +27 -1
  182. package/lib/util/handlerKeys.js +40 -0
  183. package/lib/util/identifier.js +20 -0
  184. package/lib/util/internalSerializables.js +4 -0
  185. package/lib/util/registerExternalSerializer.js +6 -45
  186. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +9 -0
  187. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
  188. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +9 -0
  189. package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
  190. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
  191. package/package.json +22 -16
  192. package/schemas/WebpackOptions.check.js +1 -1
  193. package/schemas/WebpackOptions.json +379 -66
  194. package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
  195. package/schemas/plugins/ManifestPlugin.check.js +1 -1
  196. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  197. package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
  198. package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
  199. package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
  200. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  201. package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
  202. package/schemas/plugins/dll/DllReferencePlugin.check.js +1 -1
  203. package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +1 -1
  204. package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
  205. package/types.d.ts +1414 -314
  206. package/lib/dependencies/ExportBindingInitFragment.js +0 -191
  207. package/lib/errors/EntrypointOverlapWarning.js +0 -45
  208. 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,
@@ -330,6 +329,11 @@ declare interface AllCodeGenerationSchemas {
330
329
  */
331
330
  chunkInitFragments: InitFragment<any>[];
332
331
 
332
+ /**
333
+ * native external reexport source and attributes
334
+ */
335
+ externalReexport: string;
336
+
333
337
  /**
334
338
  * url for asset modules
335
339
  */
@@ -355,18 +359,6 @@ declare interface AllCodeGenerationSchemas {
355
359
  */
356
360
  "share-init": [{ shareScope: string; initStage: number; init: string }];
357
361
  }
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
362
  type AnalyzableForm =
371
363
  "import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
372
364
  type AnyLoaderContext = NormalModuleLoaderContext<any> &
@@ -586,6 +578,28 @@ declare abstract class AssetSourceGenerator extends Generator {
586
578
  ): null | Source;
587
579
  }
588
580
  declare abstract class AssetSourceParser extends ParserClass {}
581
+ declare interface AssetSymlink {
582
+ /**
583
+ * what the link points at, left as it is written
584
+ */
585
+ target: string;
586
+
587
+ /**
588
+ * whether it points at a directory, which is what Windows needs in order to create one
589
+ */
590
+ isDirectory: boolean;
591
+ }
592
+ declare interface AssetTimestamps {
593
+ /**
594
+ * last access time, in milliseconds
595
+ */
596
+ atime: number;
597
+
598
+ /**
599
+ * last modification time, in milliseconds
600
+ */
601
+ mtime: number;
602
+ }
589
603
  declare class AsyncDependenciesBlock extends DependenciesBlock {
590
604
  constructor(
591
605
  groupOptions: null | string | GroupOptionsAsyncDependenciesBlock,
@@ -880,7 +894,7 @@ declare interface BasenameCacheEntry {
880
894
  */
881
895
  declare abstract class BasicEvaluatedExpression {
882
896
  expression?:
883
- | Program
897
+ | ProgramImport
884
898
  | ImportDeclaration
885
899
  | ExportNamedDeclaration
886
900
  | ExportAllDeclaration
@@ -1139,7 +1153,7 @@ declare abstract class BasicEvaluatedExpression {
1139
1153
  */
1140
1154
  setExpression(
1141
1155
  expression?:
1142
- | Program
1156
+ | ProgramImport
1143
1157
  | ImportDeclaration
1144
1158
  | ExportNamedDeclaration
1145
1159
  | ExportAllDeclaration
@@ -1229,6 +1243,17 @@ declare interface Bootstrap {
1229
1243
  afterStartup: string[];
1230
1244
  allowInlineStartup: boolean;
1231
1245
  }
1246
+
1247
+ /**
1248
+ * Which disjunction branch a named group sits in, so that the same name in two
1249
+ * alternatives of one disjunction is allowed and a repeat in one is not.
1250
+ */
1251
+ declare abstract class BranchID {
1252
+ parent: null | BranchID;
1253
+ base: BranchID;
1254
+ separatedFrom(alt: BranchID): boolean;
1255
+ sibling(): BranchID;
1256
+ }
1232
1257
  type BufferEncoding =
1233
1258
  | "ascii"
1234
1259
  | "utf8"
@@ -1283,8 +1308,82 @@ declare interface BufferedMap {
1283
1308
  */
1284
1309
  file: string;
1285
1310
  }
1311
+ type BuildDependencyItem =
1312
+ | string
1313
+ | {
1314
+ /**
1315
+ * Request to a dependency (resolved as directory relative to the context directory).
1316
+ */
1317
+ dependency: string;
1318
+ /**
1319
+ * When true, the dependency may be missing. Existence changes invalidate the cache.
1320
+ */
1321
+ optional?: boolean;
1322
+ };
1323
+ declare interface BuildDiagnostics {
1324
+ /**
1325
+ * what parser plugins reported as optimization bailouts, replayed into the module graph of every compilation that reuses the module
1326
+ */
1327
+ optimizationBailouts?: string[];
1328
+
1329
+ /**
1330
+ * the statement whose side effect keeps the module in the bundle, as `type at location`
1331
+ */
1332
+ sideEffectStatement?: string;
1333
+
1334
+ /**
1335
+ * how many `#__PURE__` annotations sit where the parser does not read them
1336
+ */
1337
+ ineffectivePureAnnotations?: number;
1338
+
1339
+ /**
1340
+ * how many times the module reads `this` at its top level
1341
+ */
1342
+ topLevelThis?: number;
1343
+
1344
+ /**
1345
+ * true when the module calls `eval` directly
1346
+ */
1347
+ usesEval?: boolean;
1348
+
1349
+ /**
1350
+ * reasons why the module is not cacheable (e.g. paths of loaders that marked it)
1351
+ */
1352
+ notCacheableReasons?: string[];
1353
+ }
1286
1354
  type BuildInfo = KnownBuildInfo & Record<string, any>;
1287
1355
  type BuildMeta = KnownBuildMeta & Record<string, any>;
1356
+ declare interface BuiltinEmbeddedRendererOptions {
1357
+ /**
1358
+ * 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
1359
+ */
1360
+ environment?: CssEnvironment;
1361
+
1362
+ /**
1363
+ * 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
1364
+ */
1365
+ convertLengthUnits?: boolean;
1366
+
1367
+ /**
1368
+ * 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
1369
+ */
1370
+ rewriteCustomProperties?: boolean;
1371
+
1372
+ /**
1373
+ * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
1374
+ */
1375
+ transforms?: CssTransformOptions;
1376
+
1377
+ /**
1378
+ * 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
1379
+ */
1380
+ unusedSymbols?: string[];
1381
+
1382
+ /**
1383
+ * 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
1384
+ */
1385
+ pseudoClasses?: { [index: string]: string };
1386
+ }
1288
1387
  declare abstract class ByTypeGenerator extends Generator {
1289
1388
  map: { [index: string]: undefined | Generator };
1290
1389
  generateError?: (
@@ -1307,7 +1406,9 @@ declare class CacheClass {
1307
1406
  hooks: {
1308
1407
  get: AsyncSeriesBailHook<[string, null | Etag, GotHandler<any>[]], any>;
1309
1408
  store: AsyncParallelHook<[string, null | Etag, any]>;
1310
- storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
1409
+ storeBuildDependencies: AsyncParallelHook<
1410
+ [Iterable<string>, Iterable<string>]
1411
+ >;
1311
1412
  beginIdle: SyncHook<[]>;
1312
1413
  endIdle: AsyncParallelHook<[]>;
1313
1414
  shutdown: AsyncParallelHook<[]>;
@@ -1340,6 +1441,7 @@ declare class CacheClass {
1340
1441
  */
1341
1442
  storeBuildDependencies(
1342
1443
  dependencies: Iterable<string>,
1444
+ optionalDependencies: Iterable<string>,
1343
1445
  callback: CallbackCacheCache<void>
1344
1446
  ): void;
1345
1447
 
@@ -3003,6 +3105,7 @@ type CodeGenValue<K extends string> = K extends
3003
3105
  | "topLevelDeclarations"
3004
3106
  | "freeNames"
3005
3107
  | "chunkInitFragments"
3108
+ | "externalReexport"
3006
3109
  | "url"
3007
3110
  | "fullContentHash"
3008
3111
  ? AllCodeGenerationSchemas[K]
@@ -3234,7 +3337,7 @@ declare interface ColorsOptions {
3234
3337
  type CommentJavascriptParser = CommentImport & {
3235
3338
  start: number;
3236
3339
  end: number;
3237
- loc?: null | SourceLocation;
3340
+ loc?: null | SourceLocationImport;
3238
3341
  };
3239
3342
  declare interface CommonJsImportSettings {
3240
3343
  name?: string;
@@ -3540,6 +3643,7 @@ declare class Compilation {
3540
3643
  contextDependencies: LazySet<string>;
3541
3644
  missingDependencies: LazySet<string>;
3542
3645
  buildDependencies: LazySet<string>;
3646
+ optionalBuildDependencies: LazySet<string>;
3543
3647
 
3544
3648
  /**
3545
3649
  * @deprecated
@@ -4353,7 +4457,7 @@ declare class Compiler {
4353
4457
  check?: (value: T) => boolean
4354
4458
  ): void;
4355
4459
  }
4356
- type ComponentValue = Token | FunctionNode | SimpleBlock;
4460
+ type ComponentValue = TokenSyntax | FunctionNode | SimpleBlock;
4357
4461
  declare class ConcatSource extends Source {
4358
4462
  constructor(...args: ConcatSourceChild[]);
4359
4463
  getChildren(): Source[];
@@ -4407,18 +4511,18 @@ declare interface ConcatenatedModuleInfo {
4407
4511
  eager: boolean;
4408
4512
  module: Module;
4409
4513
  index: number;
4410
- ast?: Program;
4514
+ ast?: ProgramImport;
4411
4515
  internalSource?: Source;
4412
4516
  source?: ReplaceSource;
4413
4517
  chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
4414
4518
  runtimeRequirements?: ReadonlySet<string>;
4415
- globalScope?: Scope;
4519
+ globalScope?: ScopeScopeAnalyzer;
4416
4520
 
4417
4521
  /**
4418
4522
  * the module's free references
4419
4523
  */
4420
4524
  unresolvedReferences?: Reference[];
4421
- moduleScope?: Scope;
4525
+ moduleScope?: ScopeScopeAnalyzer;
4422
4526
  internalNames: Map<string, string>;
4423
4527
  exportMap?: Map<string, string>;
4424
4528
  rawExportMap?: Map<string, string>;
@@ -5301,6 +5405,167 @@ declare interface ContextTimestampAndHash {
5301
5405
  symlinks?: Set<string>;
5302
5406
  }
5303
5407
  type ContextTypes = KnownContext & Record<any, any>;
5408
+ declare interface CopiedFileData {
5409
+ /**
5410
+ * absolute path of the source file
5411
+ */
5412
+ absoluteFilename: string;
5413
+
5414
+ /**
5415
+ * path of the source file, relative to the compiler context
5416
+ */
5417
+ sourceFilename: string;
5418
+
5419
+ /**
5420
+ * path of the copied file, relative to `to`
5421
+ */
5422
+ filename: string;
5423
+ }
5424
+
5425
+ /**
5426
+ * Options of the glob in 'from'.
5427
+ */
5428
+ declare interface CopyGlobOptions {
5429
+ /**
5430
+ * Whether the glob matches the case of a file name. Defaults to 'true'.
5431
+ */
5432
+ caseSensitive?: boolean;
5433
+
5434
+ /**
5435
+ * How many directory levels below the base of the glob are read, where '1' reads only the base itself. Defaults to no limit.
5436
+ */
5437
+ deep?: number;
5438
+
5439
+ /**
5440
+ * Whether the glob reaches a file or a directory whose name starts with a dot without naming it. Defaults to 'true'.
5441
+ */
5442
+ dot?: boolean;
5443
+
5444
+ /**
5445
+ * 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.
5446
+ */
5447
+ followSymlinks?: boolean;
5448
+
5449
+ /**
5450
+ * Globs of the files which are not copied, resolved like 'from'. A directory one of them matches is skipped whole.
5451
+ */
5452
+ ignore?: string[];
5453
+ }
5454
+
5455
+ /**
5456
+ * A pattern of files which are copied to the output directory.
5457
+ */
5458
+ declare interface CopyObjectPattern {
5459
+ /**
5460
+ * 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.
5461
+ */
5462
+ context?: string;
5463
+
5464
+ /**
5465
+ * Filename template of a copied file inside 'to'. Defaults to '[path][base]', which keeps the name and the directory structure below 'from'.
5466
+ */
5467
+ filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
5468
+
5469
+ /**
5470
+ * Glob or path from where the files are copied.
5471
+ */
5472
+ from: string | string[];
5473
+
5474
+ /**
5475
+ * Options of the glob in 'from'.
5476
+ */
5477
+ globOptions?: CopyGlobOptions;
5478
+
5479
+ /**
5480
+ * Asset info of a copied file.
5481
+ */
5482
+ info?: AssetInfo | ((file: CopiedFileData) => AssetInfo);
5483
+
5484
+ /**
5485
+ * 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.
5486
+ */
5487
+ preservePermissions?: boolean;
5488
+
5489
+ /**
5490
+ * 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.
5491
+ */
5492
+ preserveTimestamps?: boolean;
5493
+
5494
+ /**
5495
+ * Directory the files are copied to, relative to 'output.path', which is where they land by default.
5496
+ */
5497
+ to?: string | ((file: CopiedFileData) => string);
5498
+
5499
+ /**
5500
+ * Modifies the content of a copied file.
5501
+ */
5502
+ transform?:
5503
+ | {
5504
+ /**
5505
+ * Whether the result of the transform is cached, and what it is cached under. Defaults to 'true'.
5506
+ */
5507
+ cache?:
5508
+ | boolean
5509
+ | {
5510
+ /**
5511
+ * Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.
5512
+ */
5513
+ keys?:
5514
+ | CopyTransformCacheKeys
5515
+ | ((
5516
+ defaultKeys: CopyTransformCacheKeys,
5517
+ absoluteFilename: string
5518
+ ) =>
5519
+ CopyTransformCacheKeys | Promise<CopyTransformCacheKeys>);
5520
+ };
5521
+ /**
5522
+ * Modifies the content of a copied file.
5523
+ */
5524
+ transformer: (
5525
+ content: Buffer,
5526
+ absoluteFilename: string
5527
+ ) => string | Buffer | Promise<string | Buffer>;
5528
+ }
5529
+ | ((
5530
+ content: Buffer,
5531
+ absoluteFilename: string
5532
+ ) => string | Buffer | Promise<string | Buffer>);
5533
+ }
5534
+
5535
+ /**
5536
+ * Patterns of files which are copied to the output directory, and the options of the copying itself.
5537
+ */
5538
+ declare interface CopyOptions {
5539
+ /**
5540
+ * Maximum number of files which are read at the same time. Defaults to '100'.
5541
+ */
5542
+ concurrency?: number;
5543
+
5544
+ /**
5545
+ * Patterns of files which are copied to the output directory.
5546
+ */
5547
+ patterns: CopyPattern[];
5548
+
5549
+ /**
5550
+ * 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.
5551
+ */
5552
+ stage?: number;
5553
+ }
5554
+ type CopyPattern = string | CopyObjectPattern;
5555
+ declare class CopyPlugin {
5556
+ constructor(options: CopyOptions);
5557
+ patterns: CopyPattern[];
5558
+ concurrency: number;
5559
+ stage: number;
5560
+
5561
+ /**
5562
+ * Apply the plugin
5563
+ */
5564
+ apply(compiler: Compiler): void;
5565
+ }
5566
+ declare interface CopyTransformCacheKeys {
5567
+ [index: string]: any;
5568
+ }
5304
5569
  type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
5305
5570
  type CreateReadStreamFSImplementation = FSImplementation & {
5306
5571
  read: (...args: any[]) => any;
@@ -5504,6 +5769,11 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
5504
5769
  linkInsert: SyncWaterfallHook<[string, Chunk], string>;
5505
5770
  };
5506
5771
 
5772
+ /**
5773
+ * The answer a runtime module gives when it installs no chunk handler at all
5774
+ */
5775
+ static NO_CHUNK_HANDLERS: [string, string][];
5776
+
5507
5777
  /**
5508
5778
  * Runtime modules without any dependencies to other runtime modules
5509
5779
  */
@@ -5943,6 +6213,11 @@ declare interface CssPrintOptions {
5943
6213
  */
5944
6214
  convertLengthUnits?: boolean;
5945
6215
 
6216
+ /**
6217
+ * 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
6218
+ */
6219
+ mergeDistantRules?: boolean;
6220
+
5946
6221
  /**
5947
6222
  * 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
6223
  */
@@ -5957,6 +6232,16 @@ declare interface CssPrintOptions {
5957
6232
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
5958
6233
  */
5959
6234
  transforms?: CssTransformOptions;
6235
+
6236
+ /**
6237
+ * 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
6238
+ */
6239
+ unusedSymbols?: string[];
6240
+
6241
+ /**
6242
+ * 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
6243
+ */
6244
+ pseudoClasses?: { [index: string]: string };
5960
6245
  }
5961
6246
  declare interface CssProcessOptions {
5962
6247
  /**
@@ -6004,6 +6289,11 @@ declare interface CssProcessOptions {
6004
6289
  */
6005
6290
  convertLengthUnits?: boolean;
6006
6291
 
6292
+ /**
6293
+ * 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
6294
+ */
6295
+ mergeDistantRules?: boolean;
6296
+
6007
6297
  /**
6008
6298
  * 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
6299
  */
@@ -6017,6 +6307,16 @@ declare interface CssProcessOptions {
6017
6307
  info: { type: string; hostType: string }
6018
6308
  ) => undefined | string;
6019
6309
 
6310
+ /**
6311
+ * 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
6312
+ */
6313
+ pseudoClasses?: { [index: string]: string };
6314
+
6315
+ /**
6316
+ * 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
6317
+ */
6318
+ unusedSymbols?: string[];
6319
+
6020
6320
  /**
6021
6321
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
6022
6322
  */
@@ -6028,11 +6328,36 @@ declare interface CssProcessOptions {
6028
6328
  deferEmbeddedSource?: DeferredEmbeddedSource[];
6029
6329
  }
6030
6330
  declare interface CssTransformOptions {
6331
+ /**
6332
+ * write a color the target cannot read as an extra declaration before it, in a spelling it does read
6333
+ */
6334
+ colorFallbacks?: boolean;
6335
+
6336
+ /**
6337
+ * write a spelling the target cannot read as one it can — the same value, said another way
6338
+ */
6339
+ lowerUnsupported?: boolean;
6340
+
6341
+ /**
6342
+ * write a name that matches ASCII case-insensitively — an at-rule, property, pseudo, function, unit or keyword — in lowercase
6343
+ */
6344
+ foldCase?: boolean;
6345
+
6346
+ /**
6347
+ * write an escaped identifier the shortest way that names it, in a value or an id
6348
+ */
6349
+ rewriteEscapes?: boolean;
6350
+
6031
6351
  /**
6032
6352
  * 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
6353
  */
6034
6354
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
6035
6355
 
6356
+ /**
6357
+ * write the query or selector list a `@custom-media` / `@custom-selector` names wherever one asks for it, and drop the rule that named it
6358
+ */
6359
+ resolveCustomAtRules?: boolean;
6360
+
6036
6361
  /**
6037
6362
  * write a family of longhands as the one shorthand that sets them
6038
6363
  */
@@ -6058,6 +6383,11 @@ declare interface CssTransformOptions {
6058
6383
  */
6059
6384
  removeDeadRules?: boolean;
6060
6385
 
6386
+ /**
6387
+ * write a `:dir()` the target cannot read as the `[dir]` attribute selector, which reads the attribute rather than the directionality an element may inherit
6388
+ */
6389
+ rewriteDirSelector?: boolean;
6390
+
6061
6391
  /**
6062
6392
  * write each color in the shortest spelling of the same value
6063
6393
  */
@@ -6205,8 +6535,8 @@ declare class DelegatedPlugin {
6205
6535
  /**
6206
6536
  * Creates an instance of DelegatedPlugin.
6207
6537
  */
6208
- constructor(options: Options);
6209
- options: Options;
6538
+ constructor(options: OptionsDelegatedModuleFactoryPlugin);
6539
+ options: OptionsDelegatedModuleFactoryPlugin;
6210
6540
 
6211
6541
  /**
6212
6542
  * Applies the plugin by registering its hooks on the compiler.
@@ -7018,6 +7348,34 @@ declare class DynamicEntryPlugin {
7018
7348
  */
7019
7349
  apply(compiler: Compiler): void;
7020
7350
  }
7351
+ type EcmaVersion =
7352
+ | 3
7353
+ | 5
7354
+ | 6
7355
+ | 7
7356
+ | 8
7357
+ | 9
7358
+ | 10
7359
+ | 11
7360
+ | 12
7361
+ | 13
7362
+ | 14
7363
+ | 15
7364
+ | 16
7365
+ | 17
7366
+ | 2015
7367
+ | 2016
7368
+ | 2017
7369
+ | 2018
7370
+ | 2019
7371
+ | 2020
7372
+ | 2021
7373
+ | 2022
7374
+ | 2023
7375
+ | 2024
7376
+ | 2025
7377
+ | 2026
7378
+ | "latest";
7021
7379
  type Effect = EffectUse | EffectBasic;
7022
7380
  declare interface EffectBasic {
7023
7381
  type: string;
@@ -7665,6 +8023,12 @@ declare interface Environment {
7665
8023
  * The environment supports template literals.
7666
8024
  */
7667
8025
  templateLiteral?: boolean;
8026
+
8027
+ /**
8028
+ * The environment supports top-level await ('await x' at the top level of a module).
8029
+ * @since 5.111.0
8030
+ */
8031
+ topLevelAwait?: boolean;
7668
8032
  }
7669
8033
  declare class EnvironmentPlugin {
7670
8034
  /**
@@ -7872,13 +8236,6 @@ declare interface Experiments {
7872
8236
  */
7873
8237
  lazyCompilation?: boolean | LazyCompilationOptions;
7874
8238
 
7875
- /**
7876
- * Allow output javascript files as module source type.
7877
- * @since 5.0.0
7878
- * @experimental
7879
- */
7880
- outputModule?: boolean;
7881
-
7882
8239
  /**
7883
8240
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7884
8241
  * @since 5.106.0
@@ -7968,13 +8325,6 @@ declare interface ExperimentsNormalized {
7968
8325
  */
7969
8326
  lazyCompilation?: false | LazyCompilationOptions;
7970
8327
 
7971
- /**
7972
- * Allow output javascript files as module source type.
7973
- * @since 5.0.0
7974
- * @experimental
7975
- */
7976
- outputModule?: boolean;
7977
-
7978
8328
  /**
7979
8329
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7980
8330
  * @since 5.106.0
@@ -8490,7 +8840,7 @@ declare interface ExposesConfig {
8490
8840
  declare interface ExposesObject {
8491
8841
  [index: string]: string | ExposesConfig | string[];
8492
8842
  }
8493
- type Expression =
8843
+ type ExpressionEstreeIndex =
8494
8844
  | ImportExpressionImport
8495
8845
  | UnaryExpression
8496
8846
  | ArrayExpression
@@ -8526,6 +8876,38 @@ declare interface ExpressionExpressionInfo {
8526
8876
  getMembersOptionals: () => boolean[];
8527
8877
  getMemberRanges: () => [number, number][];
8528
8878
  }
8879
+ type ExpressionParser =
8880
+ | (ImportExpressionImport & NodeLike)
8881
+ | (UnaryExpression & NodeLike)
8882
+ | (ArrayExpression & NodeLike)
8883
+ | (ArrowFunctionExpression & NodeLike)
8884
+ | (AssignmentExpression & NodeLike)
8885
+ | (AwaitExpression & NodeLike)
8886
+ | (BinaryExpression & NodeLike)
8887
+ | (SimpleCallExpression & NodeLike)
8888
+ | (NewExpression & NodeLike)
8889
+ | (ChainExpression & NodeLike)
8890
+ | (ClassExpression & NodeLike)
8891
+ | (ConditionalExpression & NodeLike)
8892
+ | (FunctionExpression & NodeLike)
8893
+ | (Identifier & NodeLike)
8894
+ | (SimpleLiteral & NodeLike)
8895
+ | (RegExpLiteral & NodeLike)
8896
+ | (BigIntLiteral & NodeLike)
8897
+ | (LogicalExpression & NodeLike)
8898
+ | (MemberExpression & NodeLike)
8899
+ | (MetaProperty & NodeLike)
8900
+ | (ObjectExpression & NodeLike)
8901
+ | (SequenceExpression & NodeLike)
8902
+ | (TaggedTemplateExpression & NodeLike)
8903
+ | (TemplateLiteral & NodeLike)
8904
+ | (ThisExpression & NodeLike)
8905
+ | (UpdateExpression & NodeLike)
8906
+ | (YieldExpression & NodeLike)
8907
+ | (NodeLike & {
8908
+ type: "ParenthesizedExpression";
8909
+ expression: ExpressionParser;
8910
+ });
8529
8911
  declare interface ExtensionAliasOption {
8530
8912
  alias: string | string[];
8531
8913
  extension: string;
@@ -8700,6 +9082,12 @@ declare class ExternalModule extends Module {
8700
9082
  normalModuleFactory: NormalModuleFactory
8701
9083
  ): void;
8702
9084
  canBeWrappedInConcatenation(): boolean;
9085
+
9086
+ /**
9087
+ * The request this external resolves to for its own type, with the record form
9088
+ * narrowed to its entry. An array is a module specifier plus a property path.
9089
+ */
9090
+ getResolvedRequest(): undefined | string | string[];
8703
9091
  static getCompilationHooks: (compilation: Compilation) => {
8704
9092
  /**
8705
9093
  * @since 5.106.0
@@ -8773,6 +9161,11 @@ declare interface ExternalModuleInfo {
8773
9161
  */
8774
9162
  deferredNamespaceObjectName?: string;
8775
9163
 
9164
+ /**
9165
+ * an import reads the spec namespace object the module hands out
9166
+ */
9167
+ specNamespaceObjectUsed: boolean;
9168
+
8776
9169
  /**
8777
9170
  * "default-with-named" namespace
8778
9171
  */
@@ -9102,7 +9495,7 @@ declare interface FileCacheOptions {
9102
9495
  /**
9103
9496
  * Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
9104
9497
  */
9105
- buildDependencies?: { [index: string]: string[] };
9498
+ buildDependencies?: { [index: string]: BuildDependencyItem[] };
9106
9499
 
9107
9500
  /**
9108
9501
  * Base directory for the cache (defaults to node_modules/.cache/webpack).
@@ -9333,6 +9726,7 @@ declare abstract class FileSystemInfo {
9333
9726
  resolveBuildDependencies(
9334
9727
  context: string,
9335
9728
  deps: Iterable<string>,
9729
+ optionalDeps: undefined | Iterable<string>,
9336
9730
  callback: (
9337
9731
  err?: null | Error,
9338
9732
  resolveBuildDependenciesResult?: ResolveBuildDependenciesResult
@@ -9623,6 +10017,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
9623
10017
  | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
9624
10018
  allChunks: boolean;
9625
10019
 
10020
+ /**
10021
+ * The answer a runtime module gives when it installs no chunk handler at all
10022
+ */
10023
+ static NO_CHUNK_HANDLERS: [string, string][];
10024
+
9626
10025
  /**
9627
10026
  * Runtime modules without any dependencies to other runtime modules
9628
10027
  */
@@ -10114,6 +10513,7 @@ declare interface HtmlEmittedContext {
10114
10513
  declare interface HtmlEntryInfo {
10115
10514
  request: string;
10116
10515
  entryName: string;
10516
+ index: number;
10117
10517
  type:
10118
10518
  | "html"
10119
10519
  | "script"
@@ -10225,7 +10625,7 @@ declare class HtmlModulesPlugin {
10225
10625
  */
10226
10626
  static computeContentHash(
10227
10627
  content: string | Buffer,
10228
- outputOptions: Output
10628
+ outputOptions: OutputNormalizedWithDefaults
10229
10629
  ): string;
10230
10630
 
10231
10631
  /**
@@ -10235,9 +10635,14 @@ declare class HtmlModulesPlugin {
10235
10635
  */
10236
10636
  static getChunkFilenameTemplate(
10237
10637
  chunk: Chunk,
10238
- outputOptions: Output
10638
+ outputOptions: OutputNormalizedWithDefaults
10239
10639
  ): ChunkFilenameTemplate;
10240
10640
 
10641
+ /**
10642
+ * Returns true, when the chunk has html.
10643
+ */
10644
+ static chunkHasHtml(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
10645
+
10241
10646
  /**
10242
10647
  * Per-compilation hooks for the experimental HTML support.
10243
10648
  */
@@ -10381,14 +10786,11 @@ declare interface HtmlParserOptions {
10381
10786
  */
10382
10787
  urlHints?: UrlHintRule[];
10383
10788
  }
10384
- type HtmlPrintOptions = Pick<
10385
- CssProcessOptions,
10386
- "environment" | "convertLengthUnits" | "rewriteCustomProperties"
10387
- > & {
10388
- cssTransforms?: CssTransformOptions;
10789
+ declare interface HtmlPrintOptions {
10389
10790
  transforms?: HtmlTransformOptions;
10390
10791
  collapseWhitespace?: boolean | "all" | "conservative" | "smart";
10391
10792
  mergeStyles?: boolean;
10793
+ mergeScripts?: boolean;
10392
10794
  removeEmptyAttributes?: boolean;
10393
10795
  removeEmptyElements?: boolean;
10394
10796
  removeRedundantAttributes?: boolean | "all" | "smart";
@@ -10401,7 +10803,7 @@ type HtmlPrintOptions = Pick<
10401
10803
  ) => undefined | string;
10402
10804
  deferEmbeddedSource?: DeferredEmbeddedSource[];
10403
10805
  deferSrcdoc?: boolean;
10404
- };
10806
+ }
10405
10807
  declare interface HtmlProcessOptions {
10406
10808
  /**
10407
10809
  * context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
@@ -10418,26 +10820,6 @@ declare interface HtmlProcessOptions {
10418
10820
  */
10419
10821
  minimize?: boolean;
10420
10822
 
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
10823
  /**
10442
10824
  * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
10443
10825
  */
@@ -10463,6 +10845,11 @@ declare interface HtmlProcessOptions {
10463
10845
  */
10464
10846
  mergeStyles?: boolean;
10465
10847
 
10848
+ /**
10849
+ * 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)
10850
+ */
10851
+ mergeScripts?: boolean;
10852
+
10466
10853
  /**
10467
10854
  * print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
10468
10855
  */
@@ -10489,12 +10876,12 @@ declare interface HtmlProcessOptions {
10489
10876
  deferSrcdoc?: boolean;
10490
10877
 
10491
10878
  /**
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`
10879
+ * 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
10880
  */
10494
10881
  deferEmbeddedSource?: DeferredEmbeddedSource[];
10495
10882
 
10496
10883
  /**
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
10884
+ * 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
10885
  */
10499
10886
  renderEmbeddedSource?: (
10500
10887
  source: string,
@@ -10749,25 +11136,15 @@ declare interface HtmlTransformHtmlContext {
10749
11136
  }
10750
11137
  declare interface HtmlTransformOptions {
10751
11138
  /**
10752
- * write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name
11139
+ * write a boolean attribute as the bare name its presence already means; `true` only the spellings the spec canonicalizes, `"all"` any value
10753
11140
  */
10754
- collapseBooleanAttributes?: boolean;
11141
+ collapseBooleanAttributes?: boolean | "all";
10755
11142
 
10756
11143
  /**
10757
11144
  * 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
11145
  */
10759
11146
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
10760
11147
 
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
11148
  /**
10772
11149
  * drop or re-pick an attribute value's quotes
10773
11150
  */
@@ -10788,6 +11165,11 @@ declare interface HtmlTransformOptions {
10788
11165
  */
10789
11166
  normalizeNumericAttributes?: boolean;
10790
11167
 
11168
+ /**
11169
+ * drop the whitespace around a URL value (`href`, `src`, `action`, …), which resolving the URL skips over
11170
+ */
11171
+ normalizeUrlAttributes?: boolean;
11172
+
10791
11173
  /**
10792
11174
  * leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
10793
11175
  */
@@ -11434,13 +11816,19 @@ declare class InitFragment<GenerateContext> {
11434
11816
  declare abstract class InlinedUsedName {
11435
11817
  value: InlinedValue;
11436
11818
  suffix: string[];
11437
- render(comment: string): string;
11819
+ render(comment?: string): string;
11820
+
11821
+ /**
11822
+ * Updates the hash with the data contributed by this instance.
11823
+ */
11824
+ updateHash(hash: Hash): void;
11438
11825
  }
11439
11826
  declare abstract class InlinedValue {
11440
11827
  kind: InlinedValueKind;
11441
11828
  value?: null | string | number | boolean;
11442
11829
  renderLiteral(): string;
11443
11830
  render(comment: string): string;
11831
+ equals(other: InlinedValue): boolean;
11444
11832
  serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
11445
11833
  deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
11446
11834
  }
@@ -12599,10 +12987,13 @@ declare class JavascriptParser extends ParserClass {
12599
12987
  /**
12600
12988
  * @since 5.105.0
12601
12989
  */
12602
- collectGuards: SyncBailHook<[Expression], void | GuardCollection>;
12990
+ collectGuards: SyncBailHook<
12991
+ [ExpressionEstreeIndex],
12992
+ void | GuardCollection
12993
+ >;
12603
12994
  classExtendsExpression: SyncBailHook<
12604
12995
  [
12605
- Expression,
12996
+ ExpressionEstreeIndex,
12606
12997
  ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
12607
12998
  ],
12608
12999
  boolean | void
@@ -12619,7 +13010,7 @@ declare class JavascriptParser extends ParserClass {
12619
13010
  */
12620
13011
  classBodyValue: SyncBailHook<
12621
13012
  [
12622
- Expression,
13013
+ ExpressionEstreeIndex,
12623
13014
  MethodDefinition | PropertyDefinition,
12624
13015
  ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
12625
13016
  ],
@@ -12728,16 +13119,16 @@ declare class JavascriptParser extends ParserClass {
12728
13119
  * @since 5.101.3
12729
13120
  */
12730
13121
  collectDestructuringAssignmentProperties: SyncBailHook<
12731
- [Expression],
13122
+ [ExpressionEstreeIndex],
12732
13123
  boolean | void
12733
13124
  >;
12734
- canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
12735
- rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
13125
+ canRename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
13126
+ rename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12736
13127
  assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
12737
13128
  assignMemberChain: HookMap<
12738
13129
  SyncBailHook<[AssignmentExpression, string[]], boolean | void>
12739
13130
  >;
12740
- typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
13131
+ typeof: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12741
13132
  importCall: SyncBailHook<
12742
13133
  [
12743
13134
  ImportExpressionJavascriptParser,
@@ -12788,7 +13179,13 @@ declare class JavascriptParser extends ParserClass {
12788
13179
  >;
12789
13180
  memberChainOfCallMemberChain: HookMap<
12790
13181
  SyncBailHook<
12791
- [Expression, string[], CallExpression, string[], [number, number][]],
13182
+ [
13183
+ ExpressionEstreeIndex,
13184
+ string[],
13185
+ CallExpression,
13186
+ string[],
13187
+ [number, number][]
13188
+ ],
12792
13189
  boolean | void
12793
13190
  >
12794
13191
  >;
@@ -12810,7 +13207,7 @@ declare class JavascriptParser extends ParserClass {
12810
13207
  * @since 5.71.0
12811
13208
  */
12812
13209
  binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
12813
- expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
13210
+ expression: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
12814
13211
  expressionMemberChain: HookMap<
12815
13212
  SyncBailHook<
12816
13213
  [MemberExpression, string[], boolean[], [number, number][]],
@@ -12828,12 +13225,18 @@ declare class JavascriptParser extends ParserClass {
12828
13225
  [LogicalExpression],
12829
13226
  boolean | void
12830
13227
  >;
12831
- program: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
13228
+ program: SyncBailHook<
13229
+ [ProgramImport, CommentJavascriptParser[]],
13230
+ boolean | void
13231
+ >;
12832
13232
  /**
12833
13233
  * @since 5.99.0
12834
13234
  */
12835
13235
  terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
12836
- finish: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
13236
+ finish: SyncBailHook<
13237
+ [ProgramImport, CommentJavascriptParser[]],
13238
+ boolean | void
13239
+ >;
12837
13240
  /**
12838
13241
  * @since 5.99.9
12839
13242
  */
@@ -12911,7 +13314,7 @@ declare class JavascriptParser extends ParserClass {
12911
13314
  | ForOfStatement
12912
13315
  | ExportDefaultDeclaration;
12913
13316
  destructuringAssignmentProperties?: WeakMap<
12914
- Expression,
13317
+ ExpressionEstreeIndex,
12915
13318
  Set<DestructuringAssignmentProperty>
12916
13319
  >;
12917
13320
  currentTagData?:
@@ -12927,7 +13330,7 @@ declare class JavascriptParser extends ParserClass {
12927
13330
  * Destructuring assignment properties for.
12928
13331
  */
12929
13332
  destructuringAssignmentPropertiesFor(
12930
- node: Expression
13333
+ node: ExpressionEstreeIndex
12931
13334
  ): undefined | Set<DestructuringAssignmentProperty>;
12932
13335
 
12933
13336
  /**
@@ -13385,7 +13788,7 @@ declare class JavascriptParser extends ParserClass {
13385
13788
  */
13386
13789
  enterDestructuringAssignment(
13387
13790
  pattern: Pattern,
13388
- expression: Expression
13791
+ expression: ExpressionEstreeIndex
13389
13792
  ):
13390
13793
  | undefined
13391
13794
  | ImportExpressionImport
@@ -14076,12 +14479,14 @@ declare class JavascriptParser extends ParserClass {
14076
14479
  /**
14077
14480
  * Returns parsed string.
14078
14481
  */
14079
- parseString(expression: Expression): string;
14482
+ parseString(expression: ExpressionEstreeIndex): string;
14080
14483
 
14081
14484
  /**
14082
14485
  * Parses calculated string.
14083
14486
  */
14084
- parseCalculatedString(expression: Expression): CalculatedStringResult;
14487
+ parseCalculatedString(
14488
+ expression: ExpressionEstreeIndex
14489
+ ): CalculatedStringResult;
14085
14490
 
14086
14491
  /**
14087
14492
  * Returns evaluation result.
@@ -14142,7 +14547,7 @@ declare class JavascriptParser extends ParserClass {
14142
14547
  start?: number;
14143
14548
  end?: number;
14144
14549
  range?: [number, number];
14145
- loc?: null | SourceLocation;
14550
+ loc?: null | SourceLocationImport;
14146
14551
  }): DependencyLocation;
14147
14552
 
14148
14553
  /**
@@ -14180,7 +14585,7 @@ declare class JavascriptParser extends ParserClass {
14180
14585
  /**
14181
14586
  * Checks whether this javascript parser is statement level expression.
14182
14587
  */
14183
- isStatementLevelExpression(expr: Expression): boolean;
14588
+ isStatementLevelExpression(expr: ExpressionEstreeIndex): boolean;
14184
14589
 
14185
14590
  /**
14186
14591
  * Returns tag data.
@@ -14439,7 +14844,7 @@ declare class JavascriptParser extends ParserClass {
14439
14844
  * Gets name for expression.
14440
14845
  */
14441
14846
  getNameForExpression(
14442
- expression: Expression
14847
+ expression: ExpressionEstreeIndex
14443
14848
  ):
14444
14849
  | undefined
14445
14850
  | {
@@ -14452,7 +14857,7 @@ declare class JavascriptParser extends ParserClass {
14452
14857
  * Returns parser.
14453
14858
  */
14454
14859
  static extend(
14455
- ...plugins: ((BaseParser: typeof ParserImport) => typeof ParserImport)[]
14860
+ ...plugins: ((BaseParser: typeof ParserParser) => typeof ParserParser)[]
14456
14861
  ): typeof JavascriptParser;
14457
14862
  static ALLOWED_MEMBER_TYPES_ALL: number;
14458
14863
  static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
@@ -14645,6 +15050,12 @@ declare interface JavascriptParserOptions {
14645
15050
  */
14646
15051
  sourceImport?: boolean;
14647
15052
 
15053
+ /**
15054
+ * 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.
15055
+ * @since 5.111.0
15056
+ */
15057
+ specNamespaceObject?: boolean;
15058
+
14648
15059
  /**
14649
15060
  * Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
14650
15061
  * @deprecated
@@ -14830,6 +15241,11 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
14830
15241
  compilation: Compilation
14831
15242
  ) => JsonpCompilationPluginHooks;
14832
15243
 
15244
+ /**
15245
+ * The answer a runtime module gives when it installs no chunk handler at all
15246
+ */
15247
+ static NO_CHUNK_HANDLERS: [string, string][];
15248
+
14833
15249
  /**
14834
15250
  * Runtime modules without any dependencies to other runtime modules
14835
15251
  */
@@ -14917,6 +15333,26 @@ declare interface KnownAssetInfo {
14917
15333
  */
14918
15334
  sourceFilename?: string;
14919
15335
 
15336
+ /**
15337
+ * true, when the asset was copied from a file by `output.copy`
15338
+ */
15339
+ copied?: boolean;
15340
+
15341
+ /**
15342
+ * when set, the asset is emitted as a symbolic link rather than as its content
15343
+ */
15344
+ symlink?: AssetSymlink;
15345
+
15346
+ /**
15347
+ * when set, the file the asset is written to is given these permissions
15348
+ */
15349
+ mode?: number;
15350
+
15351
+ /**
15352
+ * when set, the file the asset is written to is stamped with these times
15353
+ */
15354
+ timestamps?: AssetTimestamps;
15355
+
14920
15356
  /**
14921
15357
  * size in bytes, only set after asset has been emitted
14922
15358
  */
@@ -14955,14 +15391,20 @@ declare interface KnownAssetModuleBuildInfo {
14955
15391
  filename?: string;
14956
15392
  assetInfo?: AssetInfo;
14957
15393
  fullContentHash?: string;
15394
+
15395
+ /**
15396
+ * the resource this asset is named after, when
15397
+ * something re-encoded it. Unlike `matchResource` this is serialized, so a
15398
+ * rename set while building survives the persistent cache
15399
+ */
15400
+ assetResource?: string;
14958
15401
  }
14959
15402
  declare interface KnownBuildInfo {
14960
- cacheable?: boolean;
14961
-
14962
15403
  /**
14963
- * reasons why the module is not cacheable (e.g. paths of loaders that marked it)
15404
+ * the module hands out a spec Module Namespace Exotic Object
14964
15405
  */
14965
- notCacheableReasons?: string[];
15406
+ specNamespaceObject?: boolean;
15407
+ cacheable?: boolean;
14966
15408
  strict?: boolean;
14967
15409
  moduleArgument?: string;
14968
15410
  exportsArgument?: string;
@@ -14979,29 +15421,24 @@ declare interface KnownBuildInfo {
14979
15421
  topLevelDeclarations?: Set<string>;
14980
15422
 
14981
15423
  /**
14982
- * true when the module is part of a circular dependency chain
15424
+ * true when the module is in a synchronous circular dependency chain
14983
15425
  */
14984
15426
  isCircular?: boolean;
14985
15427
 
14986
15428
  /**
14987
- * true when the module calls `eval` directly
14988
- */
14989
- usesEval?: boolean;
14990
-
14991
- /**
14992
- * how many `#__PURE__` annotations sit where the parser does not read them
15429
+ * CircularKind bit flags from CircularModulesPlugin; unset when the plugin did not run
14993
15430
  */
14994
- ineffectivePureAnnotations?: number;
15431
+ circularKind?: number;
14995
15432
 
14996
15433
  /**
14997
- * how many times the module reads `this` at its top level
15434
+ * module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
14998
15435
  */
14999
- topLevelThis?: number;
15436
+ usesTopLevelAwaitForOf?: boolean;
15000
15437
 
15001
15438
  /**
15002
- * module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
15439
+ * what the build recorded for stats and the performance hints to report
15003
15440
  */
15004
- usesTopLevelAwaitForOf?: boolean;
15441
+ diagnostics?: BuildDiagnostics;
15005
15442
  }
15006
15443
  declare interface KnownBuildMeta {
15007
15444
  exportsType?: "default" | "namespace" | "flagged" | "dynamic";
@@ -15118,6 +15555,11 @@ declare interface KnownJavascriptModuleBuildInfo {
15118
15555
  */
15119
15556
  moduleConcatenationBailout?: string;
15120
15557
 
15558
+ /**
15559
+ * what rules the module out as a concatenation root, while it may still be an inner module
15560
+ */
15561
+ moduleConcatenationRootBailout?: string;
15562
+
15121
15563
  /**
15122
15564
  * using in APIPlugin
15123
15565
  */
@@ -15644,6 +16086,11 @@ declare interface LStatTypes {
15644
16086
  ) => void
15645
16087
  ): void;
15646
16088
  }
16089
+ declare interface LabelLike {
16090
+ kind?: null | string;
16091
+ name?: string;
16092
+ statementStart?: number;
16093
+ }
15647
16094
 
15648
16095
  /**
15649
16096
  * Options for the default backend.
@@ -16015,6 +16462,11 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
16015
16462
  compilation: Compilation
16016
16463
  ) => LoadScriptCompilationHooks;
16017
16464
 
16465
+ /**
16466
+ * The answer a runtime module gives when it installs no chunk handler at all
16467
+ */
16468
+ static NO_CHUNK_HANDLERS: [string, string][];
16469
+
16018
16470
  /**
16019
16471
  * Runtime modules without any dependencies to other runtime modules
16020
16472
  */
@@ -16507,7 +16959,7 @@ declare abstract class MainTemplate {
16507
16959
  options: PathData
16508
16960
  ) => InterpolatedPathAndAssetInfo;
16509
16961
  get requireFn(): "__webpack_require__";
16510
- get outputOptions(): Output;
16962
+ get outputOptions(): OutputNormalizedWithDefaults;
16511
16963
  }
16512
16964
  declare interface MakeCacheableResult<T> {
16513
16965
  (value: string, cache?: object): T;
@@ -17211,6 +17663,11 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
17211
17663
  linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
17212
17664
  };
17213
17665
 
17666
+ /**
17667
+ * The answer a runtime module gives when it installs no chunk handler at all
17668
+ */
17669
+ static NO_CHUNK_HANDLERS: [string, string][];
17670
+
17214
17671
  /**
17215
17672
  * Runtime modules without any dependencies to other runtime modules
17216
17673
  */
@@ -18014,7 +18471,7 @@ declare interface ModuleOptions {
18014
18471
  defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
18015
18472
 
18016
18473
  /**
18017
- * Enable warnings for full dynamic dependencies.
18474
+ * Enable warnings for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextCritical'.
18018
18475
  * @deprecated
18019
18476
  */
18020
18477
  exprContextCritical?: boolean;
@@ -18703,7 +19160,7 @@ declare interface NodeEnvironmentPluginOptions {
18703
19160
  infrastructureLogging: InfrastructureLogging;
18704
19161
  }
18705
19162
  type NodeEstreeIndex =
18706
- | Program
19163
+ | ProgramImport
18707
19164
  | ImportDeclaration
18708
19165
  | ExportNamedDeclaration
18709
19166
  | ExportAllDeclaration
@@ -18777,6 +19234,14 @@ type NodeEstreeIndex =
18777
19234
  | AssignmentPattern
18778
19235
  | SwitchCase
18779
19236
  | TemplateElement;
19237
+ declare interface NodeLike {
19238
+ type: string;
19239
+ start: number;
19240
+ end: number;
19241
+ loc?: any;
19242
+ sourceFile?: string;
19243
+ range?: [number, number];
19244
+ }
18780
19245
 
18781
19246
  /**
18782
19247
  * Options object for node compatibility features.
@@ -18963,9 +19428,11 @@ declare class NormalModule extends Module {
18963
19428
  */
18964
19429
  beforeSnapshot: SyncHook<[NormalModule]>;
18965
19430
  /**
19431
+ * Async since 5.111.0, so a tap can await work of its own — minifying an
19432
+ * asset, say, which before only a loader could do. `tap` keeps working.
18966
19433
  * @since 5.99.0
18967
19434
  */
18968
- processResult: SyncWaterfallHook<
19435
+ processResult: AsyncSeriesWaterfallHook<
18969
19436
  [
18970
19437
  [
18971
19438
  string | Buffer,
@@ -19774,7 +20241,7 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
19774
20241
  }
19775
20242
 
19776
20243
  /**
19777
- * Updates set size using the provided set.
20244
+ * Updates map size using the provided map.
19778
20245
  */
19779
20246
  declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
19780
20247
  T extends ReadonlyArray<any> = ReadonlyArray<any>
@@ -19785,7 +20252,7 @@ declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
19785
20252
  }
19786
20253
 
19787
20254
  /**
19788
- * Updates set size using the provided set.
20255
+ * Updates map size using the provided map.
19789
20256
  */
19790
20257
  declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
19791
20258
  read: () => string;
@@ -19833,7 +20300,7 @@ declare interface ObjectEncodingOptionsTypes {
19833
20300
  }
19834
20301
 
19835
20302
  /**
19836
- * Updates set size using the provided set.
20303
+ * Updates map size using the provided map.
19837
20304
  */
19838
20305
  declare interface ObjectSerializer {
19839
20306
  serialize: (
@@ -19846,7 +20313,7 @@ declare interface ObjectSerializer {
19846
20313
  }
19847
20314
 
19848
20315
  /**
19849
- * Updates set size using the provided set.
20316
+ * Updates map size using the provided map.
19850
20317
  */
19851
20318
  declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
19852
20319
  write: (
@@ -19878,7 +20345,7 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
19878
20345
  }
19879
20346
 
19880
20347
  /**
19881
- * Updates set size using the provided set.
20348
+ * Updates map size using the provided map.
19882
20349
  */
19883
20350
  declare interface ObjectSerializerContextObjectMiddlewareObject_3<
19884
20351
  T extends ReadonlyArray<any> = ReadonlyArray<any>
@@ -19897,7 +20364,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_3<
19897
20364
  }
19898
20365
 
19899
20366
  /**
19900
- * Updates set size using the provided set.
20367
+ * Updates map size using the provided map.
19901
20368
  */
19902
20369
  declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
19903
20370
  write: (
@@ -19916,7 +20383,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
19916
20383
  }
19917
20384
 
19918
20385
  /**
19919
- * Updates set size using the provided set.
20386
+ * Updates map size using the provided map.
19920
20387
  */
19921
20388
  declare interface ObjectSerializerSnapshot {
19922
20389
  length: number;
@@ -20143,6 +20610,12 @@ declare interface Optimization {
20143
20610
  * @since 5.110.0
20144
20611
  */
20145
20612
  declare interface OptimizationMinimizeCss {
20613
+ /**
20614
+ * 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.
20615
+ * @since 5.111.0
20616
+ */
20617
+ colorFallbacks?: boolean;
20618
+
20146
20619
  /**
20147
20620
  * 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
20621
  * @since 5.110.0
@@ -20155,6 +20628,24 @@ declare interface OptimizationMinimizeCss {
20155
20628
  */
20156
20629
  convertLengthUnits?: boolean;
20157
20630
 
20631
+ /**
20632
+ * 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.
20633
+ * @since 5.111.0
20634
+ */
20635
+ foldCase?: boolean;
20636
+
20637
+ /**
20638
+ * 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.
20639
+ * @since 5.111.0
20640
+ */
20641
+ lowerUnsupported?: boolean;
20642
+
20643
+ /**
20644
+ * 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.
20645
+ * @since 5.111.0
20646
+ */
20647
+ mergeDistantRules?: boolean;
20648
+
20158
20649
  /**
20159
20650
  * 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
20651
  * @since 5.110.0
@@ -20173,6 +20664,12 @@ declare interface OptimizationMinimizeCss {
20173
20664
  */
20174
20665
  normalizeQuotes?: boolean;
20175
20666
 
20667
+ /**
20668
+ * 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.
20669
+ * @since 5.111.0
20670
+ */
20671
+ pseudoClasses?: { [index: string]: string };
20672
+
20176
20673
  /**
20177
20674
  * 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
20675
  * @since 5.110.0
@@ -20180,17 +20677,35 @@ declare interface OptimizationMinimizeCss {
20180
20677
  reduceFunctions?: boolean;
20181
20678
 
20182
20679
  /**
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`.
20680
+ * 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
20681
  * @since 5.110.0
20185
20682
  */
20186
20683
  removeDeadRules?: boolean;
20187
20684
 
20685
+ /**
20686
+ * 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()`.
20687
+ * @since 5.111.0
20688
+ */
20689
+ resolveCustomAtRules?: boolean;
20690
+
20188
20691
  /**
20189
20692
  * 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
20693
  * @since 5.110.0
20191
20694
  */
20192
20695
  rewriteCustomProperties?: boolean;
20193
20696
 
20697
+ /**
20698
+ * 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.
20699
+ * @since 5.111.0
20700
+ */
20701
+ rewriteDirSelector?: boolean;
20702
+
20703
+ /**
20704
+ * 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.
20705
+ * @since 5.111.0
20706
+ */
20707
+ rewriteEscapes?: boolean;
20708
+
20194
20709
  /**
20195
20710
  * 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
20711
  * @since 5.110.0
@@ -20198,7 +20713,7 @@ declare interface OptimizationMinimizeCss {
20198
20713
  shortenColors?: boolean;
20199
20714
 
20200
20715
  /**
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.
20716
+ * 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
20717
  * @since 5.110.0
20203
20718
  */
20204
20719
  shortenMediaQueries?: boolean;
@@ -20221,6 +20736,12 @@ declare interface OptimizationMinimizeCss {
20221
20736
  */
20222
20737
  shortenValues?: boolean;
20223
20738
 
20739
+ /**
20740
+ * 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.
20741
+ * @since 5.111.0
20742
+ */
20743
+ unusedSymbols?: string[];
20744
+
20224
20745
  /**
20225
20746
  * 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
20747
  * @since 5.110.0
@@ -20234,10 +20755,10 @@ declare interface OptimizationMinimizeCss {
20234
20755
  */
20235
20756
  declare interface OptimizationMinimizeHtml {
20236
20757
  /**
20237
- * Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default.
20758
+ * 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
20759
  * @since 5.110.0
20239
20760
  */
20240
- collapseBooleanAttributes?: boolean;
20761
+ collapseBooleanAttributes?: boolean | "all";
20241
20762
 
20242
20763
  /**
20243
20764
  * 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 +20772,12 @@ declare interface OptimizationMinimizeHtml {
20251
20772
  */
20252
20773
  comments?: string | boolean | RegExp | ((comment: string) => boolean);
20253
20774
 
20775
+ /**
20776
+ * 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.
20777
+ * @since 5.111.0
20778
+ */
20779
+ mergeScripts?: boolean;
20780
+
20254
20781
  /**
20255
20782
  * 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
20783
  * @since 5.110.0
@@ -20263,24 +20790,6 @@ declare interface OptimizationMinimizeHtml {
20263
20790
  */
20264
20791
  minifyConditionalComments?: boolean;
20265
20792
 
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
20793
  /**
20285
20794
  * 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
20795
  * @since 5.110.0
@@ -20294,7 +20803,7 @@ declare interface OptimizationMinimizeHtml {
20294
20803
  normalizeEnumeratedAttributes?: boolean;
20295
20804
 
20296
20805
  /**
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.
20806
+ * 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
20807
  * @since 5.110.0
20299
20808
  */
20300
20809
  normalizeListAttributes?: boolean;
@@ -20305,6 +20814,12 @@ declare interface OptimizationMinimizeHtml {
20305
20814
  */
20306
20815
  normalizeNumericAttributes?: boolean;
20307
20816
 
20817
+ /**
20818
+ * 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.
20819
+ * @since 5.111.0
20820
+ */
20821
+ normalizeUrlAttributes?: boolean;
20822
+
20308
20823
  /**
20309
20824
  * 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
20825
  * @since 5.110.0
@@ -20342,7 +20857,7 @@ declare interface OptimizationMinimizeHtml {
20342
20857
  sortAttributes?: boolean;
20343
20858
 
20344
20859
  /**
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.
20860
+ * 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
20861
  * @since 5.110.0
20347
20862
  */
20348
20863
  sortTokenLists?: boolean;
@@ -20863,7 +21378,17 @@ declare interface OptimizationSplitChunksOptions {
20863
21378
  */
20864
21379
  usedExports?: boolean;
20865
21380
  }
20866
- declare interface Options {
21381
+ declare abstract class OptionsApply {
21382
+ /**
21383
+ * Returns options object.
21384
+ */
21385
+ process(
21386
+ options: WebpackOptionsNormalizedWithDefaults,
21387
+ compiler: Compiler,
21388
+ interception?: WebpackOptionsInterception
21389
+ ): WebpackOptionsNormalizedWithDefaults;
21390
+ }
21391
+ declare interface OptionsDelegatedModuleFactoryPlugin {
20867
21392
  /**
20868
21393
  * source
20869
21394
  */
@@ -20899,15 +21424,126 @@ declare interface Options {
20899
21424
  */
20900
21425
  associatedObjectForCache?: object;
20901
21426
  }
20902
- declare abstract class OptionsApply {
21427
+ declare interface OptionsParser {
20903
21428
  /**
20904
- * Returns options object.
21429
+ * which edition to parse
20905
21430
  */
20906
- process(
20907
- options: WebpackOptionsNormalizedWithDefaults,
20908
- compiler: Compiler,
20909
- interception?: WebpackOptionsInterception
20910
- ): WebpackOptionsNormalizedWithDefaults;
21431
+ ecmaVersion: EcmaVersion;
21432
+
21433
+ /**
21434
+ * the goal symbol
21435
+ */
21436
+ sourceType?: "module" | "commonjs" | "script";
21437
+
21438
+ /**
21439
+ * whether the code is strict whatever it says
21440
+ */
21441
+ strict?: boolean;
21442
+
21443
+ /**
21444
+ * called where a semicolon was inserted
21445
+ */
21446
+ onInsertedSemicolon?: (
21447
+ lastTokEnd: number,
21448
+ lastTokEndLoc?: null | Position
21449
+ ) => void;
21450
+
21451
+ /**
21452
+ * called at a trailing comma
21453
+ */
21454
+ onTrailingComma?: (
21455
+ lastTokEnd: number,
21456
+ lastTokEndLoc?: null | Position
21457
+ ) => void;
21458
+
21459
+ /**
21460
+ * whether reserved words may name things
21461
+ */
21462
+ allowReserved?: boolean | "never";
21463
+
21464
+ /**
21465
+ * whether `return` may sit at the top level
21466
+ */
21467
+ allowReturnOutsideFunction?: boolean;
21468
+
21469
+ /**
21470
+ * whether module syntax may sit anywhere
21471
+ */
21472
+ allowImportExportEverywhere?: boolean;
21473
+
21474
+ /**
21475
+ * whether `await` may sit outside a function
21476
+ */
21477
+ allowAwaitOutsideFunction?: boolean;
21478
+
21479
+ /**
21480
+ * whether `super` may sit outside a method
21481
+ */
21482
+ allowSuperOutsideMethod?: boolean;
21483
+
21484
+ /**
21485
+ * whether a leading `#!` line is skipped
21486
+ */
21487
+ allowHashBang?: boolean;
21488
+
21489
+ /**
21490
+ * whether private names must be declared
21491
+ */
21492
+ checkPrivateFields?: boolean;
21493
+
21494
+ /**
21495
+ * whether nodes carry `loc`
21496
+ */
21497
+ locations?: boolean;
21498
+
21499
+ /**
21500
+ * where the first offset falls
21501
+ */
21502
+ startLocation?: { line: number; column: number };
21503
+
21504
+ /**
21505
+ * where tokens are reported
21506
+ */
21507
+ onToken?: any[] | ((token?: any) => void);
21508
+
21509
+ /**
21510
+ * where comments are reported
21511
+ */
21512
+ onComment?:
21513
+ | any[]
21514
+ | ((
21515
+ isBlock: boolean,
21516
+ text: string,
21517
+ start: number,
21518
+ end: number,
21519
+ startLoc?: null | Position,
21520
+ endLoc?: null | Position
21521
+ ) => void);
21522
+
21523
+ /**
21524
+ * whether nodes carry `range`
21525
+ */
21526
+ ranges?: boolean;
21527
+
21528
+ /**
21529
+ * a program node to append to
21530
+ */
21531
+ program?: NodeLike;
21532
+
21533
+ /**
21534
+ * the name errors and locations carry
21535
+ */
21536
+ sourceFile?: string;
21537
+
21538
+ /**
21539
+ * the name every node carries
21540
+ */
21541
+ directSourceFile?: string;
21542
+
21543
+ /**
21544
+ * whether parentheses become nodes
21545
+ */
21546
+ preserveParens?: boolean;
20911
21547
  }
20912
21548
  declare interface OriginRecord {
20913
21549
  module: null | Module;
@@ -21001,6 +21637,12 @@ declare interface Output {
21001
21637
  */
21002
21638
  compareBeforeEmit?: boolean;
21003
21639
 
21640
+ /**
21641
+ * Copy files and directories to the output directory.
21642
+ * @since 5.111.0
21643
+ */
21644
+ copy?: string | CopyPattern[];
21645
+
21004
21646
  /**
21005
21647
  * This option enables cross-origin loading of chunks.
21006
21648
  */
@@ -21285,6 +21927,24 @@ declare interface OutputFileSystem {
21285
21927
  pathLike: PathLikeFs,
21286
21928
  callback: (err: null | NodeJS.ErrnoException) => void
21287
21929
  ) => void;
21930
+ symlink?: (
21931
+ target: PathLikeFs,
21932
+ path: PathLikeFs,
21933
+ type: undefined | null | "file" | "dir" | "junction",
21934
+ callback: (err: null | NodeJS.ErrnoException) => void
21935
+ ) => void;
21936
+ readlink?: ReadlinkFs;
21937
+ chmod?: (
21938
+ path: PathLikeFs,
21939
+ mode: string | number,
21940
+ callback: (err: null | NodeJS.ErrnoException) => void
21941
+ ) => void;
21942
+ utimes?: (
21943
+ path: PathLikeFs,
21944
+ atime: string | number | Date,
21945
+ mtime: string | number | Date,
21946
+ callback: (err: null | NodeJS.ErrnoException) => void
21947
+ ) => void;
21288
21948
  stat: StatFs;
21289
21949
  lstat?: LStatFs;
21290
21950
  readFile: ReadFileFs;
@@ -21526,6 +22186,11 @@ declare interface OutputNormalized {
21526
22186
  */
21527
22187
  compareBeforeEmit?: boolean;
21528
22188
 
22189
+ /**
22190
+ * Patterns of files which are copied to the output directory, and the options of the copying itself.
22191
+ */
22192
+ copy?: CopyOptions;
22193
+
21529
22194
  /**
21530
22195
  * This option enables cross-origin loading of chunks.
21531
22196
  */
@@ -21823,7 +22488,7 @@ declare interface ParameterizedComparator<TArg extends object, T> {
21823
22488
  type ParseErrorSeverity = "error" | "warning";
21824
22489
  declare interface ParseOptionsJavascriptParser {
21825
22490
  sourceType: "module" | "script";
21826
- ecmaVersion: ecmaVersion;
22491
+ ecmaVersion: EcmaVersion;
21827
22492
  locations?: boolean;
21828
22493
  comments?: boolean;
21829
22494
  ranges?: boolean;
@@ -21831,7 +22496,7 @@ declare interface ParseOptionsJavascriptParser {
21831
22496
  allowReturnOutsideFunction?: boolean;
21832
22497
 
21833
22498
  /**
21834
- * internal: serve `range` lazily and skip acorn's location/range tracking
22499
+ * internal: serve `range` lazily and skip the parser's location/range tracking
21835
22500
  */
21836
22501
  lazyNodes?: boolean;
21837
22502
 
@@ -21857,7 +22522,7 @@ declare interface ParseOptionsSyntax {
21857
22522
  comment?: (input: string, start: number, end: number) => number;
21858
22523
  }
21859
22524
  declare interface ParseResult {
21860
- ast: Program;
22525
+ ast: ProgramImport;
21861
22526
  comments: CommentJavascriptParser[];
21862
22527
  }
21863
22528
  declare interface ParsedIdentifier {
@@ -21999,6 +22664,111 @@ declare interface ParserOptionsByModuleTypeKnown {
21999
22664
  declare interface ParserOptionsByModuleTypeUnknown {
22000
22665
  [index: string]: { [index: string]: any };
22001
22666
  }
22667
+
22668
+ /**
22669
+ * The ECMAScript parser webpack owns, ported from acorn 8.18.0 so the bundler
22670
+ * ships no parser dependency. `lib/javascript/syntax.js` subclasses it and
22671
+ * overrides the hot paths.
22672
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/state.js
22673
+ */
22674
+ declare class ParserParser {
22675
+ constructor(
22676
+ options: undefined | null | Partial<OptionsParser>,
22677
+ input: string,
22678
+ startPos?: number
22679
+ );
22680
+ options: ResolvedOptionsParser;
22681
+ sourceFile: null | string;
22682
+ keywords: RegExp;
22683
+ reservedWords: RegExp;
22684
+ reservedWordsStrict: RegExp;
22685
+ reservedWordsStrictBind: RegExp;
22686
+ input: string;
22687
+ containsEsc: boolean;
22688
+ pos: number;
22689
+ curLine: number;
22690
+ lineStart: number;
22691
+ type: TokenType;
22692
+ value: any;
22693
+ end: number;
22694
+ start: number;
22695
+ endLoc?: Position;
22696
+ startLoc?: Position;
22697
+ lastTokStartLoc?: null | Position;
22698
+ lastTokEndLoc?: null | Position;
22699
+ lastTokEnd: number;
22700
+ lastTokStart: number;
22701
+ context: TokContextLike[];
22702
+ exprAllowed: boolean;
22703
+ inModule: boolean;
22704
+ strict: boolean;
22705
+ potentialArrowAt: number;
22706
+ potentialArrowInForAwait: boolean;
22707
+ awaitIdentPos: number;
22708
+ awaitPos: number;
22709
+ yieldPos: number;
22710
+ labels: LabelLike[];
22711
+ undefinedExports: Record<string, NodeLike>;
22712
+ scopeStack: ScopeParser[];
22713
+ regexpState: null | RegExpValidationState;
22714
+ privateNameStack: any[];
22715
+ get inFunction(): boolean;
22716
+ get inGenerator(): boolean;
22717
+ get inAsync(): boolean;
22718
+ get canAwait(): boolean;
22719
+ get allowReturn(): boolean;
22720
+ get allowSuper(): boolean;
22721
+ get allowDirectSuper(): boolean;
22722
+ get treatFunctionsAsVar(): number | boolean;
22723
+ get allowNewDotTarget(): boolean;
22724
+ get allowUsing(): boolean;
22725
+ get inClassStaticBlock(): boolean;
22726
+
22727
+ /**
22728
+ * Whether a directive prologue starting at `start` opens with `"use strict"`.
22729
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/parseutil.js
22730
+ */
22731
+ strictDirective(start: number): boolean;
22732
+ unexpected(pos?: number): never;
22733
+ parse(): any;
22734
+
22735
+ /**
22736
+ * Read a full expression, including the comma operator.
22737
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/expression.js
22738
+ */
22739
+ parseExpression(
22740
+ forInit?: string | boolean,
22741
+ refDestructuringErrors?: any
22742
+ ): any;
22743
+ getToken(): TokenParser;
22744
+ initialContext(): TokContextLike[];
22745
+ enterScope(flags: number): void;
22746
+ treatFunctionsAsVarInScope(scope: { flags: number }): number | boolean;
22747
+ currentScope(): ScopeParser;
22748
+ currentVarScope(): ScopeParser;
22749
+ currentThisScope(): ScopeParser;
22750
+
22751
+ /**
22752
+ * Report a parse error, naming where in the source it was found.
22753
+ * acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/location.js
22754
+ */
22755
+ raise(pos: number, message: string): never;
22756
+ raiseRecoverable(pos: number, message: string): never;
22757
+ curPosition(): undefined | Position;
22758
+ skipLineComment(startSkip: number): void;
22759
+ [Symbol.iterator](): Iterator<TokenParser>;
22760
+ static extend(...plugins: ((parser?: any) => any)[]): any;
22761
+ static parse(input: string, options?: Partial<OptionsParser>): ProgramParser;
22762
+ static parseExpressionAt(
22763
+ input: string,
22764
+ pos: number,
22765
+ options?: Partial<OptionsParser>
22766
+ ): ExpressionParser;
22767
+ static tokenizer(
22768
+ input: string,
22769
+ options?: Partial<OptionsParser>
22770
+ ): ParserParser;
22771
+ }
22002
22772
  type ParserState = ParserStateBase & Record<string, any>;
22003
22773
  declare interface ParserStateBase {
22004
22774
  source: string | Buffer;
@@ -22104,6 +22874,12 @@ declare interface PerformanceOptions {
22104
22874
  */
22105
22875
  all?: boolean;
22106
22876
 
22877
+ /**
22878
+ * 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).
22879
+ * @since 5.111.0
22880
+ */
22881
+ analyzableBailouts?: boolean;
22882
+
22107
22883
  /**
22108
22884
  * Filter function to select assets that are checked.
22109
22885
  */
@@ -22157,18 +22933,6 @@ declare interface PerformanceOptions {
22157
22933
  */
22158
22934
  dynamicExports?: boolean;
22159
22935
 
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
22936
  /**
22173
22937
  * Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
22174
22938
  * @since 5.110.0
@@ -22250,6 +23014,12 @@ declare interface PerformanceOptions {
22250
23014
  */
22251
23015
  scopeHoistingBailouts?: boolean;
22252
23016
 
23017
+ /**
23018
+ * 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).
23019
+ * @since 5.111.0
23020
+ */
23021
+ sourceMaps?: boolean;
23022
+
22253
23023
  /**
22254
23024
  * Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
22255
23025
  * @since 5.110.0
@@ -22275,34 +23045,22 @@ declare interface PerformanceOptions {
22275
23045
  unsplitVendors?: boolean;
22276
23046
 
22277
23047
  /**
22278
- * Report 'resolve.alias' entries that no request matched.
22279
- * @since 5.110.0
22280
- */
22281
- unusedAliases?: boolean;
22282
-
22283
- /**
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
22286
- */
22287
- unusedDefines?: boolean;
22288
-
22289
- /**
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
23048
+ * Report asset files emitted for an import whose binding nothing reads, so the bytes ship for nothing (requires 'hints' to be enabled).
23049
+ * @since 5.111.0
22292
23050
  */
22293
- unusedExternals?: boolean;
23051
+ unusedAssets?: boolean;
22294
23052
 
22295
23053
  /**
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
23054
+ * 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.
23055
+ * @since 5.111.0
22298
23056
  */
22299
- unusedReexports?: boolean;
23057
+ unusedConfig?: boolean;
22300
23058
 
22301
23059
  /**
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
23060
+ * 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).
23061
+ * @since 5.111.0
22304
23062
  */
22305
- unusedRules?: boolean;
23063
+ unusedModules?: boolean;
22306
23064
  }
22307
23065
  declare interface PitchLoaderDefinitionFunction<
22308
23066
  OptionsType = {},
@@ -22404,6 +23162,19 @@ declare interface PnpApi {
22404
23162
  options: { considerBuiltins: boolean }
22405
23163
  ) => null | string;
22406
23164
  }
23165
+
23166
+ /**
23167
+ * A `{ line, column }` pair, as `options.locations` reports one.
23168
+ */
23169
+ declare abstract class Position {
23170
+ line: number;
23171
+ column: number;
23172
+ offset(n: number): Position;
23173
+ }
23174
+ declare interface PositionLike {
23175
+ line: number;
23176
+ column: number;
23177
+ }
22407
23178
  declare class PrefetchPlugin {
22408
23179
  /**
22409
23180
  * Creates an instance of PrefetchPlugin.
@@ -22635,7 +23406,7 @@ declare class PrintContext<TPath, TNode, TPrintOptions = object> {
22635
23406
  * them ahead of the next top-level node as well.
22636
23407
  */
22637
23408
  takeInserts(start: number, end: number): string;
22638
- sourceMap(options: SourceMapOptions): SourceMap;
23409
+ sourceMap(options: SourceMapOptions, code?: string): SourceMap;
22639
23410
 
22640
23411
  /**
22641
23412
  * Stand the text `resolve` gives back in place of every deferred write left
@@ -22727,6 +23498,7 @@ declare interface ProfilingPluginOptions {
22727
23498
  */
22728
23499
  outputPath?: string;
22729
23500
  }
23501
+ type ProgramParser = ProgramImport & NodeLike;
22730
23502
  declare class ProgressPlugin {
22731
23503
  /**
22732
23504
  * Creates an instance of ProgressPlugin.
@@ -23202,21 +23974,7 @@ declare interface ReadFileSync {
23202
23974
  ): string;
23203
23975
  (
23204
23976
  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 })
23977
+ options: ObjectEncodingOptionsFs & { flag?: string }
23220
23978
  ): string | Buffer;
23221
23979
  }
23222
23980
  declare interface ReadFileTypes {
@@ -23618,6 +24376,11 @@ declare interface RealContentHashPluginOptions {
23618
24376
  * the hash digest to use
23619
24377
  */
23620
24378
  hashDigest: string;
24379
+
24380
+ /**
24381
+ * run only where analyzable output marked a name for repair
24382
+ */
24383
+ onDemand?: boolean;
23621
24384
  }
23622
24385
  declare interface RealDependencyLocation {
23623
24386
  start: SourcePosition;
@@ -23700,7 +24463,7 @@ declare interface RecursiveNonNullable<T> {}
23700
24463
  */
23701
24464
  declare abstract class Reference {
23702
24465
  identifier: Identifier;
23703
- from: Scope;
24466
+ from: ScopeScopeAnalyzer;
23704
24467
  resolved?: Variable;
23705
24468
  }
23706
24469
  type ReferenceableItem = string | object;
@@ -23720,6 +24483,44 @@ declare interface ReferencedExport {
23720
24483
  */
23721
24484
  canInline?: boolean;
23722
24485
  }
24486
+
24487
+ /**
24488
+ * The cursor a regexp literal is validated through.
24489
+ */
24490
+ declare abstract class RegExpValidationState {
24491
+ parser: ParserParser;
24492
+ validFlags: string;
24493
+ unicodeProperties: any;
24494
+ source: string;
24495
+ flags: string;
24496
+ start: number;
24497
+ switchU: boolean;
24498
+ switchV: boolean;
24499
+ switchN: boolean;
24500
+ pos: number;
24501
+ lastIntValue: number;
24502
+ lastStringValue: string;
24503
+ lastAssertionIsQuantifiable: boolean;
24504
+ numCapturingParens: number;
24505
+ maxBackReference: number;
24506
+ groupNames: any;
24507
+ backReferenceNames: string[];
24508
+ branchID: null | BranchID;
24509
+ reset(start: number, pattern: string, flags: string): void;
24510
+ raise(message: string): void;
24511
+
24512
+ /**
24513
+ * The code point at an index, joining a surrogate pair where the `u` flag
24514
+ * asks for code points rather than units.
24515
+ */
24516
+ at(i: number, forceU?: boolean): number;
24517
+ nextIndex(i: number, forceU?: boolean): number;
24518
+ current(forceU?: boolean): number;
24519
+ lookahead(forceU?: boolean): number;
24520
+ advance(forceU?: boolean): void;
24521
+ eat(ch: number, forceU?: boolean): boolean;
24522
+ eatChars(chs: number[], forceU?: boolean): boolean;
24523
+ }
23723
24524
  type Remotes = (string | RemotesObject)[] | RemotesObject;
23724
24525
 
23725
24526
  /**
@@ -24470,7 +25271,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24470
25271
  resolver?: Resolver;
24471
25272
 
24472
25273
  /**
24473
- * A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` `URL` instance
25274
+ * A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` URL
24474
25275
  */
24475
25276
  modules?: string | URL_url | (string | URL_url)[];
24476
25277
 
@@ -24497,7 +25298,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24497
25298
  pnpApi?: null | PnpApi;
24498
25299
 
24499
25300
  /**
24500
- * A list of root paths, each an absolute path or a `file:` `URL` instance
25301
+ * A list of root paths, each an absolute path or a `file:` URL
24501
25302
  */
24502
25303
  roots?: (string | URL_url)[];
24503
25304
 
@@ -24512,7 +25313,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24512
25313
  resolveToContext?: boolean;
24513
25314
 
24514
25315
  /**
24515
- * A list of resolve restrictions, each an absolute path, a `file:` `URL` instance, or a RegExp
25316
+ * A list of resolve restrictions, each an absolute path, a `file:` URL, or a RegExp
24516
25317
  */
24517
25318
  restrictions?: (string | RegExp | URL_url)[];
24518
25319
 
@@ -24532,7 +25333,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
24532
25333
  preferAbsolute?: boolean;
24533
25334
 
24534
25335
  /**
24535
- * TypeScript config file path (or `file:` `URL` instance) or config object with configFile and references
25336
+ * TypeScript config file path (or `file:` URL) or config object with configFile and references
24536
25337
  */
24537
25338
  tsconfig?: string | boolean | URL_url | UserTsconfigOptions;
24538
25339
  }
@@ -24559,12 +25360,129 @@ declare interface ResolvedContextTimestampAndHash {
24559
25360
  timestampHash?: string;
24560
25361
  hash: string;
24561
25362
  }
24562
- declare interface ResolvedOptions {
25363
+ declare interface ResolvedOptionsDefaults {
24563
25364
  /**
24564
25365
  * - platform target properties
24565
25366
  */
24566
25367
  platform: false | PlatformTargetProperties;
24567
25368
  }
25369
+ declare interface ResolvedOptionsParser {
25370
+ /**
25371
+ * the edition, as the number the parser compares against
25372
+ */
25373
+ ecmaVersion: number;
25374
+
25375
+ /**
25376
+ * the goal symbol
25377
+ */
25378
+ sourceType: "module" | "commonjs" | "script";
25379
+
25380
+ /**
25381
+ * whether the code is strict whatever it says
25382
+ */
25383
+ strict: boolean;
25384
+
25385
+ /**
25386
+ * called where a semicolon was inserted
25387
+ */
25388
+ onInsertedSemicolon:
25389
+ null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
25390
+
25391
+ /**
25392
+ * called at a trailing comma
25393
+ */
25394
+ onTrailingComma:
25395
+ null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
25396
+
25397
+ /**
25398
+ * whether reserved words may name things
25399
+ */
25400
+ allowReserved: boolean | "never";
25401
+
25402
+ /**
25403
+ * whether `return` may sit at the top level
25404
+ */
25405
+ allowReturnOutsideFunction: boolean;
25406
+
25407
+ /**
25408
+ * whether module syntax may sit anywhere
25409
+ */
25410
+ allowImportExportEverywhere: boolean;
25411
+
25412
+ /**
25413
+ * whether `await` may sit outside a function
25414
+ */
25415
+ allowAwaitOutsideFunction: boolean;
25416
+
25417
+ /**
25418
+ * whether `super` may sit outside a method
25419
+ */
25420
+ allowSuperOutsideMethod: boolean;
25421
+
25422
+ /**
25423
+ * whether a leading `#!` line is skipped
25424
+ */
25425
+ allowHashBang: boolean;
25426
+
25427
+ /**
25428
+ * whether private names must be declared
25429
+ */
25430
+ checkPrivateFields: boolean;
25431
+
25432
+ /**
25433
+ * whether nodes carry `loc`
25434
+ */
25435
+ locations: boolean;
25436
+
25437
+ /**
25438
+ * where the first offset falls
25439
+ */
25440
+ startLocation: null | { line: number; column: number };
25441
+
25442
+ /**
25443
+ * where tokens are reported
25444
+ */
25445
+ onToken: null | ((token?: any) => void);
25446
+
25447
+ /**
25448
+ * where comments are reported
25449
+ */
25450
+ onComment:
25451
+ | null
25452
+ | ((
25453
+ isBlock: boolean,
25454
+ text: string,
25455
+ start: number,
25456
+ end: number,
25457
+ startLoc?: null | Position,
25458
+ endLoc?: null | Position
25459
+ ) => void);
25460
+
25461
+ /**
25462
+ * whether nodes carry `range`
25463
+ */
25464
+ ranges: boolean;
25465
+
25466
+ /**
25467
+ * a program node to append to
25468
+ */
25469
+ program: null | NodeLike;
25470
+
25471
+ /**
25472
+ * the name errors and locations carry
25473
+ */
25474
+ sourceFile: null | string;
25475
+
25476
+ /**
25477
+ * the name every node carries
25478
+ */
25479
+ directSourceFile: null | string;
25480
+
25481
+ /**
25482
+ * whether parentheses become nodes
25483
+ */
25484
+ preserveParens: boolean;
25485
+ }
24568
25486
  declare abstract class Resolver {
24569
25487
  fileSystem: FileSystem;
24570
25488
  options: ResolveOptionsResolverFactoryObject1;
@@ -25339,6 +26257,12 @@ declare class RuntimeModule extends Module {
25339
26257
  */
25340
26258
  attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
25341
26259
 
26260
+ /**
26261
+ * The `[handlerMap, key]` pairs this module installs onto a chunk handler map
26262
+ * such as `__webpack_require__.f`, or `null` where it cannot name them.
26263
+ */
26264
+ getInstalledChunkHandlers(): null | [string, string][];
26265
+
25342
26266
  /**
25343
26267
  * Generates runtime code for this runtime module.
25344
26268
  */
@@ -25356,6 +26280,11 @@ declare class RuntimeModule extends Module {
25356
26280
  */
25357
26281
  shouldIsolate(): boolean;
25358
26282
 
26283
+ /**
26284
+ * The answer a runtime module gives when it installs no chunk handler at all
26285
+ */
26286
+ static NO_CHUNK_HANDLERS: [string, string][];
26287
+
25359
26288
  /**
25360
26289
  * Runtime modules without any dependencies to other runtime modules
25361
26290
  */
@@ -25506,6 +26435,7 @@ declare abstract class RuntimeTemplate {
25506
26435
  supportsArrowFunction(): boolean;
25507
26436
  supportsAsyncFunction(): boolean;
25508
26437
  supportsGenerator(): boolean;
26438
+ supportsTopLevelAwait(): boolean;
25509
26439
  supportsOptionalChaining(): boolean;
25510
26440
  supportsSpread(): boolean;
25511
26441
  supportsObjectHasOwn(): boolean;
@@ -25519,6 +26449,19 @@ declare abstract class RuntimeTemplate {
25519
26449
  supportsSourceImport(): boolean;
25520
26450
  supportsModulePreload(): boolean;
25521
26451
 
26452
+ /**
26453
+ * Whether the deferred fill rewrote a chunk whose hashed name would otherwise go
26454
+ * stale, which `RealContentHashPlugin` reads to run — and to repair `[chunkhash]`
26455
+ * names — where `optimization.realContentHash` did not ask for it.
26456
+ */
26457
+ needsAnalyzableRepair(): boolean;
26458
+
26459
+ /**
26460
+ * The assets the deferred fill rewrote under a name that has to be repaired: an
26461
+ * on-demand repair renames only these and whatever names them.
26462
+ */
26463
+ analyzableRepairedAssets(): ReadonlySet<string>;
26464
+
25522
26465
  /**
25523
26466
  * Whether a reference a foreign bundler can follow without running webpack's runtime
25524
26467
  * may be emitted — the one question every caller asks, in the form it is asking for:
@@ -25542,6 +26485,30 @@ declare abstract class RuntimeTemplate {
25542
26485
  runtime?: RuntimeSpec
25543
26486
  ): boolean;
25544
26487
 
26488
+ /**
26489
+ * Names the module whose code generation starts, so the reasons its references
26490
+ * record are handed back by `finishAnalyzableBailouts` and attributed to it.
26491
+ */
26492
+ beginAnalyzableBailouts(module: Module): void;
26493
+
26494
+ /**
26495
+ * Ends the collection `beginAnalyzableBailouts` started, so the reasons can be
26496
+ * stored beside the result and reapplied when the cache restores it.
26497
+ */
26498
+ finishAnalyzableBailouts(): undefined | string[];
26499
+
26500
+ /**
26501
+ * Reapplies the bailouts a cached code generation result was stored with, so a
26502
+ * restored module reports the same reasons a generated one does.
26503
+ */
26504
+ restoreAnalyzableBailouts(module: Module, reasons: string[]): void;
26505
+
26506
+ /**
26507
+ * The reasons a module's references keep the runtime form, as recorded while its
26508
+ * code was generated.
26509
+ */
26510
+ analyzableBailoutsOf(module: Module): string[];
26511
+
25545
26512
  /**
25546
26513
  * Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
25547
26514
  * wasm/asset loader backends use to reference an emitted binary relative to the
@@ -26104,30 +27071,16 @@ declare abstract class RuntimeTemplate {
26104
27071
  */
26105
27072
  runtimeRequirements: Set<string>;
26106
27073
  /**
26107
- * the module the `import()` is emitted into
27074
+ * the module the `import()` is emitted into, to report against
26108
27075
  */
26109
27076
  originModule?: Module;
26110
27077
  }): string;
26111
27078
 
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
27079
  /**
26127
27080
  * The `../` path from a chunk's own asset back to the output root. Hashes are
26128
27081
  * neutralized first: a runtime module is generated once to be hashed, before any
26129
27082
  * hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
26130
- * swallows that, pinning the module's hash to the message.
27083
+ * lets that throw fail the build rather than hashing it.
26131
27084
  */
26132
27085
  chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
26133
27086
 
@@ -26141,32 +27094,30 @@ declare abstract class RuntimeTemplate {
26141
27094
  overridePublicPath: undefined | string,
26142
27095
  chunk: Chunk,
26143
27096
  module: Module,
26144
- chunkGraph: ChunkGraph,
26145
- runtimeRequirements: Set<string>
27097
+ chunkGraph: ChunkGraph
26146
27098
  ): null | string;
26147
27099
 
26148
27100
  /**
26149
27101
  * 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
27102
+ * keyed by chunk id, or `null` when they have to keep the runtime
27103
+ * `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
26152
27104
  * and the plugin declaring what it needs ask this, so the two always agree. The
26153
27105
  * runtime hands an absolute url string to `link.href`, and so does this — the browser
26154
27106
  * 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.
27107
+ * the loader reads the url as text either way.
26157
27108
  */
26158
27109
  analyzableCssChunkUrls(
26159
27110
  runtimeChunk: Chunk,
26160
27111
  chunkGraph: ChunkGraph,
26161
27112
  runtimeRequirements: ReadonlySet<string>,
26162
27113
  consumingModule?: Module
26163
- ): null | AnalyzableChunkUrls;
27114
+ ): null | Map<ChunkId, string>;
26164
27115
 
26165
27116
  /**
26166
27117
  * Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
26167
27118
  * 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
27119
+ * id, or `null` when they have to keep the runtime
27120
+ * `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
26170
27121
  * them and the plugin declaring what it needs ask this, so the two always agree.
26171
27122
  */
26172
27123
  analyzableChunkScriptUrls(
@@ -26174,7 +27125,37 @@ declare abstract class RuntimeTemplate {
26174
27125
  chunkGraph: ChunkGraph,
26175
27126
  runtimeRequirements: ReadonlySet<string>,
26176
27127
  consumingModule?: Module
26177
- ): null | AnalyzableChunkUrls;
27128
+ ): null | Map<ChunkId, string>;
27129
+
27130
+ /**
27131
+ * Records that this runtime reads its chunks some way other than a native
27132
+ * `import()`, so no literal can name what it loads. Recorded on the entries that
27133
+ * chose it, which is where the setting behind it lives.
27134
+ */
27135
+ reportChunkImportBailout(chunk: Chunk, chunkGraph: ChunkGraph): void;
27136
+
27137
+ /**
27138
+ * Whether the loader still needs to build a url from a chunk id, which is the case
27139
+ * for a chunk it can be asked for that `analyzableChunkImports` leaves unnamed: one
27140
+ * carrying a runtime of its own, or one a second entrypoint has at startup.
27141
+ */
27142
+ chunkImportsNeedRuntimeUrl(
27143
+ runtimeChunk: Chunk,
27144
+ chunkGraph: ChunkGraph
27145
+ ): boolean;
27146
+
27147
+ /**
27148
+ * A literal `import()` specifier for every javascript chunk a runtime loads on
27149
+ * demand, keyed by chunk id, or `null` when one of them cannot be named here. The
27150
+ * map is written into the runtime chunk rather than at each import site, so a
27151
+ * hashed chunk name reaches no module that imports it.
27152
+ */
27153
+ analyzableChunkImports(
27154
+ runtimeChunk: Chunk,
27155
+ chunkGraph: ChunkGraph,
27156
+ runtimeRequirements: ReadonlySet<string>,
27157
+ consumingModule?: Module
27158
+ ): null | Map<ChunkId, string>;
26178
27159
 
26179
27160
  /**
26180
27161
  * Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
@@ -26276,17 +27257,45 @@ declare interface RuntimeValueOptions {
26276
27257
  version?: string | (() => string);
26277
27258
  }
26278
27259
 
27260
+ /**
27261
+ * Helper function for joining two ranges into a single range. This is useful
27262
+ * when working with AST nodes, as it allows you to combine the ranges of child nodes
27263
+ * to create the range of the _parent node_.
27264
+ */
27265
+ declare interface ScopeInfo {
27266
+ definitions: StackedMap<string, VariableInfo | ScopeInfo>;
27267
+ topLevelScope: boolean | "arrow";
27268
+ inShorthand: string | boolean;
27269
+ inTaggedTemplateTag: boolean;
27270
+ inTry: boolean;
27271
+ isStrict: boolean;
27272
+ isAsmJs: boolean;
27273
+ terminated?: 1 | 2;
27274
+ }
27275
+
27276
+ /**
27277
+ * One lexical scope, holding the names declared directly in it. Each set is
27278
+ * built only once a name goes into it, which most scopes never do.
27279
+ */
27280
+ declare abstract class ScopeParser {
27281
+ flags: number;
27282
+ var?: Set<string>;
27283
+ lexical?: Set<string>;
27284
+ functions?: Set<string>;
27285
+ firstLexical?: string;
27286
+ }
27287
+
26279
27288
  /**
26280
27289
  * A lexical scope. One shape for every kind, so the property loads in the
26281
27290
  * resolution loop stay monomorphic.
26282
27291
  */
26283
- declare abstract class Scope {
27292
+ declare abstract class ScopeScopeAnalyzer {
26284
27293
  type: ScopeType;
26285
27294
  block: NodeEstreeIndex;
26286
- upper: null | Scope;
26287
- childScopes: Scope[];
27295
+ upper: null | ScopeScopeAnalyzer;
27296
+ childScopes: ScopeScopeAnalyzer[];
26288
27297
  variables: Variable[];
26289
- variableScope: Scope;
27298
+ variableScope: ScopeScopeAnalyzer;
26290
27299
 
26291
27300
  /**
26292
27301
  * For a function scope with parameters, the offset where its body
@@ -26298,22 +27307,6 @@ declare abstract class Scope {
26298
27307
  paramBoundary: number;
26299
27308
  getBinding(name: string): undefined | Variable;
26300
27309
  }
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
27310
  type ScopeType =
26318
27311
  | "function"
26319
27312
  | "module"
@@ -26905,6 +27898,15 @@ declare interface SourceLike {
26905
27898
  */
26906
27899
  clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
26907
27900
  }
27901
+
27902
+ /**
27903
+ * The `loc` a node carries when `options.locations` is on.
27904
+ */
27905
+ declare abstract class SourceLocationParser {
27906
+ start?: null | PositionLike;
27907
+ end?: null | PositionLike;
27908
+ source: any;
27909
+ }
26908
27910
  declare interface SourceMap {
26909
27911
  version: 3;
26910
27912
  file: string;
@@ -27515,7 +28517,7 @@ declare abstract class StackedMap<K, V> {
27515
28517
  }
27516
28518
 
27517
28519
  /**
27518
- * Updates set size using the provided set.
28520
+ * Updates map size using the provided map.
27519
28521
  */
27520
28522
  declare interface StarListDeserializerContext {
27521
28523
  read: () => HarmonyExportImportedSpecifierDependency[];
@@ -27524,7 +28526,7 @@ declare interface StarListDeserializerContext {
27524
28526
  }
27525
28527
 
27526
28528
  /**
27527
- * Updates set size using the provided set.
28529
+ * Updates map size using the provided map.
27528
28530
  */
27529
28531
  declare interface StarListSerializerContext {
27530
28532
  write: (
@@ -28644,16 +29646,25 @@ declare interface TimestampAndHash {
28644
29646
  timestamp?: number;
28645
29647
  hash: string;
28646
29648
  }
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
- };
29649
+ declare interface TokContextLike {
29650
+ token: string;
29651
+ isExpr: boolean;
29652
+ preserveSpace?: boolean;
29653
+ override?: any;
29654
+ generator?: boolean;
29655
+ }
29656
+
29657
+ /**
29658
+ * A token as `options.onToken` receives one.
29659
+ */
29660
+ declare abstract class TokenParser {
29661
+ type: any;
29662
+ value: any;
29663
+ start: any;
29664
+ end: any;
29665
+ loc?: SourceLocationParser;
29666
+ range?: any[];
29667
+ }
28657
29668
 
28658
29669
  /**
28659
29670
  * Position-based view over the lexer — webpack's stand-in for the spec's
@@ -28716,6 +29727,12 @@ declare class TokenStream {
28716
29727
  */
28717
29728
  advance(): void;
28718
29729
 
29730
+ /**
29731
+ * Step over the whitespace the next token would be, without tokenizing it —
29732
+ * for the sites that discard whitespace tokens. No-op while a token is cached.
29733
+ */
29734
+ skipWhitespace(): void;
29735
+
28719
29736
  /**
28720
29737
  * Mark (CSS Syntax §3 "mark") — push the current cursor position.
28721
29738
  */
@@ -28733,6 +29750,34 @@ declare class TokenStream {
28733
29750
  */
28734
29751
  discardMark(): void;
28735
29752
  }
29753
+ type TokenSyntax = NodeSyntax & {
29754
+ value: string;
29755
+ unescaped: string;
29756
+ numericValue: number;
29757
+ typeFlag: "number" | "id" | "integer" | "unrestricted";
29758
+ sign: "" | "+" | "-";
29759
+ unit: string;
29760
+ contentStart: number;
29761
+ contentEnd: number;
29762
+ };
29763
+
29764
+ /**
29765
+ * A token's kind, carrying what the parser needs to know about it without
29766
+ * re-inspecting the source: whether an expression may follow, its binary
29767
+ * precedence, and how it updates the tokenizer's context.
29768
+ */
29769
+ declare abstract class TokenType {
29770
+ label: string;
29771
+ keyword?: string;
29772
+ beforeExpr: boolean;
29773
+ startsExpr: boolean;
29774
+ isLoop: boolean;
29775
+ isAssign: boolean;
29776
+ prefix: boolean;
29777
+ postfix: boolean;
29778
+ binop: null | number;
29779
+ updateContext: null | ((prevType: TokenType) => void);
29780
+ }
28736
29781
  declare class TopLevelSymbol {
28737
29782
  /**
28738
29783
  * Creates an instance of TopLevelSymbol.
@@ -28926,17 +29971,17 @@ declare interface UserAliasOptions {
28926
29971
  }
28927
29972
  declare interface UserTsconfigOptions {
28928
29973
  /**
28929
- * A path, or `file:` `URL` instance, pointing at the tsconfig file
29974
+ * A path, or `file:` URL, pointing at the tsconfig file
28930
29975
  */
28931
29976
  configFile?: string | URL_url;
28932
29977
 
28933
29978
  /**
28934
- * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` `URL` instances
29979
+ * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` URLs
28935
29980
  */
28936
29981
  references?: "auto" | (string | URL_url)[];
28937
29982
 
28938
29983
  /**
28939
- * Override baseUrl from tsconfig.json with a path or `file:` `URL` instance
29984
+ * Override baseUrl from tsconfig.json with a path or `file:` URL
28940
29985
  */
28941
29986
  baseUrl?: string | URL_url;
28942
29987
  }
@@ -28953,7 +29998,7 @@ declare abstract class Variable {
28953
29998
  name: string;
28954
29999
  identifiers: Identifier[];
28955
30000
  references: Reference[];
28956
- scope: Scope;
30001
+ scope: ScopeScopeAnalyzer;
28957
30002
  }
28958
30003
  declare class VariableInfo {
28959
30004
  /**
@@ -29981,34 +31026,6 @@ declare interface chunkModuleHashMap {
29981
31026
  [index: number]: string;
29982
31027
  [index: string]: string;
29983
31028
  }
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
31029
  declare function exports(
30013
31030
  options: Configuration,
30014
31031
  callback: CallbackWebpackFunction_2<Stats, void>
@@ -30134,7 +31151,6 @@ declare namespace exports {
30134
31151
  export namespace RuntimeGlobals {
30135
31152
  export let amdDefine: "__webpack_require__.amdD";
30136
31153
  export let amdOptions: "__webpack_require__.amdO";
30137
- export let analyzableChunkImport: "__webpack_require__.ei";
30138
31154
  export let asyncModule: "__webpack_require__.a";
30139
31155
  export let asyncModuleDoneSymbol: "__webpack_require__.aD";
30140
31156
  export let asyncModuleExportSymbol: "__webpack_require__.aE";
@@ -30177,7 +31193,10 @@ declare namespace exports {
30177
31193
  export let harmonyModuleDecorator: "__webpack_require__.hmd";
30178
31194
  export let hasCssModules: "has css modules";
30179
31195
  export let hasFetchPriority: "has fetch priority";
31196
+ export let hasChunkPriority: "has chunk priority";
30180
31197
  export let hasOwnProperty: "__webpack_require__.o";
31198
+ export let hasSealedDeferredNamespace: "has sealed deferred namespace";
31199
+ export let hasSynthesizedDeferredNamespace: "has synthesized deferred namespace";
30181
31200
  export let hmrDownloadManifest: "__webpack_require__.hmrM";
30182
31201
  export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
30183
31202
  export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
@@ -30213,6 +31232,7 @@ declare namespace exports {
30213
31232
  export let scriptNonce: "__webpack_require__.nc";
30214
31233
  export let setAnonymousDefaultName: "__webpack_require__.dn";
30215
31234
  export let shareScopeMap: "__webpack_require__.S";
31235
+ export let specNamespaceObject: "__webpack_require__.ns";
30216
31236
  export let startup: "__webpack_require__.x";
30217
31237
  export let startupAssetHints: "__webpack_require__.SAH";
30218
31238
  export let startupEntrypoint: "__webpack_require__.X";
@@ -30244,7 +31264,7 @@ declare namespace exports {
30244
31264
  export const applyWebpackOptionsDefaults: (
30245
31265
  options: WebpackOptionsNormalized,
30246
31266
  compilerIndex?: number
30247
- ) => ResolvedOptions;
31267
+ ) => ResolvedOptionsDefaults;
30248
31268
  }
30249
31269
  export namespace dependencies {
30250
31270
  export {
@@ -30468,6 +31488,38 @@ declare namespace exports {
30468
31488
  errors?: (string | Error)[];
30469
31489
  }[]
30470
31490
  ) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
31491
+ export function cssMinify(
31492
+ input: { [index: string]: string | Buffer },
31493
+ sourceMap?: object,
31494
+ minimizerOptions?: {
31495
+ as?: "stylesheet" | "block-contents";
31496
+ environment?: CssEnvironment;
31497
+ convertLengthUnits?: boolean;
31498
+ mergeDistantRules?: boolean;
31499
+ rewriteCustomProperties?: boolean;
31500
+ unusedSymbols?: string[];
31501
+ pseudoClasses?: { [index: string]: string };
31502
+ renderEmbeddedSource?: (
31503
+ source: string,
31504
+ info: { type: string; hostType: string }
31505
+ ) =>
31506
+ | undefined
31507
+ | string
31508
+ | EmbeddedSourceResult
31509
+ | Promise<undefined | string | EmbeddedSourceResult>;
31510
+ } & CssTransformOptions
31511
+ ): Promise<{
31512
+ code: string;
31513
+ map?: SourceMap;
31514
+ warnings?: (string | Error)[];
31515
+ errors?: (string | Error)[];
31516
+ }>;
31517
+ export namespace cssMinify {
31518
+ export let supportsWorkerThreads: () => boolean;
31519
+ export let getTypes: () => string[];
31520
+ export let getEmbeddedTypes: () => string[];
31521
+ export let filter: (name: string) => boolean;
31522
+ }
30471
31523
  export let embeddedText: (
30472
31524
  answer?: string | { code?: string }
30473
31525
  ) => undefined | string;
@@ -30492,7 +31544,7 @@ declare namespace exports {
30492
31544
  input: string | TokenStream,
30493
31545
  pos?: number,
30494
31546
  options?: ParseOptionsSyntax
30495
- ) => undefined | Token | FunctionNode | SimpleBlock;
31547
+ ) => undefined | TokenSyntax | FunctionNode | SimpleBlock;
30496
31548
  export let parseADeclaration: (
30497
31549
  input: string | TokenStream,
30498
31550
  pos?: number,
@@ -30720,7 +31772,12 @@ declare namespace exports {
30720
31772
  parentOf(n?: number): number;
30721
31773
  children(n?: number): number[];
30722
31774
  };
31775
+ export let BLOCK_CONTENTS: "block-contents";
31776
+ export let CLASSIC_SCRIPT: "script";
30723
31777
  export let EMBEDDED_LANGUAGES: string[];
31778
+ export let EVENT_HANDLER: "event-handler";
31779
+ export let JSON_TYPE: "json";
31780
+ export let MODULE_SCRIPT: "module";
30724
31781
  export let NS_HTML: 0;
30725
31782
  export let NS_MATHML: 1;
30726
31783
  export let NS_SVG: 2;
@@ -30764,6 +31821,12 @@ declare namespace exports {
30764
31821
  }
30765
31822
  ) => string;
30766
31823
  export let buildHeadTags: (opts: OutputHtmlOptions) => string;
31824
+ export let builtinEmbeddedRenderer: (
31825
+ options?: BuiltinEmbeddedRendererOptions
31826
+ ) => (
31827
+ source: string,
31828
+ info: { type: string; hostType: string; as?: string }
31829
+ ) => undefined | string;
30767
31830
  export let collectEmbeddedDiagnostics: (
30768
31831
  reported: {
30769
31832
  warnings?: (string | Error)[];
@@ -30780,6 +31843,41 @@ declare namespace exports {
30780
31843
  minimal?: boolean
30781
31844
  ) => string;
30782
31845
  export let escapeText: (s: string) => string;
31846
+ export function htmlMinify(
31847
+ input: { [index: string]: string | Buffer },
31848
+ sourceMap?: RawSourceMap,
31849
+ minimizerOptions?: Omit<
31850
+ HtmlPrintOptions,
31851
+ "renderEmbeddedSource" | "deferEmbeddedSource"
31852
+ > & {
31853
+ environment?: CssEnvironment;
31854
+ css?: {
31855
+ convertLengthUnits?: boolean;
31856
+ rewriteCustomProperties?: boolean;
31857
+ unusedSymbols?: string[];
31858
+ pseudoClasses?: { [index: string]: string };
31859
+ };
31860
+ minifyConditionalComments?: boolean;
31861
+ renderEmbeddedSource?: (
31862
+ source: string,
31863
+ info: { type: string; hostType: string; as?: string }
31864
+ ) =>
31865
+ | undefined
31866
+ | string
31867
+ | EmbeddedSourceResult
31868
+ | Promise<undefined | string | EmbeddedSourceResult>;
31869
+ }
31870
+ ): Promise<{
31871
+ code: string;
31872
+ warnings?: (string | Error)[];
31873
+ errors?: (string | Error)[];
31874
+ }>;
31875
+ export namespace htmlMinify {
31876
+ export let supportsWorkerThreads: () => boolean;
31877
+ export let getTypes: () => string[];
31878
+ export let getEmbeddedTypes: () => string[];
31879
+ export let filter: (name: string) => boolean;
31880
+ }
30783
31881
  export let isAsciiWhitespace: (cc: number) => boolean;
30784
31882
  export let metaTag: (name: string, content: string) => string;
30785
31883
  export let parseCssUrls: (input: string) => [string, number, number][];
@@ -30936,6 +32034,7 @@ declare namespace exports {
30936
32034
  HtmlPrintOptions
30937
32035
  >
30938
32036
  ) => string;
32037
+ export let stripJsonWhitespace: (json: string) => string;
30939
32038
  export let tokenize: (
30940
32039
  input: string,
30941
32040
  pos?: number,
@@ -31260,6 +32359,7 @@ declare namespace exports {
31260
32359
  ConcatenationScope,
31261
32360
  ContextExclusionPlugin,
31262
32361
  ContextReplacementPlugin,
32362
+ CopyPlugin,
31263
32363
  DefinePlugin,
31264
32364
  Dependency,
31265
32365
  DynamicEntryPlugin,