webpack 5.106.2 → 5.107.1

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 (235) hide show
  1. package/README.md +2 -2
  2. package/lib/APIPlugin.js +1 -1
  3. package/lib/BannerPlugin.js +3 -4
  4. package/lib/Cache.js +3 -6
  5. package/lib/Chunk.js +21 -25
  6. package/lib/ChunkGroup.js +57 -15
  7. package/lib/CompatibilityPlugin.js +8 -7
  8. package/lib/Compilation.js +67 -37
  9. package/lib/Compiler.js +4 -13
  10. package/lib/ContextModule.js +2 -2
  11. package/lib/DefinePlugin.js +2 -2
  12. package/lib/Dependency.js +22 -1
  13. package/lib/DependencyTemplate.js +2 -1
  14. package/lib/EnvironmentPlugin.js +1 -1
  15. package/lib/EvalSourceMapDevToolPlugin.js +8 -10
  16. package/lib/ExportsInfo.js +30 -34
  17. package/lib/ExternalModule.js +91 -26
  18. package/lib/ExternalModuleFactoryPlugin.js +7 -1
  19. package/lib/FileSystemInfo.js +187 -72
  20. package/lib/Generator.js +3 -3
  21. package/lib/HotModuleReplacementPlugin.js +26 -8
  22. package/lib/IgnorePlugin.js +2 -1
  23. package/lib/Module.js +20 -19
  24. package/lib/ModuleFactory.js +1 -1
  25. package/lib/ModuleNotFoundError.js +3 -84
  26. package/lib/ModuleSourceTypeConstants.js +51 -19
  27. package/lib/ModuleTypeConstants.js +12 -3
  28. package/lib/MultiCompiler.js +2 -2
  29. package/lib/NodeStuffPlugin.js +1 -1
  30. package/lib/NormalModule.js +119 -77
  31. package/lib/NormalModuleFactory.js +47 -27
  32. package/lib/Parser.js +1 -1
  33. package/lib/ProgressPlugin.js +129 -56
  34. package/lib/RuntimeGlobals.js +5 -5
  35. package/lib/RuntimeModule.js +9 -7
  36. package/lib/RuntimePlugin.js +12 -1
  37. package/lib/SourceMapDevToolPlugin.js +250 -49
  38. package/lib/Template.js +1 -1
  39. package/lib/TemplatedPathPlugin.js +22 -4
  40. package/lib/WarnCaseSensitiveModulesPlugin.js +70 -2
  41. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  42. package/lib/WarnNoModeSetPlugin.js +16 -1
  43. package/lib/Watching.js +2 -3
  44. package/lib/WebpackError.js +3 -77
  45. package/lib/WebpackIsIncludedPlugin.js +1 -1
  46. package/lib/WebpackOptionsApply.js +13 -1
  47. package/lib/asset/AssetBytesGenerator.js +12 -8
  48. package/lib/asset/AssetGenerator.js +36 -22
  49. package/lib/asset/AssetModulesPlugin.js +6 -8
  50. package/lib/asset/AssetSourceGenerator.js +12 -8
  51. package/lib/buildChunkGraph.js +4 -6
  52. package/lib/cache/PackFileCacheStrategy.js +4 -4
  53. package/lib/cli.js +3 -1
  54. package/lib/config/defaults.js +197 -10
  55. package/lib/config/normalization.js +3 -1
  56. package/lib/css/CssGenerator.js +320 -105
  57. package/lib/css/CssInjectStyleRuntimeModule.js +44 -42
  58. package/lib/css/CssLoadingRuntimeModule.js +22 -4
  59. package/lib/{CssModule.js → css/CssModule.js} +15 -15
  60. package/lib/css/CssModulesPlugin.js +168 -88
  61. package/lib/css/CssParser.js +566 -269
  62. package/lib/css/walkCssTokens.js +148 -2
  63. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +1 -1
  64. package/lib/dependencies/CommonJsDependencyHelpers.js +63 -0
  65. package/lib/dependencies/CommonJsExportRequireDependency.js +54 -10
  66. package/lib/dependencies/CommonJsExportsParserPlugin.js +1 -1
  67. package/lib/dependencies/CommonJsFullRequireDependency.js +32 -9
  68. package/lib/dependencies/CommonJsImportsParserPlugin.js +112 -4
  69. package/lib/dependencies/CommonJsRequireDependency.js +67 -4
  70. package/lib/dependencies/ContextDependency.js +1 -1
  71. package/lib/dependencies/ContextDependencyHelpers.js +1 -1
  72. package/lib/dependencies/CreateRequireParserPlugin.js +1 -1
  73. package/lib/dependencies/CriticalDependencyWarning.js +1 -1
  74. package/lib/dependencies/CssIcssExportDependency.js +332 -67
  75. package/lib/dependencies/CssIcssImportDependency.js +49 -7
  76. package/lib/dependencies/CssIcssSymbolDependency.js +11 -3
  77. package/lib/dependencies/CssImportDependency.js +8 -0
  78. package/lib/dependencies/CssUrlDependency.js +28 -2
  79. package/lib/dependencies/HarmonyDetectionParserPlugin.js +22 -2
  80. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +8 -7
  81. package/lib/dependencies/HarmonyExportExpressionDependency.js +22 -14
  82. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +110 -3
  83. package/lib/dependencies/HarmonyImportDependency.js +10 -2
  84. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +22 -1
  85. package/lib/dependencies/HarmonyImportSpecifierDependency.js +1 -1
  86. package/lib/{HarmonyLinkingError.js → dependencies/HarmonyLinkingError.js} +5 -3
  87. package/lib/dependencies/HtmlInlineScriptDependency.js +133 -0
  88. package/lib/dependencies/HtmlInlineStyleDependency.js +101 -0
  89. package/lib/dependencies/HtmlScriptSrcDependency.js +557 -0
  90. package/lib/dependencies/HtmlSourceDependency.js +128 -0
  91. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
  92. package/lib/dependencies/ImportParserPlugin.js +2 -2
  93. package/lib/dependencies/ImportPhase.js +1 -1
  94. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +1 -1
  95. package/lib/{RequireJsStuffPlugin.js → dependencies/RequireJsStuffPlugin.js} +7 -7
  96. package/lib/dependencies/SystemPlugin.js +1 -1
  97. package/lib/dependencies/WebAssemblyImportDependency.js +1 -1
  98. package/lib/dependencies/WorkerPlugin.js +2 -2
  99. package/lib/{DelegatedModule.js → dll/DelegatedModule.js} +31 -31
  100. package/lib/{DelegatedModuleFactoryPlugin.js → dll/DelegatedModuleFactoryPlugin.js} +4 -4
  101. package/lib/{DelegatedPlugin.js → dll/DelegatedPlugin.js} +2 -2
  102. package/lib/{DllEntryPlugin.js → dll/DllEntryPlugin.js} +4 -4
  103. package/lib/{DllModule.js → dll/DllModule.js} +24 -24
  104. package/lib/{DllModuleFactory.js → dll/DllModuleFactory.js} +4 -4
  105. package/lib/{DllPlugin.js → dll/DllPlugin.js} +6 -5
  106. package/lib/{DllReferencePlugin.js → dll/DllReferencePlugin.js} +14 -14
  107. package/lib/{LibManifestPlugin.js → dll/LibManifestPlugin.js} +9 -9
  108. package/lib/{AsyncDependencyToInitialChunkError.js → errors/AsyncDependencyToInitialChunkError.js} +2 -2
  109. package/lib/errors/BuildCycleError.js +1 -1
  110. package/lib/{ChunkRenderError.js → errors/ChunkRenderError.js} +1 -1
  111. package/lib/{CodeGenerationError.js → errors/CodeGenerationError.js} +1 -1
  112. package/lib/{CommentCompilationWarning.js → errors/CommentCompilationWarning.js} +3 -3
  113. package/lib/{ConcurrentCompilationError.js → errors/ConcurrentCompilationError.js} +4 -2
  114. package/lib/{EnvironmentNotSupportAsyncWarning.js → errors/EnvironmentNotSupportAsyncWarning.js} +4 -4
  115. package/lib/{HookWebpackError.js → errors/HookWebpackError.js} +5 -5
  116. package/lib/{IgnoreErrorModuleFactory.js → errors/IgnoreErrorModuleFactory.js} +4 -4
  117. package/lib/{InvalidDependenciesModuleWarning.js → errors/InvalidDependenciesModuleWarning.js} +3 -3
  118. package/lib/errors/JSONParseError.js +114 -0
  119. package/lib/{ModuleBuildError.js → errors/ModuleBuildError.js} +5 -5
  120. package/lib/{ModuleDependencyError.js → errors/ModuleDependencyError.js} +2 -2
  121. package/lib/{ModuleDependencyWarning.js → errors/ModuleDependencyWarning.js} +4 -4
  122. package/lib/{ModuleError.js → errors/ModuleError.js} +5 -5
  123. package/lib/{ModuleHashingError.js → errors/ModuleHashingError.js} +1 -1
  124. package/lib/errors/ModuleNotFoundError.js +91 -0
  125. package/lib/{ModuleParseError.js → errors/ModuleParseError.js} +8 -6
  126. package/lib/{ModuleRestoreError.js → errors/ModuleRestoreError.js} +1 -1
  127. package/lib/{ModuleStoreError.js → errors/ModuleStoreError.js} +1 -1
  128. package/lib/{ModuleWarning.js → errors/ModuleWarning.js} +5 -5
  129. package/lib/{NodeStuffInWebError.js → errors/NodeStuffInWebError.js} +4 -4
  130. package/lib/errors/NonErrorEmittedError.js +28 -0
  131. package/lib/{UnhandledSchemeError.js → errors/UnhandledSchemeError.js} +2 -2
  132. package/lib/{UnsupportedFeatureWarning.js → errors/UnsupportedFeatureWarning.js} +3 -3
  133. package/lib/errors/WebpackError.js +84 -0
  134. package/lib/html/HtmlGenerator.js +379 -0
  135. package/lib/html/HtmlModulesPlugin.js +429 -0
  136. package/lib/html/HtmlParser.js +1489 -0
  137. package/lib/html/walkHtmlTokens.js +3249 -0
  138. package/lib/ids/IdHelpers.js +2 -1
  139. package/lib/index.js +36 -15
  140. package/lib/javascript/JavascriptModulesPlugin.js +91 -10
  141. package/lib/javascript/JavascriptParser.js +197 -16
  142. package/lib/javascript/JavascriptParserHelpers.js +1 -1
  143. package/lib/json/JsonParser.js +7 -16
  144. package/lib/library/AbstractLibraryPlugin.js +1 -1
  145. package/lib/library/EnableLibraryPlugin.js +1 -1
  146. package/lib/{FalseIIFEUmdWarning.js → library/FalseIIFEUmdWarning.js} +1 -1
  147. package/lib/library/ModuleLibraryPlugin.js +74 -0
  148. package/lib/node/NodeEnvironmentPlugin.js +4 -2
  149. package/lib/node/nodeConsole.js +113 -64
  150. package/lib/optimize/ConcatenatedModule.js +51 -6
  151. package/lib/optimize/InnerGraph.js +1 -1
  152. package/lib/optimize/InnerGraphPlugin.js +11 -1
  153. package/lib/optimize/MinMaxSizeWarning.js +4 -4
  154. package/lib/optimize/ModuleConcatenationPlugin.js +15 -7
  155. package/lib/optimize/RealContentHashPlugin.js +89 -26
  156. package/lib/optimize/SideEffectsFlagPlugin.js +112 -5
  157. package/lib/optimize/SplitChunksPlugin.js +5 -5
  158. package/lib/performance/AssetsOverSizeLimitWarning.js +2 -2
  159. package/lib/performance/EntrypointsOverSizeLimitWarning.js +2 -2
  160. package/lib/performance/NoAsyncChunksWarning.js +5 -3
  161. package/lib/performance/SizeLimitsPlugin.js +1 -1
  162. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +4 -1
  163. package/lib/rules/UseEffectRulePlugin.js +4 -3
  164. package/lib/runtime/AutoPublicPathRuntimeModule.js +3 -3
  165. package/lib/runtime/GetChunkFilenameRuntimeModule.js +5 -5
  166. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +119 -13
  167. package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +35 -0
  168. package/lib/schemes/DataUriPlugin.js +13 -1
  169. package/lib/schemes/VirtualUrlPlugin.js +1 -1
  170. package/lib/serialization/SerializerMiddleware.js +2 -2
  171. package/lib/sharing/ConsumeSharedPlugin.js +4 -10
  172. package/lib/sharing/ConsumeSharedRuntimeModule.js +8 -4
  173. package/lib/sharing/ProvideSharedModule.js +1 -1
  174. package/lib/sharing/ProvideSharedPlugin.js +5 -5
  175. package/lib/sharing/resolveMatchedConfigs.js +1 -1
  176. package/lib/stats/DefaultStatsFactoryPlugin.js +2 -2
  177. package/lib/stats/DefaultStatsPresetPlugin.js +1 -1
  178. package/lib/stats/DefaultStatsPrinterPlugin.js +1 -1
  179. package/lib/stats/StatsFactory.js +1 -1
  180. package/lib/typescript/TypeScriptPlugin.js +210 -0
  181. package/lib/url/URLParserPlugin.js +2 -2
  182. package/lib/util/AsyncQueue.js +2 -2
  183. package/lib/util/Hash.js +2 -2
  184. package/lib/util/LocConverter.js +53 -0
  185. package/lib/util/SortableSet.js +1 -1
  186. package/lib/util/cleverMerge.js +2 -2
  187. package/lib/util/comparators.js +3 -3
  188. package/lib/util/concatenate.js +3 -3
  189. package/lib/util/conventions.js +42 -1
  190. package/lib/util/createMappings.js +118 -0
  191. package/lib/{formatLocation.js → util/formatLocation.js} +2 -2
  192. package/lib/{SizeFormatHelpers.js → util/formatSize.js} +3 -1
  193. package/lib/util/fs.js +8 -8
  194. package/lib/util/hash/md4.js +1 -1
  195. package/lib/util/hash/xxhash64.js +1 -1
  196. package/lib/util/identifier.js +48 -0
  197. package/lib/util/internalSerializables.js +35 -19
  198. package/lib/util/magicComment.js +10 -7
  199. package/lib/util/parseJson.js +2 -73
  200. package/lib/util/source.js +21 -0
  201. package/lib/util/topologicalSort.js +69 -0
  202. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -4
  203. package/lib/wasm-async/AsyncWebAssemblyParser.js +1 -1
  204. package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +5 -3
  205. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +1 -1
  206. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +5 -3
  207. package/lib/webpack.js +3 -1
  208. package/package.json +24 -22
  209. package/schemas/WebpackOptions.check.js +1 -1
  210. package/schemas/WebpackOptions.json +129 -12
  211. package/schemas/plugins/{DllPlugin.check.d.ts → HtmlGeneratorOptions.check.d.ts} +1 -1
  212. package/schemas/plugins/HtmlGeneratorOptions.check.js +6 -0
  213. package/schemas/plugins/HtmlGeneratorOptions.json +3 -0
  214. package/schemas/plugins/ProgressPlugin.check.js +1 -1
  215. package/schemas/plugins/ProgressPlugin.json +22 -0
  216. package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
  217. package/schemas/plugins/container/ContainerReferencePlugin.json +1 -0
  218. package/schemas/plugins/container/ExternalsType.check.js +1 -1
  219. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  220. package/schemas/plugins/container/ModuleFederationPlugin.json +1 -0
  221. package/schemas/plugins/{DllReferencePlugin.check.d.ts → css/CssAutoOrModuleParserOptions.check.d.ts} +1 -1
  222. package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +6 -0
  223. package/schemas/plugins/css/CssAutoOrModuleParserOptions.json +3 -0
  224. package/schemas/plugins/dll/DllPlugin.check.d.ts +7 -0
  225. package/schemas/plugins/dll/DllReferencePlugin.check.d.ts +7 -0
  226. package/types.d.ts +1153 -233
  227. package/lib/CaseSensitiveModulesWarning.js +0 -80
  228. package/lib/GraphHelpers.js +0 -49
  229. package/lib/NoModeWarning.js +0 -23
  230. package/lib/css/CssMergeStyleSheetsRuntimeModule.js +0 -57
  231. /package/lib/{AbstractMethodError.js → errors/AbstractMethodError.js} +0 -0
  232. /package/schemas/plugins/{DllPlugin.check.js → dll/DllPlugin.check.js} +0 -0
  233. /package/schemas/plugins/{DllPlugin.json → dll/DllPlugin.json} +0 -0
  234. /package/schemas/plugins/{DllReferencePlugin.check.js → dll/DllReferencePlugin.check.js} +0 -0
  235. /package/schemas/plugins/{DllReferencePlugin.json → dll/DllReferencePlugin.json} +0 -0
package/types.d.ts CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  import { Parser as ParserImport } from "acorn";
8
8
  import { Buffer } from "buffer";
9
- import { Scope } from "eslint-scope";
10
9
  import {
11
10
  ArrayExpression,
12
11
  ArrayPattern,
@@ -328,9 +327,9 @@ declare interface AllCodeGenerationSchemas {
328
327
  chunkInitFragments: InitFragment<any>[];
329
328
 
330
329
  /**
331
- * url for css and javascript modules
330
+ * url for asset modules
332
331
  */
333
- url: { javascript?: string; "css-url"?: string };
332
+ url: { javascript?: string; "asset-url"?: string };
334
333
 
335
334
  /**
336
335
  * a filename for asset modules
@@ -436,7 +435,7 @@ declare abstract class AssetBytesGenerator extends Generator {
436
435
  }
437
436
  declare abstract class AssetBytesParser extends ParserClass {}
438
437
  declare interface AssetDependencyMeta {
439
- sourceType: "css-url";
438
+ sourceType: "asset-url" | "css-url";
440
439
  }
441
440
 
442
441
  /**
@@ -460,9 +459,9 @@ declare abstract class AssetGenerator extends Generator {
460
459
  source: string | Buffer,
461
460
  context: { filename: string; module: Module }
462
461
  ) => string);
463
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
464
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
465
- outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
462
+ filename?: string | TemplatePathFn<PathDataModule>;
463
+ publicPath?: string | TemplatePathFn<PathData>;
464
+ outputPath?: string | TemplatePathFn<PathDataModule>;
466
465
  emit?: boolean;
467
466
 
468
467
  /**
@@ -572,19 +571,19 @@ declare interface AssetResourceGeneratorOptions {
572
571
  emit?: boolean;
573
572
 
574
573
  /**
575
- * Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
574
+ * The filename of asset modules as relative path inside the 'output.path' directory.
576
575
  */
577
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
576
+ filename?: string | TemplatePathFn<PathDataModule>;
578
577
 
579
578
  /**
580
579
  * Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
581
580
  */
582
- outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
581
+ outputPath?: string | TemplatePathFn<PathDataModule>;
583
582
 
584
583
  /**
585
584
  * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
586
585
  */
587
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
586
+ publicPath?: string | TemplatePathFn<PathData>;
588
587
  }
589
588
  declare abstract class AssetSourceGenerator extends Generator {
590
589
  /**
@@ -849,6 +848,17 @@ declare interface BaseResolveRequest {
849
848
  */
850
849
  __innerRequest_relativePath?: string;
851
850
  }
851
+ declare interface BasenameCacheEntry {
852
+ /**
853
+ * cached dirname function
854
+ */
855
+ fn: (maybePath: string, suffix?: string) => string;
856
+
857
+ /**
858
+ * the underlying cache map
859
+ */
860
+ cache: Map<string, Map<undefined | string, undefined | string>>;
861
+ }
852
862
  declare abstract class BasicEvaluatedExpression {
853
863
  type: number;
854
864
  range?: [number, number];
@@ -935,19 +945,19 @@ declare abstract class BasicEvaluatedExpression {
935
945
  | MethodDefinition
936
946
  | PropertyDefinition
937
947
  | VariableDeclarator
938
- | ObjectPattern
939
- | ArrayPattern
940
- | RestElement
941
- | AssignmentPattern
942
- | SwitchCase
943
- | CatchClause
944
- | Property
945
948
  | AssignmentProperty
949
+ | Property
950
+ | CatchClause
946
951
  | ClassBody
947
952
  | ImportSpecifier
948
953
  | ImportDefaultSpecifier
949
954
  | ImportNamespaceSpecifier
950
955
  | ExportSpecifier
956
+ | ObjectPattern
957
+ | ArrayPattern
958
+ | RestElement
959
+ | AssignmentPattern
960
+ | SwitchCase
951
961
  | TemplateElement;
952
962
  isUnknown(): boolean;
953
963
  isNull(): boolean;
@@ -1170,19 +1180,19 @@ declare abstract class BasicEvaluatedExpression {
1170
1180
  | MethodDefinition
1171
1181
  | PropertyDefinition
1172
1182
  | VariableDeclarator
1173
- | ObjectPattern
1174
- | ArrayPattern
1175
- | RestElement
1176
- | AssignmentPattern
1177
- | SwitchCase
1178
- | CatchClause
1179
- | Property
1180
1183
  | AssignmentProperty
1184
+ | Property
1185
+ | CatchClause
1181
1186
  | ClassBody
1182
1187
  | ImportSpecifier
1183
1188
  | ImportDefaultSpecifier
1184
1189
  | ImportNamespaceSpecifier
1185
1190
  | ExportSpecifier
1191
+ | ObjectPattern
1192
+ | ArrayPattern
1193
+ | RestElement
1194
+ | AssignmentPattern
1195
+ | SwitchCase
1186
1196
  | TemplateElement
1187
1197
  ): BasicEvaluatedExpression;
1188
1198
  }
@@ -1416,7 +1426,9 @@ declare interface CacheGroupSource {
1416
1426
  minChunks?: number;
1417
1427
  maxAsyncRequests?: number;
1418
1428
  maxInitialRequests?: number;
1419
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
1429
+ filename?:
1430
+ | string
1431
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
1420
1432
  idHint?: string;
1421
1433
  automaticNameDelimiter?: string;
1422
1434
  reuseExistingChunk?: boolean;
@@ -1511,7 +1523,7 @@ declare interface CallbackCacheCache<T> {
1511
1523
  * Creates a callback wrapper that waits for a fixed number of completions and
1512
1524
  * forwards the first error immediately.
1513
1525
  */
1514
- (err: null | WebpackError, result?: T): void;
1526
+ (err: null | Error, result?: T): void;
1515
1527
  }
1516
1528
  declare interface CallbackCacheCacheFacade<T> {
1517
1529
  (err?: null | Error, result?: null | T): void;
@@ -1553,10 +1565,10 @@ declare class Chunk {
1553
1565
  preventIntegration: boolean;
1554
1566
  filenameTemplate?:
1555
1567
  | string
1556
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
1568
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
1557
1569
  cssFilenameTemplate?:
1558
1570
  | string
1559
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
1571
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
1560
1572
  runtime: RuntimeSpec;
1561
1573
  files: Set<string>;
1562
1574
  auxiliaryFiles: Set<string>;
@@ -1823,6 +1835,9 @@ declare interface ChunkConditionMap {
1823
1835
  [index: number]: boolean;
1824
1836
  [index: string]: boolean;
1825
1837
  }
1838
+ type ChunkFilenameTemplate =
1839
+ | string
1840
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
1826
1841
  declare class ChunkGraph {
1827
1842
  /**
1828
1843
  * Creates an instance of ChunkGraph.
@@ -2515,6 +2530,18 @@ declare abstract class ChunkGroup {
2515
2530
  */
2516
2531
  compareTo(chunkGraph: ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1;
2517
2532
 
2533
+ /**
2534
+ * Aggregates per-block `*Order` options for the blocks that bridge this
2535
+ * chunk group to the given child chunk group. `*Order` options are tied to
2536
+ * the originating `import()` call and must not be sourced from the child's
2537
+ * shared options, otherwise a webpackPrefetch/Preload directive from one
2538
+ * parent would leak into other parents that share the child by name.
2539
+ */
2540
+ getChildOrderOptions(
2541
+ childGroup: ChunkGroup,
2542
+ chunkGraph: ChunkGraph
2543
+ ): Record<string, number>;
2544
+
2518
2545
  /**
2519
2546
  * Groups child chunk groups by their `*Order` options and sorts each group
2520
2547
  * by descending order and deterministic chunk-group comparison.
@@ -2683,6 +2710,11 @@ declare interface ChunkRenderContextCssModulesPlugin {
2683
2710
  */
2684
2711
  undoPath: string;
2685
2712
 
2713
+ /**
2714
+ * compilation hash
2715
+ */
2716
+ hash?: string;
2717
+
2686
2718
  /**
2687
2719
  * moduleFactoryCache
2688
2720
  */
@@ -3725,27 +3757,33 @@ declare class Compilation {
3725
3757
  /**
3726
3758
  * Returns interpolated path.
3727
3759
  */
3728
- getPath(filename: TemplatePath, data?: PathData): string;
3760
+ getPath<T extends PathData = PathData>(
3761
+ filename: string | TemplatePathFn<T>,
3762
+ data?: T
3763
+ ): string;
3729
3764
 
3730
3765
  /**
3731
3766
  * Gets path with info.
3732
3767
  */
3733
- getPathWithInfo(
3734
- filename: TemplatePath,
3735
- data?: PathData
3768
+ getPathWithInfo<T extends PathData = PathData>(
3769
+ filename: string | TemplatePathFn<T>,
3770
+ data?: T
3736
3771
  ): InterpolatedPathAndAssetInfo;
3737
3772
 
3738
3773
  /**
3739
3774
  * Returns interpolated path.
3740
3775
  */
3741
- getAssetPath(filename: TemplatePath, data: PathData): string;
3776
+ getAssetPath<T extends PathData = PathData>(
3777
+ filename: string | TemplatePathFn<T>,
3778
+ data: T
3779
+ ): string;
3742
3780
 
3743
3781
  /**
3744
3782
  * Gets asset path with info.
3745
3783
  */
3746
- getAssetPathWithInfo(
3747
- filename: TemplatePath,
3748
- data: PathData
3784
+ getAssetPathWithInfo<T extends PathData = PathData>(
3785
+ filename: string | TemplatePathFn<T>,
3786
+ data: T
3749
3787
  ): InterpolatedPathAndAssetInfo;
3750
3788
  getWarnings(): Error[];
3751
3789
  getErrors(): Error[];
@@ -3878,6 +3916,14 @@ declare interface CompilationHooksCssModulesPlugin {
3878
3916
  Source
3879
3917
  >;
3880
3918
  chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
3919
+
3920
+ /**
3921
+ * called for each CSS source type (CSS_IMPORT_TYPE, CSS_TYPE) with the chunk's modules pre-sorted by full module name; return an ordered `Module[]` to override the default import-order topological sort, or return `undefined` to keep the default
3922
+ */
3923
+ orderModules: SyncBailHook<
3924
+ [Chunk, Module[], Compilation],
3925
+ undefined | void | Module[]
3926
+ >;
3881
3927
  }
3882
3928
  declare interface CompilationHooksJavascriptModulesPlugin {
3883
3929
  renderModuleContent: SyncWaterfallHook<
@@ -3946,6 +3992,52 @@ declare interface CompilationParams {
3946
3992
  normalModuleFactory: NormalModuleFactory;
3947
3993
  contextModuleFactory: ContextModuleFactory;
3948
3994
  }
3995
+ declare interface CompiledAliasOption {
3996
+ /**
3997
+ * original alias name
3998
+ */
3999
+ name: string;
4000
+
4001
+ /**
4002
+ * name + "/" — precomputed to avoid per-resolve concat
4003
+ */
4004
+ nameWithSlash: string;
4005
+
4006
+ /**
4007
+ * alias target(s)
4008
+ */
4009
+ alias: Alias;
4010
+
4011
+ /**
4012
+ * normalized onlyModule flag
4013
+ */
4014
+ onlyModule: boolean;
4015
+
4016
+ /**
4017
+ * absolute form of `name` (with slash ending), null when not absolute
4018
+ */
4019
+ absolutePath: null | string;
4020
+
4021
+ /**
4022
+ * substring before the single "*" in `name`, null when no wildcard
4023
+ */
4024
+ wildcardPrefix: null | string;
4025
+
4026
+ /**
4027
+ * substring after the single "*" in `name`, null when no wildcard
4028
+ */
4029
+ wildcardSuffix: null | string;
4030
+
4031
+ /**
4032
+ * first character code of `name` — used as a cheap screen on the hot path. `-1` indicates "matches any first char" (empty wildcard prefix).
4033
+ */
4034
+ firstCharCode: number;
4035
+
4036
+ /**
4037
+ * true when `alias` is an array — precomputed so the hot path skips `Array.isArray`
4038
+ */
4039
+ arrayAlias: boolean;
4040
+ }
3949
4041
  declare class Compiler {
3950
4042
  /**
3951
4043
  * Creates an instance of Compiler.
@@ -4348,7 +4440,7 @@ declare interface Configuration {
4348
4440
  /**
4349
4441
  * Which asset type should receive this devtool value.
4350
4442
  */
4351
- type: "all" | "javascript" | "css";
4443
+ type: "css" | "all" | "javascript";
4352
4444
  /**
4353
4445
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
4354
4446
  */
@@ -4428,6 +4520,7 @@ declare interface Configuration {
4428
4520
  | "script"
4429
4521
  | "node-commonjs"
4430
4522
  | "asset"
4523
+ | "asset-url"
4431
4524
  | "css-import"
4432
4525
  | "css-url";
4433
4526
 
@@ -4610,6 +4703,11 @@ declare class ConstDependency extends NullDependency {
4610
4703
  * Returns true if the dependency is a low priority dependency.
4611
4704
  */
4612
4705
  static isLowPriorityDependency(dependency: Dependency): boolean;
4706
+
4707
+ /**
4708
+ * Returns true if the dependency can be concatenated (scope hoisting).
4709
+ */
4710
+ static canConcatenate(dependency: Dependency): boolean;
4613
4711
  static TRANSITIVE: symbol;
4614
4712
  }
4615
4713
  declare class ConstDependencyTemplate extends NullDependencyTemplate {
@@ -4934,6 +5032,11 @@ declare interface ContextResolveData {
4934
5032
  contextDependencies: LazySet<string>;
4935
5033
  dependencies: ContextDependency[];
4936
5034
  }
5035
+ type ContextTimestamp =
5036
+ | null
5037
+ | ContextFileSystemInfoEntry
5038
+ | "ignore"
5039
+ | ExistenceOnlyTimeEntryFileSystemInfo;
4937
5040
  declare interface ContextTimestampAndHash {
4938
5041
  safeTime: number;
4939
5042
  timestampHash?: string;
@@ -4942,6 +5045,89 @@ declare interface ContextTimestampAndHash {
4942
5045
  symlinks?: Set<string>;
4943
5046
  }
4944
5047
  type ContextTypes = KnownContext & Record<any, any>;
5048
+
5049
+ declare interface CreateData {
5050
+ /**
5051
+ * an optional layer in which the module is
5052
+ */
5053
+ layer?: string;
5054
+
5055
+ /**
5056
+ * module type. When deserializing, this is set to an empty string "".
5057
+ */
5058
+ type: string;
5059
+
5060
+ /**
5061
+ * request string
5062
+ */
5063
+ request: string;
5064
+
5065
+ /**
5066
+ * request intended by user (without loaders from config)
5067
+ */
5068
+ userRequest: string;
5069
+
5070
+ /**
5071
+ * request without resolving
5072
+ */
5073
+ rawRequest: string;
5074
+
5075
+ /**
5076
+ * list of loaders
5077
+ */
5078
+ loaders: LoaderItem[];
5079
+
5080
+ /**
5081
+ * path + query of the real resource
5082
+ */
5083
+ resource: string;
5084
+
5085
+ /**
5086
+ * resource resolve data
5087
+ */
5088
+ resourceResolveData?: ResourceSchemeData & Partial<ResolveRequest>;
5089
+
5090
+ /**
5091
+ * context directory for resolving
5092
+ */
5093
+ context: string;
5094
+
5095
+ /**
5096
+ * path + query of the matched resource (virtual)
5097
+ */
5098
+ matchResource?: string;
5099
+
5100
+ /**
5101
+ * the parser used
5102
+ */
5103
+ parser: ParserClass;
5104
+
5105
+ /**
5106
+ * the options of the parser used
5107
+ */
5108
+ parserOptions?: ParserOptions;
5109
+
5110
+ /**
5111
+ * the generator used
5112
+ */
5113
+ generator: Generator;
5114
+
5115
+ /**
5116
+ * the options of the generator used
5117
+ */
5118
+ generatorOptions?: GeneratorOptions;
5119
+
5120
+ /**
5121
+ * options used for resolving requests from this module
5122
+ */
5123
+ resolveOptions?: ResolveOptions;
5124
+
5125
+ /**
5126
+ * enable/disable extracting source map
5127
+ */
5128
+ extractSourceMap: boolean;
5129
+ settings: ModuleSettings;
5130
+ }
4945
5131
  type CreateReadStreamFSImplementation = FSImplementation & {
4946
5132
  read: (...args: any[]) => any;
4947
5133
  };
@@ -4956,6 +5142,66 @@ type CreatedObject<T, F> = T extends ChunkGroupInfoWithName[]
4956
5142
  : T extends (infer V)[]
4957
5143
  ? StatsObject<V, F>[]
4958
5144
  : StatsObject<T, F>;
5145
+
5146
+ /**
5147
+ * Parser options for css/auto and css/module modules.
5148
+ */
5149
+ declare interface CssAutoOrModuleParserOptions {
5150
+ /**
5151
+ * Enable/disable renaming of `@keyframes`.
5152
+ */
5153
+ animation?: boolean;
5154
+
5155
+ /**
5156
+ * Enable/disable renaming of `@container` names.
5157
+ */
5158
+ container?: boolean;
5159
+
5160
+ /**
5161
+ * Enable/disable renaming of custom identifiers.
5162
+ */
5163
+ customIdents?: boolean;
5164
+
5165
+ /**
5166
+ * Enable/disable renaming of dashed identifiers, e. g. custom properties.
5167
+ */
5168
+ dashedIdents?: boolean;
5169
+
5170
+ /**
5171
+ * Configure how CSS content is exported as default.
5172
+ */
5173
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
5174
+
5175
+ /**
5176
+ * Enable/disable renaming of `@function` names.
5177
+ */
5178
+ function?: boolean;
5179
+
5180
+ /**
5181
+ * Enable/disable renaming of grid identifiers.
5182
+ */
5183
+ grid?: boolean;
5184
+
5185
+ /**
5186
+ * Enable/disable `@import` at-rules handling.
5187
+ */
5188
+ import?: boolean;
5189
+
5190
+ /**
5191
+ * Use ES modules named export for css exports.
5192
+ */
5193
+ namedExports?: boolean;
5194
+
5195
+ /**
5196
+ * Enable strict pure mode: every selector must contain at least one local class or id selector.
5197
+ */
5198
+ pure?: boolean;
5199
+
5200
+ /**
5201
+ * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
5202
+ */
5203
+ url?: boolean;
5204
+ }
4959
5205
  declare interface CssData {
4960
5206
  /**
4961
5207
  * whether export __esModule
@@ -4966,6 +5212,11 @@ declare interface CssData {
4966
5212
  * the css exports
4967
5213
  */
4968
5214
  exports: Map<string, string>;
5215
+
5216
+ /**
5217
+ * source position (line is 1-based, column is 0-based) of each export's defining identifier in the original CSS, used to emit fine-grained JS-to-CSS source mappings
5218
+ */
5219
+ exportLocs?: Map<string, { line: number; column: number }>;
4969
5220
  }
4970
5221
  declare abstract class CssGenerator extends Generator {
4971
5222
  options: CssModuleGeneratorOptions;
@@ -5057,6 +5308,7 @@ declare interface CssLoadingRuntimeModulePluginHooks {
5057
5308
  createStylesheet: SyncWaterfallHook<[string, Chunk], string>;
5058
5309
  linkPreload: SyncWaterfallHook<[string, Chunk], string>;
5059
5310
  linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
5311
+ linkInsert: SyncWaterfallHook<[string, Chunk], string>;
5060
5312
  }
5061
5313
  declare abstract class CssModule extends NormalModule {
5062
5314
  cssLayer: CssLayer;
@@ -5089,7 +5341,7 @@ declare interface CssModuleGeneratorOptions {
5089
5341
  | "camel-case-only"
5090
5342
  | "dashes"
5091
5343
  | "dashes-only"
5092
- | ((name: string) => string);
5344
+ | ((name: string) => string | string[]);
5093
5345
 
5094
5346
  /**
5095
5347
  * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
@@ -5119,13 +5371,11 @@ declare interface CssModuleGeneratorOptions {
5119
5371
  /**
5120
5372
  * Configure the generated local ident name.
5121
5373
  */
5122
- localIdentName?:
5123
- | string
5124
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
5374
+ localIdentName?: string | TemplatePathFn<PathDataModule>;
5125
5375
  }
5126
5376
 
5127
5377
  /**
5128
- * Parser options for css/module modules.
5378
+ * Parser options for css/global modules.
5129
5379
  */
5130
5380
  declare interface CssModuleParserOptions {
5131
5381
  /**
@@ -5234,7 +5484,7 @@ declare class CssModulesPlugin {
5234
5484
  static getChunkFilenameTemplate(
5235
5485
  chunk: Chunk,
5236
5486
  outputOptions: OutputNormalizedWithDefaults
5237
- ): TemplatePath;
5487
+ ): ChunkFilenameTemplate;
5238
5488
 
5239
5489
  /**
5240
5490
  * Returns true, when the chunk has css.
@@ -5280,6 +5530,10 @@ declare abstract class CssParser extends ParserClass {
5280
5530
  * Use ES modules named export for css exports.
5281
5531
  */
5282
5532
  namedExports: boolean;
5533
+ /**
5534
+ * Enable strict pure mode: every selector must contain at least one local class or id selector.
5535
+ */
5536
+ pure?: boolean;
5283
5537
  /**
5284
5538
  * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
5285
5539
  */
@@ -5536,6 +5790,11 @@ declare class Dependency {
5536
5790
  */
5537
5791
  createIgnoredModule(context: string): Module;
5538
5792
 
5793
+ /**
5794
+ * Returns true if this dependency can be concatenated
5795
+ */
5796
+ canConcatenate(): boolean;
5797
+
5539
5798
  /**
5540
5799
  * Serializes this instance into the provided serializer context.
5541
5800
  */
@@ -5554,6 +5813,11 @@ declare class Dependency {
5554
5813
  * Returns true if the dependency is a low priority dependency.
5555
5814
  */
5556
5815
  static isLowPriorityDependency(dependency: Dependency): boolean;
5816
+
5817
+ /**
5818
+ * Returns true if the dependency can be concatenated (scope hoisting).
5819
+ */
5820
+ static canConcatenate(dependency: Dependency): boolean;
5557
5821
  static TRANSITIVE: symbol;
5558
5822
  }
5559
5823
  declare interface DependencyConstructor {
@@ -5855,6 +6119,17 @@ declare interface DirentTypes<T extends string | Buffer = string> {
5855
6119
  */
5856
6120
  path?: string;
5857
6121
  }
6122
+ declare interface DirnameCacheEntry {
6123
+ /**
6124
+ * cached dirname function
6125
+ */
6126
+ fn: (maybePath: string) => string;
6127
+
6128
+ /**
6129
+ * the underlying cache map
6130
+ */
6131
+ cache: Map<string, string>;
6132
+ }
5858
6133
  declare interface Disposable {
5859
6134
  [Symbol.dispose](): void;
5860
6135
  }
@@ -6310,7 +6585,7 @@ declare interface EntryDescription {
6310
6585
  /**
6311
6586
  * Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
6312
6587
  */
6313
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6588
+ filename?: string | TemplatePathFn<PathDataChunk>;
6314
6589
 
6315
6590
  /**
6316
6591
  * Module(s) that are loaded upon startup.
@@ -6330,7 +6605,7 @@ declare interface EntryDescription {
6330
6605
  /**
6331
6606
  * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
6332
6607
  */
6333
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6608
+ publicPath?: string | TemplatePathFn<PathData>;
6334
6609
 
6335
6610
  /**
6336
6611
  * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
@@ -6370,7 +6645,7 @@ declare interface EntryDescriptionNormalized {
6370
6645
  /**
6371
6646
  * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
6372
6647
  */
6373
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6648
+ filename?: string | TemplatePathFn<PathDataChunk>;
6374
6649
 
6375
6650
  /**
6376
6651
  * Module(s) that are loaded upon startup. The last one is exported.
@@ -6390,7 +6665,7 @@ declare interface EntryDescriptionNormalized {
6390
6665
  /**
6391
6666
  * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
6392
6667
  */
6393
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6668
+ publicPath?: string | TemplatePathFn<PathData>;
6394
6669
 
6395
6670
  /**
6396
6671
  * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
@@ -6783,6 +7058,12 @@ declare interface Experiments {
6783
7058
  */
6784
7059
  futureDefaults?: boolean;
6785
7060
 
7061
+ /**
7062
+ * Enable experimental HTML support. This flag does not by itself make `.html` files usable directly as entry points without additional HTML handling.
7063
+ * @experimental
7064
+ */
7065
+ html?: boolean;
7066
+
6786
7067
  /**
6787
7068
  * Compile entrypoints and import()s only when they are accessed.
6788
7069
  * @experimental
@@ -6806,6 +7087,12 @@ declare interface Experiments {
6806
7087
  * @experimental
6807
7088
  */
6808
7089
  syncWebAssembly?: boolean;
7090
+
7091
+ /**
7092
+ * Enable typescript support.
7093
+ * @experimental
7094
+ */
7095
+ typescript?: boolean;
6809
7096
  }
6810
7097
 
6811
7098
  /**
@@ -6854,6 +7141,12 @@ declare interface ExperimentsNormalized {
6854
7141
  */
6855
7142
  futureDefaults?: boolean;
6856
7143
 
7144
+ /**
7145
+ * Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points.
7146
+ * @experimental
7147
+ */
7148
+ html?: boolean;
7149
+
6857
7150
  /**
6858
7151
  * Compile entrypoints and import()s only when they are accessed.
6859
7152
  * @experimental
@@ -6877,6 +7170,12 @@ declare interface ExperimentsNormalized {
6877
7170
  * @experimental
6878
7171
  */
6879
7172
  syncWebAssembly?: boolean;
7173
+
7174
+ /**
7175
+ * Enable typescript support.
7176
+ * @experimental
7177
+ */
7178
+ typescript?: boolean;
6880
7179
  }
6881
7180
  declare abstract class ExportInfo {
6882
7181
  name: string;
@@ -6920,6 +7219,7 @@ declare abstract class ExportInfo {
6920
7219
  * Sets used without info.
6921
7220
  */
6922
7221
  setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
7222
+ setHasProvideInfo(): void;
6923
7223
  setHasUseInfo(): void;
6924
7224
 
6925
7225
  /**
@@ -7594,6 +7894,7 @@ declare class ExternalsPlugin {
7594
7894
  | "script"
7595
7895
  | "node-commonjs"
7596
7896
  | "asset"
7897
+ | "asset-url"
7597
7898
  | "css-import"
7598
7899
  | "css-url"
7599
7900
  | ((dependency: Dependency) => ExternalsType),
@@ -7623,6 +7924,7 @@ declare class ExternalsPlugin {
7623
7924
  | "script"
7624
7925
  | "node-commonjs"
7625
7926
  | "asset"
7927
+ | "asset-url"
7626
7928
  | "css-import"
7627
7929
  | "css-url"
7628
7930
  | ((dependency: Dependency) => ExternalsType);
@@ -7711,6 +8013,7 @@ type ExternalsType =
7711
8013
  | "script"
7712
8014
  | "node-commonjs"
7713
8015
  | "asset"
8016
+ | "asset-url"
7714
8017
  | "css-import"
7715
8018
  | "css-url";
7716
8019
 
@@ -7954,13 +8257,7 @@ declare abstract class FileSystemInfo {
7954
8257
  * Adds file timestamps.
7955
8258
  */
7956
8259
  addFileTimestamps(
7957
- map: ReadonlyMap<
7958
- string,
7959
- | null
7960
- | FileSystemInfoEntry
7961
- | "ignore"
7962
- | ExistenceOnlyTimeEntryFileSystemInfo
7963
- >,
8260
+ map: ReadonlyMap<string, FileTimestamp>,
7964
8261
  immutable?: boolean
7965
8262
  ): void;
7966
8263
 
@@ -7968,13 +8265,7 @@ declare abstract class FileSystemInfo {
7968
8265
  * Adds context timestamps.
7969
8266
  */
7970
8267
  addContextTimestamps(
7971
- map: ReadonlyMap<
7972
- string,
7973
- | null
7974
- | ContextFileSystemInfoEntry
7975
- | "ignore"
7976
- | ExistenceOnlyTimeEntryFileSystemInfo
7977
- >,
8268
+ map: ReadonlyMap<string, ContextTimestamp>,
7978
8269
  immutable?: boolean
7979
8270
  ): void;
7980
8271
 
@@ -8081,6 +8372,11 @@ declare interface FileSystemInfoEntry {
8081
8372
  safeTime: number;
8082
8373
  timestamp?: number;
8083
8374
  }
8375
+ type FileTimestamp =
8376
+ | null
8377
+ | FileSystemInfoEntry
8378
+ | "ignore"
8379
+ | ExistenceOnlyTimeEntryFileSystemInfo;
8084
8380
  type FilterItemTypes = string | RegExp | ((value: string) => boolean);
8085
8381
  declare interface Flags {
8086
8382
  [index: string]: Argument;
@@ -8248,6 +8544,11 @@ declare interface GeneratorOptionsByModuleTypeKnown {
8248
8544
  */
8249
8545
  "css/module"?: CssModuleGeneratorOptions;
8250
8546
 
8547
+ /**
8548
+ * Generator options for html modules.
8549
+ */
8550
+ html?: HtmlGeneratorOptions;
8551
+
8251
8552
  /**
8252
8553
  * No generator options are supported for this module type.
8253
8554
  */
@@ -8290,14 +8591,17 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
8290
8591
  ) =>
8291
8592
  | string
8292
8593
  | false
8293
- | ((pathData: PathData, assetInfo?: AssetInfo) => string),
8594
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string),
8294
8595
  allChunks: boolean
8295
8596
  );
8296
8597
  contentType: string;
8297
8598
  global: string;
8298
8599
  getFilenameForChunk: (
8299
8600
  chunk: Chunk
8300
- ) => string | false | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8601
+ ) =>
8602
+ | string
8603
+ | false
8604
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
8301
8605
  allChunks: boolean;
8302
8606
 
8303
8607
  /**
@@ -8544,6 +8848,11 @@ declare class HarmonyImportDependency extends ModuleDependency {
8544
8848
  * Returns true if the dependency is a low priority dependency.
8545
8849
  */
8546
8850
  static isLowPriorityDependency(dependency: Dependency): boolean;
8851
+
8852
+ /**
8853
+ * Returns true if the dependency can be concatenated (scope hoisting).
8854
+ */
8855
+ static canConcatenate(dependency: Dependency): boolean;
8547
8856
  static TRANSITIVE: symbol;
8548
8857
  }
8549
8858
  declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
@@ -8695,6 +9004,67 @@ declare interface HotModuleReplacementPluginLoaderContext {
8695
9004
  declare class HotUpdateChunk extends Chunk {
8696
9005
  constructor();
8697
9006
  }
9007
+ declare abstract class HtmlGenerator extends Generator {
9008
+ options: HtmlGeneratorOptions;
9009
+
9010
+ /**
9011
+ * Processes the provided module.
9012
+ */
9013
+ sourceDependency(
9014
+ module: NormalModule,
9015
+ dependency: Dependency,
9016
+ initFragments: InitFragment<GenerateContext>[],
9017
+ source: ReplaceSource,
9018
+ generateContext: GenerateContext
9019
+ ): void;
9020
+
9021
+ /**
9022
+ * Processes the provided dependencies block.
9023
+ */
9024
+ sourceBlock(
9025
+ module: NormalModule,
9026
+ block: DependenciesBlock,
9027
+ initFragments: InitFragment<GenerateContext>[],
9028
+ source: ReplaceSource,
9029
+ generateContext: GenerateContext
9030
+ ): void;
9031
+
9032
+ /**
9033
+ * Processes the provided module.
9034
+ */
9035
+ sourceModule(
9036
+ module: NormalModule,
9037
+ initFragments: InitFragment<GenerateContext>[],
9038
+ source: ReplaceSource,
9039
+ generateContext: GenerateContext
9040
+ ): void;
9041
+
9042
+ /**
9043
+ * Generates fallback output for the provided error condition.
9044
+ */
9045
+ generateError(
9046
+ error: Error,
9047
+ module: NormalModule,
9048
+ generateContext: GenerateContext
9049
+ ): null | Source;
9050
+ }
9051
+
9052
+ /**
9053
+ * Generator options for html modules.
9054
+ */
9055
+ declare interface HtmlGeneratorOptions {
9056
+ /**
9057
+ * Emit the parsed and URL-rewritten HTML as a standalone `.html` output file alongside the module's JavaScript export. When unset, extraction defaults to `true` for HTML modules used as compilation entries (HTML entry points) and `false` for HTML modules imported from JavaScript. Filenames follow `output.htmlFilename` / `output.htmlChunkFilename`.
9058
+ */
9059
+ extract?: boolean;
9060
+ }
9061
+ declare abstract class HtmlParser extends ParserClass {
9062
+ magicCommentContext: ContextImport;
9063
+ hashFunction?: string | typeof Hash;
9064
+ context?: string;
9065
+ outputModule?: boolean;
9066
+ css?: boolean;
9067
+ }
8698
9068
 
8699
9069
  /**
8700
9070
  * Options for building http resources.
@@ -9111,6 +9481,7 @@ type IgnorePluginOptions =
9111
9481
  type ImportAttributes = Record<string, string> & {};
9112
9482
  declare interface ImportDependencyMeta {
9113
9483
  attributes?: ImportAttributes;
9484
+ phase?: 0 | 1 | 2;
9114
9485
  externalType?: "import" | "module";
9115
9486
  }
9116
9487
  type ImportExpressionJavascriptParser = ImportExpressionImport & {
@@ -9497,7 +9868,7 @@ declare class JavascriptModulesPlugin {
9497
9868
  static getChunkFilenameTemplate(
9498
9869
  chunk: Chunk,
9499
9870
  outputOptions: OutputNormalizedWithDefaults
9500
- ): TemplatePath;
9871
+ ): ChunkFilenameTemplate;
9501
9872
  static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
9502
9873
  }
9503
9874
  declare class JavascriptParser extends ParserClass {
@@ -9506,7 +9877,10 @@ declare class JavascriptParser extends ParserClass {
9506
9877
  */
9507
9878
  constructor(
9508
9879
  sourceType?: "module" | "auto" | "script",
9509
- options?: { parse?: (code: string, options: ParseOptions) => ParseResult }
9880
+ options?: {
9881
+ parse?: (code: string, options: ParseOptions) => ParseResult;
9882
+ typescript?: boolean;
9883
+ }
9510
9884
  );
9511
9885
  hooks: Readonly<{
9512
9886
  evaluateTypeof: HookMap<
@@ -9834,7 +10208,7 @@ declare class JavascriptParser extends ParserClass {
9834
10208
  boolean | void
9835
10209
  >;
9836
10210
  preDeclarator: SyncBailHook<
9837
- [VariableDeclarator, Statement],
10211
+ [VariableDeclarator, VariableDeclaration],
9838
10212
  boolean | void
9839
10213
  >;
9840
10214
  declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
@@ -9947,7 +10321,10 @@ declare class JavascriptParser extends ParserClass {
9947
10321
  unusedStatement: SyncBailHook<[Statement], boolean | void>;
9948
10322
  }>;
9949
10323
  sourceType: "module" | "auto" | "script";
9950
- options: { parse?: (code: string, options: ParseOptions) => ParseResult };
10324
+ options: {
10325
+ parse?: (code: string, options: ParseOptions) => ParseResult;
10326
+ typescript?: boolean;
10327
+ };
9951
10328
  scope: ScopeInfo;
9952
10329
  state: JavascriptParserState;
9953
10330
  comments?: CommentJavascriptParser[];
@@ -10987,11 +11364,11 @@ declare class JavascriptParser extends ParserClass {
10987
11364
  | string
10988
11365
  | Identifier
10989
11366
  | MemberExpression
11367
+ | Property
10990
11368
  | ObjectPattern
10991
11369
  | ArrayPattern
10992
11370
  | RestElement
10993
11371
  | AssignmentPattern
10994
- | Property
10995
11372
  )[],
10996
11373
  fn: () => void
10997
11374
  ): void;
@@ -11066,11 +11443,11 @@ declare class JavascriptParser extends ParserClass {
11066
11443
  | string
11067
11444
  | Identifier
11068
11445
  | MemberExpression
11446
+ | Property
11069
11447
  | ObjectPattern
11070
11448
  | ArrayPattern
11071
11449
  | RestElement
11072
11450
  | AssignmentPattern
11073
- | Property
11074
11451
  )[],
11075
11452
  onIdent: (ident: string) => void
11076
11453
  ): void;
@@ -11082,11 +11459,11 @@ declare class JavascriptParser extends ParserClass {
11082
11459
  pattern:
11083
11460
  | Identifier
11084
11461
  | MemberExpression
11462
+ | Property
11085
11463
  | ObjectPattern
11086
11464
  | ArrayPattern
11087
11465
  | RestElement
11088
- | AssignmentPattern
11089
- | Property,
11466
+ | AssignmentPattern,
11090
11467
  onIdent: (ident: string, identifier: Identifier) => void
11091
11468
  ): void;
11092
11469
 
@@ -11486,6 +11863,11 @@ declare interface JavascriptParserOptions {
11486
11863
  */
11487
11864
  amd?: false | { [index: string]: any };
11488
11865
 
11866
+ /**
11867
+ * Set .name to "default" for anonymous default export functions and classes per ES spec. Disable to reduce output size when .name is not needed.
11868
+ */
11869
+ anonymousDefaultExportName?: boolean;
11870
+
11489
11871
  /**
11490
11872
  * Enable/disable special handling for browserify bundles.
11491
11873
  */
@@ -11647,6 +12029,12 @@ declare interface JavascriptParserOptions {
11647
12029
  */
11648
12030
  system?: boolean;
11649
12031
 
12032
+ /**
12033
+ * Enable typescript support.
12034
+ * @experimental
12035
+ */
12036
+ typescript?: boolean;
12037
+
11650
12038
  /**
11651
12039
  * Enable warnings when using the require function in a not statically analyse-able way.
11652
12040
  */
@@ -11695,6 +12083,17 @@ declare interface JavascriptParserOptions {
11695
12083
  type JavascriptParserState = ParserStateBase &
11696
12084
  Record<string, any> &
11697
12085
  KnownJavascriptParserState;
12086
+ declare interface JoinCacheEntry {
12087
+ /**
12088
+ * cached join function
12089
+ */
12090
+ fn: (rootPath: string, request: string) => string;
12091
+
12092
+ /**
12093
+ * the underlying cache map
12094
+ */
12095
+ cache: Map<string, Map<string, undefined | string>>;
12096
+ }
11698
12097
  declare abstract class JsonData {
11699
12098
  /**
11700
12099
  * Returns raw JSON data.
@@ -11735,22 +12134,6 @@ declare interface JsonGeneratorOptions {
11735
12134
  */
11736
12135
  JSONParse?: boolean;
11737
12136
  }
11738
- declare interface JsonModulesPluginParserOptions {
11739
- /**
11740
- * The depth of json dependency flagged as `exportInfo`.
11741
- */
11742
- exportsDepth?: number;
11743
-
11744
- /**
11745
- * Allow named exports for json of object type
11746
- */
11747
- namedExports?: boolean;
11748
-
11749
- /**
11750
- * Function that executes for a module source string and should return json-compatible data.
11751
- */
11752
- parse?: (input: string) => any;
11753
- }
11754
12137
  declare interface JsonObjectFs {
11755
12138
  [index: string]:
11756
12139
  | undefined
@@ -11772,7 +12155,7 @@ declare interface JsonObjectTypes {
11772
12155
  | JsonValueTypes[];
11773
12156
  }
11774
12157
  declare abstract class JsonParser extends ParserClass {
11775
- options: JsonModulesPluginParserOptions;
12158
+ options: JsonParserOptions;
11776
12159
  }
11777
12160
 
11778
12161
  /**
@@ -12060,7 +12443,8 @@ declare interface KnownBuildMeta {
12060
12443
  treatAsCommonJs?: boolean;
12061
12444
  async?: boolean;
12062
12445
  sideEffectFree?: boolean;
12063
- isCSSModule?: boolean;
12446
+ isCssModule?: boolean;
12447
+ needIdInConcatenation?: boolean;
12064
12448
  jsIncompatibleExports?: Record<string, string>;
12065
12449
  exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
12066
12450
  exportsSourceByRuntime?: Map<string, string>;
@@ -12526,7 +12910,15 @@ declare interface LStatFs {
12526
12910
  ): void;
12527
12911
  }
12528
12912
  declare interface LStatSync {
12529
- (path: PathLikeFs, options?: undefined): IStatsFs;
12913
+ (path: PathLikeFs): IStatsFs;
12914
+ (
12915
+ path: PathLikeFs,
12916
+ options?: StatSyncOptions & { bigint?: false; throwIfNoEntry?: true }
12917
+ ): IStatsFs;
12918
+ (
12919
+ path: PathLikeFs,
12920
+ options: StatSyncOptions & { bigint: true; throwIfNoEntry?: true }
12921
+ ): IBigIntStatsFs;
12530
12922
  (
12531
12923
  path: PathLikeFs,
12532
12924
  options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
@@ -12535,14 +12927,9 @@ declare interface LStatSync {
12535
12927
  path: PathLikeFs,
12536
12928
  options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
12537
12929
  ): undefined | IBigIntStatsFs;
12538
- (path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStatsFs;
12539
- (
12540
- path: PathLikeFs,
12541
- options: StatSyncOptions & { bigint: true }
12542
- ): IBigIntStatsFs;
12543
12930
  (
12544
12931
  path: PathLikeFs,
12545
- options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
12932
+ options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: true }
12546
12933
  ): IStatsFs | IBigIntStatsFs;
12547
12934
  (
12548
12935
  path: PathLikeFs,
@@ -13858,12 +14245,12 @@ declare class Module extends DependenciesBlock {
13858
14245
  /**
13859
14246
  * Adds the provided warning to the module.
13860
14247
  */
13861
- addWarning(warning: WebpackError): void;
14248
+ addWarning(warning: Error): void;
13862
14249
 
13863
14250
  /**
13864
14251
  * Returns list of warnings if any.
13865
14252
  */
13866
- getWarnings(): undefined | Iterable<WebpackError>;
14253
+ getWarnings(): undefined | Error[];
13867
14254
 
13868
14255
  /**
13869
14256
  * Gets number of warnings.
@@ -13873,12 +14260,12 @@ declare class Module extends DependenciesBlock {
13873
14260
  /**
13874
14261
  * Adds the provided error to the module.
13875
14262
  */
13876
- addError(error: WebpackError): void;
14263
+ addError(error: Error): void;
13877
14264
 
13878
14265
  /**
13879
14266
  * Returns list of errors if any.
13880
14267
  */
13881
- getErrors(): undefined | Iterable<WebpackError>;
14268
+ getErrors(): undefined | Error[];
13882
14269
 
13883
14270
  /**
13884
14271
  * Gets number of errors.
@@ -14140,6 +14527,11 @@ declare class ModuleDependency extends Dependency {
14140
14527
  * Returns true if the dependency is a low priority dependency.
14141
14528
  */
14142
14529
  static isLowPriorityDependency(dependency: Dependency): boolean;
14530
+
14531
+ /**
14532
+ * Returns true if the dependency can be concatenated (scope hoisting).
14533
+ */
14534
+ static canConcatenate(dependency: Dependency): boolean;
14143
14535
  static TRANSITIVE: symbol;
14144
14536
  }
14145
14537
  declare class ModuleExternalInitFragment extends InitFragment<GenerateContext> {
@@ -14208,6 +14600,11 @@ declare interface ModuleFactoryCacheEntry {
14208
14600
  */
14209
14601
  undoPath: string;
14210
14602
 
14603
+ /**
14604
+ * - The compilation hash
14605
+ */
14606
+ hash?: string;
14607
+
14211
14608
  /**
14212
14609
  * - The inheritance chain
14213
14610
  */
@@ -14310,6 +14707,7 @@ declare interface ModuleFederationPluginOptions {
14310
14707
  | "script"
14311
14708
  | "node-commonjs"
14312
14709
  | "asset"
14710
+ | "asset-url"
14313
14711
  | "css-import"
14314
14712
  | "css-url";
14315
14713
 
@@ -15472,7 +15870,6 @@ declare class NoEmitOnErrorsPlugin {
15472
15870
  */
15473
15871
  apply(compiler: Compiler): void;
15474
15872
  }
15475
- type Node = false | NodeOptions;
15476
15873
  declare class NodeEnvironmentPlugin {
15477
15874
  /**
15478
15875
  * Creates an instance of NodeEnvironmentPlugin.
@@ -15491,6 +15888,81 @@ declare interface NodeEnvironmentPluginOptions {
15491
15888
  */
15492
15889
  infrastructureLogging: InfrastructureLogging;
15493
15890
  }
15891
+ type NodeEstreeIndex =
15892
+ | Program
15893
+ | ImportDeclaration
15894
+ | ExportNamedDeclaration
15895
+ | ExportAllDeclaration
15896
+ | ImportExpressionImport
15897
+ | UnaryExpression
15898
+ | ArrayExpression
15899
+ | ArrowFunctionExpression
15900
+ | AssignmentExpression
15901
+ | AwaitExpression
15902
+ | BinaryExpression
15903
+ | SimpleCallExpression
15904
+ | NewExpression
15905
+ | ChainExpression
15906
+ | ClassExpression
15907
+ | ConditionalExpression
15908
+ | FunctionExpression
15909
+ | Identifier
15910
+ | SimpleLiteral
15911
+ | RegExpLiteral
15912
+ | BigIntLiteral
15913
+ | LogicalExpression
15914
+ | MemberExpression
15915
+ | MetaProperty
15916
+ | ObjectExpression
15917
+ | SequenceExpression
15918
+ | TaggedTemplateExpression
15919
+ | TemplateLiteral
15920
+ | ThisExpression
15921
+ | UpdateExpression
15922
+ | YieldExpression
15923
+ | SpreadElement
15924
+ | PrivateIdentifier
15925
+ | Super
15926
+ | FunctionDeclaration
15927
+ | VariableDeclaration
15928
+ | ClassDeclaration
15929
+ | ExpressionStatement
15930
+ | BlockStatement
15931
+ | StaticBlock
15932
+ | EmptyStatement
15933
+ | DebuggerStatement
15934
+ | WithStatement
15935
+ | ReturnStatement
15936
+ | LabeledStatement
15937
+ | BreakStatement
15938
+ | ContinueStatement
15939
+ | IfStatement
15940
+ | SwitchStatement
15941
+ | ThrowStatement
15942
+ | TryStatement
15943
+ | WhileStatement
15944
+ | DoWhileStatement
15945
+ | ForStatement
15946
+ | ForInStatement
15947
+ | ForOfStatement
15948
+ | ExportDefaultDeclaration
15949
+ | MethodDefinition
15950
+ | PropertyDefinition
15951
+ | VariableDeclarator
15952
+ | AssignmentProperty
15953
+ | Property
15954
+ | CatchClause
15955
+ | ClassBody
15956
+ | ImportSpecifier
15957
+ | ImportDefaultSpecifier
15958
+ | ImportNamespaceSpecifier
15959
+ | ExportSpecifier
15960
+ | ObjectPattern
15961
+ | ArrayPattern
15962
+ | RestElement
15963
+ | AssignmentPattern
15964
+ | SwitchCase
15965
+ | TemplateElement;
15494
15966
 
15495
15967
  /**
15496
15968
  * Options object for node compatibility features.
@@ -15548,9 +16020,10 @@ declare interface NodeTemplatePluginOptions {
15548
16020
  */
15549
16021
  asyncChunkLoading?: boolean;
15550
16022
  }
16023
+ type NodeWebpackOptions = false | NodeOptions;
15551
16024
  type NonNullable<T> = T & {};
15552
16025
  declare class NormalModule extends Module {
15553
- constructor(__0: NormalModuleCreateData);
16026
+ constructor(__0: NormalModuleCreateDataNormalModuleObject_1<string>);
15554
16027
  request: string;
15555
16028
  userRequest: string;
15556
16029
  rawRequest: string;
@@ -15564,7 +16037,7 @@ declare class NormalModule extends Module {
15564
16037
  matchResource?: string;
15565
16038
  loaders: LoaderItem[];
15566
16039
  extractSourceMap: boolean;
15567
- error: null | WebpackError;
16040
+ error: null | Error;
15568
16041
  getResource(): null | string;
15569
16042
 
15570
16043
  /**
@@ -15591,7 +16064,7 @@ declare class NormalModule extends Module {
15591
16064
  sourceMap?: null | string | RawSourceMap,
15592
16065
  associatedObjectForCache?: object
15593
16066
  ): Source;
15594
- markModuleAsErrored(error: WebpackError): void;
16067
+ markModuleAsErrored(error: Error): void;
15595
16068
  applyNoParseRule(
15596
16069
  rule: string | RegExp | ((content: string) => boolean),
15597
16070
  content: string
@@ -15646,7 +16119,9 @@ declare interface NormalModuleCompilationHooks {
15646
16119
  >;
15647
16120
  needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
15648
16121
  }
15649
- declare interface NormalModuleCreateData {
16122
+ declare interface NormalModuleCreateDataNormalModuleObject_1<
16123
+ T extends string = string
16124
+ > {
15650
16125
  /**
15651
16126
  * an optional layer in which the module is
15652
16127
  */
@@ -15655,7 +16130,7 @@ declare interface NormalModuleCreateData {
15655
16130
  /**
15656
16131
  * module type. When deserializing, this is set to an empty string "".
15657
16132
  */
15658
- type: string;
16133
+ type: T;
15659
16134
 
15660
16135
  /**
15661
16136
  * request string
@@ -15700,22 +16175,86 @@ declare interface NormalModuleCreateData {
15700
16175
  /**
15701
16176
  * the parser used
15702
16177
  */
15703
- parser: ParserClass;
16178
+ parser: (Record<"javascript/auto", JavascriptParser> &
16179
+ Record<"javascript/dynamic", JavascriptParser> &
16180
+ Record<"javascript/esm", JavascriptParser> &
16181
+ Record<"json", JsonParser> &
16182
+ Record<"asset", AssetParser> &
16183
+ Record<"asset/inline", AssetParser> &
16184
+ Record<"asset/resource", AssetParser> &
16185
+ Record<"asset/source", AssetSourceParser> &
16186
+ Record<"asset/bytes", AssetBytesParser> &
16187
+ Record<"webassembly/async", AsyncWebAssemblyParser> &
16188
+ Record<"webassembly/sync", WebAssemblyParser> &
16189
+ Record<"css", CssParser> &
16190
+ Record<"css/auto", CssParser> &
16191
+ Record<"css/module", CssParser> &
16192
+ Record<"css/global", CssParser> &
16193
+ Record<"html", HtmlParser> &
16194
+ Record<string, ParserClass>)[T];
15704
16195
 
15705
16196
  /**
15706
16197
  * the options of the parser used
15707
16198
  */
15708
- parserOptions?: ParserOptions;
16199
+ parserOptions?: (Record<"javascript/auto", JavascriptParserOptions> &
16200
+ Record<"javascript/dynamic", JavascriptParserOptions> &
16201
+ Record<"javascript/esm", JavascriptParserOptions> &
16202
+ Record<"json", JsonParserOptions> &
16203
+ Record<"asset", AssetParserOptions> &
16204
+ Record<"asset/inline", EmptyParserOptions> &
16205
+ Record<"asset/resource", EmptyParserOptions> &
16206
+ Record<"asset/source", EmptyParserOptions> &
16207
+ Record<"asset/bytes", EmptyParserOptions> &
16208
+ Record<"webassembly/async", EmptyParserOptions> &
16209
+ Record<"webassembly/sync", EmptyParserOptions> &
16210
+ Record<"css", CssParserOptions> &
16211
+ Record<"css/auto", CssModuleParserOptions> &
16212
+ Record<"css/module", CssModuleParserOptions> &
16213
+ Record<"css/global", CssModuleParserOptions> &
16214
+ Record<"html", EmptyParserOptions> &
16215
+ Record<string, ParserOptions>)[T];
15709
16216
 
15710
16217
  /**
15711
16218
  * the generator used
15712
16219
  */
15713
- generator: Generator;
16220
+ generator: (Record<"javascript/auto", JavascriptGenerator> &
16221
+ Record<"javascript/dynamic", JavascriptGenerator> &
16222
+ Record<"javascript/esm", JavascriptGenerator> &
16223
+ Record<"json", JsonGenerator> &
16224
+ Record<"asset", AssetGenerator> &
16225
+ Record<"asset/inline", AssetGenerator> &
16226
+ Record<"asset/resource", AssetGenerator> &
16227
+ Record<"asset/source", AssetSourceGenerator> &
16228
+ Record<"asset/bytes", AssetBytesGenerator> &
16229
+ Record<"webassembly/async", Generator> &
16230
+ Record<"webassembly/sync", Generator> &
16231
+ Record<"css", CssGenerator> &
16232
+ Record<"css/auto", CssGenerator> &
16233
+ Record<"css/module", CssGenerator> &
16234
+ Record<"css/global", CssGenerator> &
16235
+ Record<"html", HtmlGenerator> &
16236
+ Record<string, Generator>)[T];
15714
16237
 
15715
16238
  /**
15716
16239
  * the options of the generator used
15717
16240
  */
15718
- generatorOptions?: GeneratorOptions;
16241
+ generatorOptions?: (Record<"javascript/auto", EmptyGeneratorOptions> &
16242
+ Record<"javascript/dynamic", EmptyGeneratorOptions> &
16243
+ Record<"javascript/esm", EmptyGeneratorOptions> &
16244
+ Record<"json", JsonGeneratorOptions> &
16245
+ Record<"asset", AssetGeneratorOptions> &
16246
+ Record<"asset/inline", AssetGeneratorOptions> &
16247
+ Record<"asset/resource", AssetGeneratorOptions> &
16248
+ Record<"asset/source", EmptyGeneratorOptions> &
16249
+ Record<"asset/bytes", EmptyGeneratorOptions> &
16250
+ Record<"webassembly/async", EmptyGeneratorOptions> &
16251
+ Record<"webassembly/sync", EmptyGeneratorOptions> &
16252
+ Record<"css", CssGeneratorOptions> &
16253
+ Record<"css/auto", CssModuleGeneratorOptions> &
16254
+ Record<"css/module", CssModuleGeneratorOptions> &
16255
+ Record<"css/global", CssModuleGeneratorOptions> &
16256
+ Record<"html", HtmlGeneratorOptions> &
16257
+ Record<string, GeneratorOptions>)[T];
15719
16258
 
15720
16259
  /**
15721
16260
  * options used for resolving requests from this module
@@ -15737,23 +16276,10 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15737
16276
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
15738
16277
  >;
15739
16278
  factorize: AsyncSeriesBailHook<[ResolveData], undefined | Module>;
15740
- beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
15741
- afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
15742
- createModule: AsyncSeriesBailHook<
15743
- [
15744
- Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
15745
- ResolveData
15746
- ],
15747
- void | Module
15748
- >;
15749
- module: SyncWaterfallHook<
15750
- [
15751
- Module,
15752
- Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
15753
- ResolveData
15754
- ],
15755
- Module
15756
- >;
16279
+ beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
16280
+ afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
16281
+ createModule: AsyncSeriesBailHook<[CreateData, ResolveData], void | Module>;
16282
+ module: SyncWaterfallHook<[Module, CreateData, ResolveData], Module>;
15757
16283
  createParser: TypedHookMap<
15758
16284
  Record<
15759
16285
  "javascript/auto",
@@ -15803,6 +16329,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15803
16329
  "css/global",
15804
16330
  SyncBailHook<[CssModuleParserOptions], CssParser>
15805
16331
  > &
16332
+ Record<"html", SyncBailHook<[EmptyParserOptions], HtmlParser>> &
15806
16333
  Record<string, SyncBailHook<[ParserOptions], ParserClass>>
15807
16334
  >;
15808
16335
  parser: TypedHookMap<
@@ -15857,6 +16384,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15857
16384
  "css/global",
15858
16385
  SyncBailHook<[CssParser, CssModuleParserOptions], void>
15859
16386
  > &
16387
+ Record<"html", SyncBailHook<[HtmlParser, EmptyParserOptions], void>> &
15860
16388
  Record<string, SyncBailHook<[ParserClass, ParserOptions], void>>
15861
16389
  >;
15862
16390
  createGenerator: TypedHookMap<
@@ -15892,11 +16420,11 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15892
16420
  > &
15893
16421
  Record<
15894
16422
  "webassembly/async",
15895
- SyncBailHook<[EmptyParserOptions], Generator>
16423
+ SyncBailHook<[EmptyGeneratorOptions], Generator>
15896
16424
  > &
15897
16425
  Record<
15898
16426
  "webassembly/sync",
15899
- SyncBailHook<[EmptyParserOptions], Generator>
16427
+ SyncBailHook<[EmptyGeneratorOptions], Generator>
15900
16428
  > &
15901
16429
  Record<"css", SyncBailHook<[CssGeneratorOptions], CssGenerator>> &
15902
16430
  Record<
@@ -15911,6 +16439,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15911
16439
  "css/global",
15912
16440
  SyncBailHook<[CssModuleGeneratorOptions], CssGenerator>
15913
16441
  > &
16442
+ Record<"html", SyncBailHook<[HtmlGeneratorOptions], HtmlGenerator>> &
15914
16443
  Record<string, SyncBailHook<[GeneratorOptions], Generator>>
15915
16444
  >;
15916
16445
  generator: TypedHookMap<
@@ -15952,11 +16481,11 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15952
16481
  > &
15953
16482
  Record<
15954
16483
  "webassembly/async",
15955
- SyncBailHook<[Generator, EmptyParserOptions], void>
16484
+ SyncBailHook<[Generator, EmptyGeneratorOptions], void>
15956
16485
  > &
15957
16486
  Record<
15958
16487
  "webassembly/sync",
15959
- SyncBailHook<[Generator, EmptyParserOptions], void>
16488
+ SyncBailHook<[Generator, EmptyGeneratorOptions], void>
15960
16489
  > &
15961
16490
  Record<"css", SyncBailHook<[CssGenerator, CssGeneratorOptions], void>> &
15962
16491
  Record<
@@ -15971,16 +16500,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
15971
16500
  "css/global",
15972
16501
  SyncBailHook<[CssGenerator, CssModuleGeneratorOptions], void>
15973
16502
  > &
16503
+ Record<
16504
+ "html",
16505
+ SyncBailHook<[HtmlGenerator, HtmlGeneratorOptions], void>
16506
+ > &
15974
16507
  Record<string, SyncBailHook<[Generator, GeneratorOptions], void>>
15975
16508
  >;
15976
16509
  createModuleClass: HookMap<
15977
- SyncBailHook<
15978
- [
15979
- Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
15980
- ResolveData
15981
- ],
15982
- void | Module
15983
- >
16510
+ SyncBailHook<[CreateData, ResolveData], void | Module>
15984
16511
  >;
15985
16512
  }>;
15986
16513
  resolverFactory: ResolverFactory;
@@ -16022,22 +16549,98 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
16022
16549
  /**
16023
16550
  * Returns parser.
16024
16551
  */
16025
- getParser(type: string, parserOptions?: ParserOptions): ParserClass;
16552
+ getParser<T extends string>(
16553
+ type: T,
16554
+ parserOptions?: ParserOptions
16555
+ ): (Record<"javascript/auto", JavascriptParser> &
16556
+ Record<"javascript/dynamic", JavascriptParser> &
16557
+ Record<"javascript/esm", JavascriptParser> &
16558
+ Record<"json", JsonParser> &
16559
+ Record<"asset", AssetParser> &
16560
+ Record<"asset/inline", AssetParser> &
16561
+ Record<"asset/resource", AssetParser> &
16562
+ Record<"asset/source", AssetSourceParser> &
16563
+ Record<"asset/bytes", AssetBytesParser> &
16564
+ Record<"webassembly/async", AsyncWebAssemblyParser> &
16565
+ Record<"webassembly/sync", WebAssemblyParser> &
16566
+ Record<"css", CssParser> &
16567
+ Record<"css/auto", CssParser> &
16568
+ Record<"css/module", CssParser> &
16569
+ Record<"css/global", CssParser> &
16570
+ Record<"html", HtmlParser> &
16571
+ Record<string, ParserClass>)[T];
16026
16572
 
16027
16573
  /**
16028
16574
  * Creates a parser from the provided type.
16029
16575
  */
16030
- createParser(type: string, parserOptions?: ParserOptions): ParserClass;
16576
+ createParser<T extends string>(
16577
+ type: T,
16578
+ parserOptions?: ParserOptions
16579
+ ): (Record<"javascript/auto", JavascriptParser> &
16580
+ Record<"javascript/dynamic", JavascriptParser> &
16581
+ Record<"javascript/esm", JavascriptParser> &
16582
+ Record<"json", JsonParser> &
16583
+ Record<"asset", AssetParser> &
16584
+ Record<"asset/inline", AssetParser> &
16585
+ Record<"asset/resource", AssetParser> &
16586
+ Record<"asset/source", AssetSourceParser> &
16587
+ Record<"asset/bytes", AssetBytesParser> &
16588
+ Record<"webassembly/async", AsyncWebAssemblyParser> &
16589
+ Record<"webassembly/sync", WebAssemblyParser> &
16590
+ Record<"css", CssParser> &
16591
+ Record<"css/auto", CssParser> &
16592
+ Record<"css/module", CssParser> &
16593
+ Record<"css/global", CssParser> &
16594
+ Record<"html", HtmlParser> &
16595
+ Record<string, ParserClass>)[T];
16031
16596
 
16032
16597
  /**
16033
16598
  * Returns generator.
16034
16599
  */
16035
- getGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
16600
+ getGenerator<T extends string>(
16601
+ type: T,
16602
+ generatorOptions?: GeneratorOptions
16603
+ ): (Record<"javascript/auto", JavascriptGenerator> &
16604
+ Record<"javascript/dynamic", JavascriptGenerator> &
16605
+ Record<"javascript/esm", JavascriptGenerator> &
16606
+ Record<"json", JsonGenerator> &
16607
+ Record<"asset", AssetGenerator> &
16608
+ Record<"asset/inline", AssetGenerator> &
16609
+ Record<"asset/resource", AssetGenerator> &
16610
+ Record<"asset/source", AssetSourceGenerator> &
16611
+ Record<"asset/bytes", AssetBytesGenerator> &
16612
+ Record<"webassembly/async", Generator> &
16613
+ Record<"webassembly/sync", Generator> &
16614
+ Record<"css", CssGenerator> &
16615
+ Record<"css/auto", CssGenerator> &
16616
+ Record<"css/module", CssGenerator> &
16617
+ Record<"css/global", CssGenerator> &
16618
+ Record<"html", HtmlGenerator> &
16619
+ Record<string, Generator>)[T];
16036
16620
 
16037
16621
  /**
16038
16622
  * Creates a generator.
16039
16623
  */
16040
- createGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
16624
+ createGenerator<T extends string>(
16625
+ type: T,
16626
+ generatorOptions?: GeneratorOptions
16627
+ ): (Record<"javascript/auto", JavascriptGenerator> &
16628
+ Record<"javascript/dynamic", JavascriptGenerator> &
16629
+ Record<"javascript/esm", JavascriptGenerator> &
16630
+ Record<"json", JsonGenerator> &
16631
+ Record<"asset", AssetGenerator> &
16632
+ Record<"asset/inline", AssetGenerator> &
16633
+ Record<"asset/resource", AssetGenerator> &
16634
+ Record<"asset/source", AssetSourceGenerator> &
16635
+ Record<"asset/bytes", AssetBytesGenerator> &
16636
+ Record<"webassembly/async", Generator> &
16637
+ Record<"webassembly/sync", Generator> &
16638
+ Record<"css", CssGenerator> &
16639
+ Record<"css/auto", CssGenerator> &
16640
+ Record<"css/module", CssGenerator> &
16641
+ Record<"css/global", CssGenerator> &
16642
+ Record<"html", HtmlGenerator> &
16643
+ Record<string, Generator>)[T];
16041
16644
 
16042
16645
  /**
16043
16646
  * Returns the resolver.
@@ -16183,6 +16786,11 @@ declare class NullDependency extends Dependency {
16183
16786
  * Returns true if the dependency is a low priority dependency.
16184
16787
  */
16185
16788
  static isLowPriorityDependency(dependency: Dependency): boolean;
16789
+
16790
+ /**
16791
+ * Returns true if the dependency can be concatenated (scope hoisting).
16792
+ */
16793
+ static canConcatenate(dependency: Dependency): boolean;
16186
16794
  static TRANSITIVE: symbol;
16187
16795
  }
16188
16796
  declare class NullDependencyTemplate extends DependencyTemplate {
@@ -16709,7 +17317,7 @@ declare interface OptimizationSplitChunksCacheGroup {
16709
17317
  /**
16710
17318
  * Sets the template for the filename for created chunks.
16711
17319
  */
16712
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17320
+ filename?: string | TemplatePathFn<PathDataChunk>;
16713
17321
 
16714
17322
  /**
16715
17323
  * Sets the hint for chunk id.
@@ -16891,7 +17499,7 @@ declare interface OptimizationSplitChunksOptions {
16891
17499
  /**
16892
17500
  * Sets the template for the filename for created chunks.
16893
17501
  */
16894
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17502
+ filename?: string | TemplatePathFn<PathDataChunk>;
16895
17503
 
16896
17504
  /**
16897
17505
  * Prevents exposing path info when creating names for parts splitted by maxSize.
@@ -17042,9 +17650,7 @@ declare interface Output {
17042
17650
  /**
17043
17651
  * The filename of asset modules as relative path inside the 'output.path' directory.
17044
17652
  */
17045
- assetModuleFilename?:
17046
- | string
17047
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17653
+ assetModuleFilename?: string | TemplatePathFn<PathDataModule>;
17048
17654
 
17049
17655
  /**
17050
17656
  * Enable/disable creating async chunks that are loaded on demand.
@@ -17064,9 +17670,7 @@ declare interface Output {
17064
17670
  /**
17065
17671
  * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17066
17672
  */
17067
- chunkFilename?:
17068
- | string
17069
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17673
+ chunkFilename?: string | TemplatePathFn<PathDataChunk>;
17070
17674
 
17071
17675
  /**
17072
17676
  * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
@@ -17106,16 +17710,12 @@ declare interface Output {
17106
17710
  /**
17107
17711
  * Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17108
17712
  */
17109
- cssChunkFilename?:
17110
- | string
17111
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17713
+ cssChunkFilename?: string | TemplatePathFn<PathDataChunk>;
17112
17714
 
17113
17715
  /**
17114
17716
  * Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17115
17717
  */
17116
- cssFilename?:
17117
- | string
17118
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17718
+ cssFilename?: string | TemplatePathFn<PathDataChunk>;
17119
17719
 
17120
17720
  /**
17121
17721
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
@@ -17159,7 +17759,7 @@ declare interface Output {
17159
17759
  /**
17160
17760
  * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17161
17761
  */
17162
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17762
+ filename?: string | TemplatePathFn<PathDataChunk>;
17163
17763
 
17164
17764
  /**
17165
17765
  * An expression which is used to address the global object/scope in runtime code.
@@ -17201,6 +17801,16 @@ declare interface Output {
17201
17801
  */
17202
17802
  hotUpdateMainFilename?: string;
17203
17803
 
17804
+ /**
17805
+ * Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17806
+ */
17807
+ htmlChunkFilename?: string | TemplatePathFn<PathDataChunk>;
17808
+
17809
+ /**
17810
+ * Specifies the filename template of output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17811
+ */
17812
+ htmlFilename?: string | TemplatePathFn<PathDataChunk>;
17813
+
17204
17814
  /**
17205
17815
  * Ignore warnings in the browser.
17206
17816
  */
@@ -17254,7 +17864,7 @@ declare interface Output {
17254
17864
  /**
17255
17865
  * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
17256
17866
  */
17257
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17867
+ publicPath?: string | TemplatePathFn<PathData>;
17258
17868
 
17259
17869
  /**
17260
17870
  * This option enables loading async chunks via a custom script type, such as script type="module".
@@ -17370,9 +17980,7 @@ declare interface OutputNormalized {
17370
17980
  /**
17371
17981
  * The filename of asset modules as relative path inside the 'output.path' directory.
17372
17982
  */
17373
- assetModuleFilename?:
17374
- | string
17375
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17983
+ assetModuleFilename?: string | TemplatePathFn<PathDataModule>;
17376
17984
 
17377
17985
  /**
17378
17986
  * Enable/disable creating async chunks that are loaded on demand.
@@ -17387,9 +17995,7 @@ declare interface OutputNormalized {
17387
17995
  /**
17388
17996
  * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17389
17997
  */
17390
- chunkFilename?:
17391
- | string
17392
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
17998
+ chunkFilename?: string | TemplatePathFn<PathDataChunk>;
17393
17999
 
17394
18000
  /**
17395
18001
  * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
@@ -17429,16 +18035,12 @@ declare interface OutputNormalized {
17429
18035
  /**
17430
18036
  * Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17431
18037
  */
17432
- cssChunkFilename?:
17433
- | string
17434
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
18038
+ cssChunkFilename?: string | TemplatePathFn<PathDataChunk>;
17435
18039
 
17436
18040
  /**
17437
18041
  * Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17438
18042
  */
17439
- cssFilename?:
17440
- | string
17441
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
18043
+ cssFilename?: string | TemplatePathFn<PathDataChunk>;
17442
18044
 
17443
18045
  /**
17444
18046
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
@@ -17482,7 +18084,7 @@ declare interface OutputNormalized {
17482
18084
  /**
17483
18085
  * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
17484
18086
  */
17485
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
18087
+ filename?: string | TemplatePathFn<PathDataChunk>;
17486
18088
 
17487
18089
  /**
17488
18090
  * An expression which is used to address the global object/scope in runtime code.
@@ -17524,6 +18126,16 @@ declare interface OutputNormalized {
17524
18126
  */
17525
18127
  hotUpdateMainFilename?: string;
17526
18128
 
18129
+ /**
18130
+ * Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
18131
+ */
18132
+ htmlChunkFilename?: string | TemplatePathFn<PathDataChunk>;
18133
+
18134
+ /**
18135
+ * Specifies the filename template of output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
18136
+ */
18137
+ htmlFilename?: string | TemplatePathFn<PathDataChunk>;
18138
+
17527
18139
  /**
17528
18140
  * Ignore warnings in the browser.
17529
18141
  */
@@ -17567,7 +18179,7 @@ declare interface OutputNormalized {
17567
18179
  /**
17568
18180
  * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
17569
18181
  */
17570
- publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
18182
+ publicPath?: string | TemplatePathFn<PathData>;
17571
18183
 
17572
18184
  /**
17573
18185
  * This option enables loading async chunks via a custom script type, such as script type="module".
@@ -17632,30 +18244,24 @@ declare interface OutputNormalized {
17632
18244
  }
17633
18245
  type OutputNormalizedWithDefaults = OutputNormalized & {
17634
18246
  uniqueName: string;
17635
- filename: NonNullable<
17636
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
17637
- >;
17638
- cssFilename: NonNullable<
17639
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
17640
- >;
18247
+ filename: NonNullable<undefined | string | TemplatePathFn<PathDataChunk>>;
18248
+ cssFilename: NonNullable<undefined | string | TemplatePathFn<PathDataChunk>>;
17641
18249
  chunkFilename: NonNullable<
17642
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
18250
+ undefined | string | TemplatePathFn<PathDataChunk>
17643
18251
  >;
17644
18252
  cssChunkFilename: NonNullable<
17645
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
18253
+ undefined | string | TemplatePathFn<PathDataChunk>
17646
18254
  >;
17647
18255
  hotUpdateChunkFilename: string;
17648
18256
  hotUpdateGlobal: string;
17649
18257
  assetModuleFilename: NonNullable<
17650
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
18258
+ undefined | string | TemplatePathFn<PathDataModule>
17651
18259
  >;
17652
18260
  webassemblyModuleFilename: string;
17653
18261
  sourceMapFilename: string;
17654
18262
  hotUpdateMainFilename: string;
17655
18263
  devtoolNamespace: string;
17656
- publicPath: NonNullable<
17657
- undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
17658
- >;
18264
+ publicPath: NonNullable<undefined | string | TemplatePathFn<PathData>>;
17659
18265
  workerPublicPath: string;
17660
18266
  workerWasmLoading: NonNullable<undefined | string | false>;
17661
18267
  workerChunkLoading: NonNullable<undefined | string | false>;
@@ -17791,19 +18397,19 @@ declare interface ParserOptionsByModuleTypeKnown {
17791
18397
  css?: CssParserOptions;
17792
18398
 
17793
18399
  /**
17794
- * Parser options for css/module modules.
18400
+ * Parser options for css/auto and css/module modules.
17795
18401
  */
17796
- "css/auto"?: CssModuleParserOptions;
18402
+ "css/auto"?: CssAutoOrModuleParserOptions;
17797
18403
 
17798
18404
  /**
17799
- * Parser options for css/module modules.
18405
+ * Parser options for css/global modules.
17800
18406
  */
17801
18407
  "css/global"?: CssModuleParserOptions;
17802
18408
 
17803
18409
  /**
17804
- * Parser options for css/module modules.
18410
+ * Parser options for css/auto and css/module modules.
17805
18411
  */
17806
- "css/module"?: CssModuleParserOptions;
18412
+ "css/module"?: CssAutoOrModuleParserOptions;
17807
18413
 
17808
18414
  /**
17809
18415
  * Parser options for javascript modules.
@@ -17845,6 +18451,22 @@ declare interface ParserStateBase {
17845
18451
  compilation: Compilation;
17846
18452
  options: WebpackOptionsNormalizedWithDefaults;
17847
18453
  }
18454
+ declare interface PathCacheFunctions {
18455
+ /**
18456
+ * cached join
18457
+ */
18458
+ join: JoinCacheEntry;
18459
+
18460
+ /**
18461
+ * cached dirname
18462
+ */
18463
+ dirname: DirnameCacheEntry;
18464
+
18465
+ /**
18466
+ * cached basename
18467
+ */
18468
+ basename: BasenameCacheEntry;
18469
+ }
17848
18470
  declare interface PathData {
17849
18471
  chunkGraph?: ChunkGraph;
17850
18472
  hash?: string;
@@ -17863,6 +18485,11 @@ declare interface PathData {
17863
18485
  local?: string;
17864
18486
  prepareId?: (id: string | number) => string | number;
17865
18487
  }
18488
+ type PathDataChunk = PathData & { chunk: Chunk | ChunkPathData };
18489
+ type PathDataModule = PathData & {
18490
+ module: Module | ModulePathData;
18491
+ chunkGraph: ChunkGraph;
18492
+ };
17866
18493
  type PathLikeFs = string | Buffer | URL;
17867
18494
  type PathLikeTypes = string | URL_url | Buffer;
17868
18495
  type PathOrFileDescriptorFs = string | number | Buffer | URL;
@@ -18102,6 +18729,18 @@ declare class ProgressPlugin {
18102
18729
  showDependencies: boolean;
18103
18730
  showActiveModules: boolean;
18104
18731
  percentBy: null | "entries" | "modules" | "dependencies";
18732
+ progressBar:
18733
+ | false
18734
+ | Required<{
18735
+ /**
18736
+ * Color used for the filled portion of the bar.
18737
+ */
18738
+ color?: string;
18739
+ /**
18740
+ * Name shown before the progress bar.
18741
+ */
18742
+ name?: string;
18743
+ }>;
18105
18744
 
18106
18745
  /**
18107
18746
  * Applies the plugin by registering its hooks on the compiler.
@@ -18117,7 +18756,19 @@ declare class ProgressPlugin {
18117
18756
  static defaultOptions: Required<Omit<ProgressPluginOptions, "handler">>;
18118
18757
  static createDefaultHandler: (
18119
18758
  profile: undefined | null | boolean,
18120
- logger: WebpackLogger
18759
+ logger: WebpackLogger,
18760
+ progressBar:
18761
+ | false
18762
+ | Required<{
18763
+ /**
18764
+ * Color used for the filled portion of the bar.
18765
+ */
18766
+ color?: string;
18767
+ /**
18768
+ * Name shown before the progress bar.
18769
+ */
18770
+ name?: string;
18771
+ }>
18121
18772
  ) => (percentage: number, msg: string, ...args: string[]) => void;
18122
18773
  }
18123
18774
  type ProgressPluginArgument =
@@ -18172,6 +18823,22 @@ declare interface ProgressPluginOptions {
18172
18823
  * Collect profile data for progress steps. Default: false.
18173
18824
  */
18174
18825
  profile?: null | boolean;
18826
+
18827
+ /**
18828
+ * Generate progress bar. Default: false.
18829
+ */
18830
+ progressBar?:
18831
+ | boolean
18832
+ | {
18833
+ /**
18834
+ * Color used for the filled portion of the bar.
18835
+ */
18836
+ color?: string;
18837
+ /**
18838
+ * Name shown before the progress bar.
18839
+ */
18840
+ name?: string;
18841
+ };
18175
18842
  }
18176
18843
  declare class ProvidePlugin {
18177
18844
  /**
@@ -18997,6 +19664,93 @@ type RecursiveArrayOrRecord<T> =
18997
19664
  | RecursiveArrayOrRecord<T>[]
18998
19665
  | T;
18999
19666
  declare interface RecursiveNonNullable<T> {}
19667
+ declare interface Reference {
19668
+ identifier: Identifier;
19669
+ from: Scope;
19670
+ resolved: null | Variable;
19671
+ writeExpr:
19672
+ | null
19673
+ | Program
19674
+ | ImportDeclaration
19675
+ | ExportNamedDeclaration
19676
+ | ExportAllDeclaration
19677
+ | ImportExpressionImport
19678
+ | UnaryExpression
19679
+ | ArrayExpression
19680
+ | ArrowFunctionExpression
19681
+ | AssignmentExpression
19682
+ | AwaitExpression
19683
+ | BinaryExpression
19684
+ | SimpleCallExpression
19685
+ | NewExpression
19686
+ | ChainExpression
19687
+ | ClassExpression
19688
+ | ConditionalExpression
19689
+ | FunctionExpression
19690
+ | Identifier
19691
+ | SimpleLiteral
19692
+ | RegExpLiteral
19693
+ | BigIntLiteral
19694
+ | LogicalExpression
19695
+ | MemberExpression
19696
+ | MetaProperty
19697
+ | ObjectExpression
19698
+ | SequenceExpression
19699
+ | TaggedTemplateExpression
19700
+ | TemplateLiteral
19701
+ | ThisExpression
19702
+ | UpdateExpression
19703
+ | YieldExpression
19704
+ | SpreadElement
19705
+ | PrivateIdentifier
19706
+ | Super
19707
+ | FunctionDeclaration
19708
+ | VariableDeclaration
19709
+ | ClassDeclaration
19710
+ | ExpressionStatement
19711
+ | BlockStatement
19712
+ | StaticBlock
19713
+ | EmptyStatement
19714
+ | DebuggerStatement
19715
+ | WithStatement
19716
+ | ReturnStatement
19717
+ | LabeledStatement
19718
+ | BreakStatement
19719
+ | ContinueStatement
19720
+ | IfStatement
19721
+ | SwitchStatement
19722
+ | ThrowStatement
19723
+ | TryStatement
19724
+ | WhileStatement
19725
+ | DoWhileStatement
19726
+ | ForStatement
19727
+ | ForInStatement
19728
+ | ForOfStatement
19729
+ | ExportDefaultDeclaration
19730
+ | MethodDefinition
19731
+ | PropertyDefinition
19732
+ | VariableDeclarator
19733
+ | AssignmentProperty
19734
+ | Property
19735
+ | CatchClause
19736
+ | ClassBody
19737
+ | ImportSpecifier
19738
+ | ImportDefaultSpecifier
19739
+ | ImportNamespaceSpecifier
19740
+ | ExportSpecifier
19741
+ | ObjectPattern
19742
+ | ArrayPattern
19743
+ | RestElement
19744
+ | AssignmentPattern
19745
+ | SwitchCase
19746
+ | TemplateElement;
19747
+ init: boolean;
19748
+ isWrite: () => boolean;
19749
+ isRead: () => boolean;
19750
+ isWriteOnly: () => boolean;
19751
+ isReadOnly: () => boolean;
19752
+ isReadWrite: () => boolean;
19753
+ }
19000
19754
  type ReferenceableItem = string | object;
19001
19755
  declare interface ReferencedExport {
19002
19756
  /**
@@ -19094,6 +19848,11 @@ declare interface RenderContextCssModulesPlugin {
19094
19848
  */
19095
19849
  undoPath: string;
19096
19850
 
19851
+ /**
19852
+ * compilation hash
19853
+ */
19854
+ hash?: string;
19855
+
19097
19856
  /**
19098
19857
  * modules
19099
19858
  */
@@ -19148,7 +19907,7 @@ declare interface RenderManifestEntryStatic {
19148
19907
  }
19149
19908
  declare interface RenderManifestEntryTemplated {
19150
19909
  render: () => Source;
19151
- filenameTemplate: TemplatePath;
19910
+ filenameTemplate: string | TemplatePathFn<any>;
19152
19911
  pathOptions?: PathData;
19153
19912
  info?: AssetInfo;
19154
19913
  identifier: string;
@@ -19260,9 +20019,9 @@ declare interface ResolveContext {
19260
20019
  missingDependencies?: WriteOnlySet<string>;
19261
20020
 
19262
20021
  /**
19263
- * set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
20022
+ * tip of the resolver call stack (a singly-linked list with Set-like API). For instance, `resolve → parsedResolve → describedResolve`. Accepts a legacy `Set<string>` for back-compat with older callers; it is normalized internally without a hot-path branch.
19264
20023
  */
19265
- stack?: Set<string>;
20024
+ stack?: Set<string> | StackEntry;
19266
20025
 
19267
20026
  /**
19268
20027
  * log function
@@ -19283,7 +20042,7 @@ declare interface ResolveData {
19283
20042
  attributes?: ImportAttributes;
19284
20043
  dependencies: ModuleDependency[];
19285
20044
  dependencyType: string;
19286
- createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
20045
+ createData: Partial<CreateData>;
19287
20046
  fileDependencies: LazySet<string>;
19288
20047
  missingDependencies: LazySet<string>;
19289
20048
  contextDependencies: LazySet<string>;
@@ -19538,6 +20297,11 @@ declare interface ResolveOptionsResolverFactoryObject1 {
19538
20297
  */
19539
20298
  extensionAlias: ExtensionAliasOption[];
19540
20299
 
20300
+ /**
20301
+ * apply extension alias to exports field targets
20302
+ */
20303
+ extensionAliasForExports: boolean;
20304
+
19541
20305
  /**
19542
20306
  * cache predicate
19543
20307
  */
@@ -19674,6 +20438,11 @@ declare interface ResolveOptionsResolverFactoryObject2 {
19674
20438
  */
19675
20439
  extensionAlias?: ExtensionAliasOptions;
19676
20440
 
20441
+ /**
20442
+ * Also apply `extensionAlias` to paths resolved through the package.json `exports` field. Off by default (Node.js-aligned); when enabled, matches TypeScript's behavior for packages that ship TS sources alongside compiled JS.
20443
+ */
20444
+ extensionAliasForExports?: boolean;
20445
+
19677
20446
  /**
19678
20447
  * A list of alias fields in description files
19679
20448
  */
@@ -19840,6 +20609,7 @@ declare interface ResolvedOptions {
19840
20609
  declare abstract class Resolver {
19841
20610
  fileSystem: FileSystem;
19842
20611
  options: ResolveOptionsResolverFactoryObject1;
20612
+ pathCache: PathCacheFunctions;
19843
20613
  hooks: KnownHooks;
19844
20614
  ensureHook(
19845
20615
  name:
@@ -19863,11 +20633,57 @@ declare abstract class Resolver {
19863
20633
  [ResolveRequest, ResolveContext],
19864
20634
  null | ResolveRequest
19865
20635
  >;
20636
+ resolveSync(
20637
+ path: string,
20638
+ request: string,
20639
+ resolveContext?: ResolveContext
20640
+ ): string | false;
19866
20641
  resolveSync(
19867
20642
  context: ContextTypes,
19868
20643
  path: string,
19869
- request: string
20644
+ request: string,
20645
+ resolveContext?: ResolveContext
19870
20646
  ): string | false;
20647
+ resolvePromise(
20648
+ path: string,
20649
+ request: string,
20650
+ resolveContext?: ResolveContext
20651
+ ): Promise<string | false>;
20652
+ resolvePromise(
20653
+ context: ContextTypes,
20654
+ path: string,
20655
+ request: string,
20656
+ resolveContext?: ResolveContext
20657
+ ): Promise<string | false>;
20658
+ resolve(
20659
+ path: string,
20660
+ request: string,
20661
+ callback: (
20662
+ err: null | ErrorWithDetail,
20663
+ res?: string | false,
20664
+ req?: ResolveRequest
20665
+ ) => void
20666
+ ): void;
20667
+ resolve(
20668
+ path: string,
20669
+ request: string,
20670
+ resolveContext: ResolveContext,
20671
+ callback: (
20672
+ err: null | ErrorWithDetail,
20673
+ res?: string | false,
20674
+ req?: ResolveRequest
20675
+ ) => void
20676
+ ): void;
20677
+ resolve(
20678
+ context: ContextTypes,
20679
+ path: string,
20680
+ request: string,
20681
+ callback: (
20682
+ err: null | ErrorWithDetail,
20683
+ res?: string | false,
20684
+ req?: ResolveRequest
20685
+ ) => void
20686
+ ): void;
19871
20687
  resolve(
19872
20688
  context: ContextTypes,
19873
20689
  path: string,
@@ -19893,8 +20709,10 @@ declare abstract class Resolver {
19893
20709
  isModule(path: string): boolean;
19894
20710
  isPrivate(path: string): boolean;
19895
20711
  isDirectory(path: string): boolean;
19896
- join(path: string, request: string): string;
19897
20712
  normalize(path: string): string;
20713
+ join(path: string, request: string): string;
20714
+ dirname(path: string): string;
20715
+ basename(path: string, suffix?: string): string;
19898
20716
  }
19899
20717
  declare interface ResolverCache {
19900
20718
  direct: WeakMap<ResolveOptionsWithDependencyType, ResolverWithOptions>;
@@ -21136,6 +21954,33 @@ declare interface RuntimeValueOptions {
21136
21954
  buildDependencies?: string[];
21137
21955
  version?: string | (() => string);
21138
21956
  }
21957
+ declare interface Scope {
21958
+ type:
21959
+ | "function"
21960
+ | "module"
21961
+ | "global"
21962
+ | "block"
21963
+ | "catch"
21964
+ | "class"
21965
+ | "class-field-initializer"
21966
+ | "class-static-block"
21967
+ | "for"
21968
+ | "function-expression-name"
21969
+ | "switch"
21970
+ | "with"
21971
+ | "TDZ";
21972
+ isStrict: boolean;
21973
+ upper: null | Scope;
21974
+ childScopes: Scope[];
21975
+ variableScope: Scope;
21976
+ block: NodeEstreeIndex;
21977
+ variables: Variable[];
21978
+ set: Map<string, Variable>;
21979
+ references: Reference[];
21980
+ through: Reference[];
21981
+ functionExpressionScope: boolean;
21982
+ implicit?: { variables: Variable[]; set: Map<string, Variable> };
21983
+ }
21139
21984
 
21140
21985
  /**
21141
21986
  * Helper function for joining two ranges into a single range. This is useful
@@ -21604,7 +22449,7 @@ declare abstract class SortableSet<T> extends Set<T> {
21604
22449
  /**
21605
22450
  * Get data from cache
21606
22451
  */
21607
- getFromCache<R extends unknown>(fn: (set: SortableSet<T>) => R): R;
22452
+ getFromCache<R>(fn: (set: SortableSet<T>) => R): R;
21608
22453
 
21609
22454
  /**
21610
22455
  * Get data from cache (ignoring sorting)
@@ -21620,6 +22465,7 @@ declare class Source {
21620
22465
  constructor();
21621
22466
  source(): SourceValue;
21622
22467
  buffer(): Buffer;
22468
+ buffers(): Buffer[];
21623
22469
  size(): number;
21624
22470
  map(options?: MapOptions): null | RawSourceMap;
21625
22471
  sourceAndMap(options?: MapOptions): SourceAndMap;
@@ -21647,6 +22493,11 @@ declare interface SourceLike {
21647
22493
  */
21648
22494
  buffer?: () => Buffer;
21649
22495
 
22496
+ /**
22497
+ * buffers
22498
+ */
22499
+ buffers?: () => Buffer[];
22500
+
21650
22501
  /**
21651
22502
  * size
21652
22503
  */
@@ -21673,10 +22524,7 @@ declare class SourceMapDevToolPlugin {
21673
22524
  */
21674
22525
  constructor(options?: SourceMapDevToolPluginOptions);
21675
22526
  sourceMapFilename?: null | string | false;
21676
- sourceMappingURLComment:
21677
- | string
21678
- | false
21679
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
22527
+ sourceMappingURLComment: string | false | TemplatePathFn<PathData>;
21680
22528
  moduleFilenameTemplate: DevtoolModuleFilenameTemplate;
21681
22529
  fallbackModuleFilenameTemplate: DevtoolFallbackModuleFilenameTemplate;
21682
22530
  namespace: string;
@@ -21691,11 +22539,7 @@ declare interface SourceMapDevToolPluginOptions {
21691
22539
  /**
21692
22540
  * Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
21693
22541
  */
21694
- append?:
21695
- | null
21696
- | string
21697
- | false
21698
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
22542
+ append?: null | string | false | TemplatePathFn<PathData>;
21699
22543
 
21700
22544
  /**
21701
22545
  * Indicates whether column mappings should be used (defaults to true).
@@ -21830,7 +22674,9 @@ declare interface SplitChunksOptions {
21830
22674
  maxAsyncRequests: number;
21831
22675
  maxInitialRequests: number;
21832
22676
  hidePathInfo: boolean;
21833
- filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
22677
+ filename?:
22678
+ | string
22679
+ | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
21834
22680
  automaticNameDelimiter: string;
21835
22681
  getCacheGroups: (
21836
22682
  module: Module,
@@ -21861,6 +22707,52 @@ declare interface SplitData {
21861
22707
  modules: string[];
21862
22708
  size: number;
21863
22709
  }
22710
+ declare abstract class StackEntry {
22711
+ name?: string;
22712
+ path: string | false;
22713
+ request: string;
22714
+ query: string;
22715
+ fragment: string;
22716
+ directory: boolean;
22717
+ module: boolean;
22718
+ parent?: StackEntry;
22719
+
22720
+ /**
22721
+ * Strings seeded by callers that still pass `stack: new Set([...])`.
22722
+ * Propagated through the chain so deeper `doResolve` calls still see
22723
+ * them during recursion checks. `undefined` in the common case so
22724
+ * there is no extra work on the hot path.
22725
+ */
22726
+ preSeeded?: Set<string>;
22727
+
22728
+ /**
22729
+ * Walk the linked list looking for an entry with the same request shape.
22730
+ * Set-compatible: callers that used `stack.has(entry)` keep working.
22731
+ * NOTE: kept monomorphic on purpose. An earlier draft accepted a string
22732
+ * query too (so pre-5.21 plugins keeping their own `Set<string>` of
22733
+ * seen entries could probe the live stack with the formatted form),
22734
+ * but adding the second shape regressed `doResolve`'s heap profile by
22735
+ * ~1 MiB / 200 resolves on stack-churn — V8 keeps a polymorphic
22736
+ * call-site state for `parent.has(stackEntry)` once `has` has two
22737
+ * argument shapes. Plugins that need string membership can reach for
22738
+ * `[...stack].find(e => e.includes(formattedString))` via the
22739
+ * `String`-method proxies on `StackEntry` instead.
22740
+ */
22741
+ has(query: StackEntry): boolean;
22742
+
22743
+ /**
22744
+ * Number of entries on the stack (oldest-to-newest length).
22745
+ */
22746
+ get size(): number;
22747
+
22748
+ /**
22749
+ * Human-readable form used in recursion error messages, logs, and the
22750
+ * iterator above. Not memoized: caching would require an extra slot on
22751
+ * every `StackEntry`, which costs heap even on resolves that never look
22752
+ * at the formatted form.
22753
+ */
22754
+ toString(): string;
22755
+ }
21864
22756
  declare abstract class StackedMap<K, V> {
21865
22757
  map: Map<K, InternalCell<V>>;
21866
22758
  stack: Map<K, InternalCell<V>>[];
@@ -22012,7 +22904,15 @@ declare interface StatOptionsTypes {
22012
22904
  bigint?: boolean;
22013
22905
  }
22014
22906
  declare interface StatSync {
22015
- (path: PathLikeFs, options?: undefined): IStatsFs;
22907
+ (path: PathLikeFs): IStatsFs;
22908
+ (
22909
+ path: PathLikeFs,
22910
+ options?: StatSyncOptions & { bigint?: false; throwIfNoEntry?: true }
22911
+ ): IStatsFs;
22912
+ (
22913
+ path: PathLikeFs,
22914
+ options: StatSyncOptions & { bigint: true; throwIfNoEntry?: true }
22915
+ ): IBigIntStatsFs;
22016
22916
  (
22017
22917
  path: PathLikeFs,
22018
22918
  options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
@@ -22021,14 +22921,9 @@ declare interface StatSync {
22021
22921
  path: PathLikeFs,
22022
22922
  options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
22023
22923
  ): undefined | IBigIntStatsFs;
22024
- (path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStatsFs;
22025
- (
22026
- path: PathLikeFs,
22027
- options: StatSyncOptions & { bigint: true }
22028
- ): IBigIntStatsFs;
22029
22924
  (
22030
22925
  path: PathLikeFs,
22031
- options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
22926
+ options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: true }
22032
22927
  ): IStatsFs | IBigIntStatsFs;
22033
22928
  (
22034
22929
  path: PathLikeFs,
@@ -22989,9 +23884,10 @@ declare class Template {
22989
23884
  static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
22990
23885
  static NUMBER_OF_IDENTIFIER_START_CHARS: number;
22991
23886
  }
22992
- type TemplatePath =
22993
- | string
22994
- | ((pathData: PathData, assetInfo?: AssetInfo) => string);
23887
+ type TemplatePath = string | TemplatePathFn<PathData>;
23888
+ declare interface TemplatePathFn<T extends PathData = PathData> {
23889
+ (pathData: T, assetInfo?: AssetInfo): string;
23890
+ }
22995
23891
  declare interface TimestampAndHash {
22996
23892
  safeTime: number;
22997
23893
  timestamp?: number;
@@ -23039,7 +23935,7 @@ declare interface TsconfigPathsData {
23039
23935
  /**
23040
23936
  * tsconfig file data
23041
23937
  */
23042
- alias: AliasOption[];
23938
+ alias: CompiledAliasOption[];
23043
23939
 
23044
23940
  /**
23045
23941
  * tsconfig file data
@@ -23067,6 +23963,11 @@ declare interface TsconfigPathsMap {
23067
23963
  */
23068
23964
  allContexts: { [index: string]: TsconfigPathsData };
23069
23965
 
23966
+ /**
23967
+ * precomputed `Object.keys(allContexts)` — read-only; used on the `_selectPathsDataForContext` hot path
23968
+ */
23969
+ contextList: string[];
23970
+
23070
23971
  /**
23071
23972
  * file dependencies
23072
23973
  */
@@ -23097,6 +23998,13 @@ type ValueCacheVersion = string | Set<string>;
23097
23998
  declare interface Values {
23098
23999
  [index: string]: Value[];
23099
24000
  }
24001
+ declare interface Variable {
24002
+ name: string;
24003
+ scope: Scope;
24004
+ identifiers: Identifier[];
24005
+ references: Reference[];
24006
+ defs: any[];
24007
+ }
23100
24008
  declare class VariableInfo {
23101
24009
  /**
23102
24010
  * Creates an instance of VariableInfo.
@@ -23677,7 +24585,7 @@ declare interface WebpackOptionsInterception {
23677
24585
  /**
23678
24586
  * Which asset type should receive this devtool value.
23679
24587
  */
23680
- type: "all" | "javascript" | "css";
24588
+ type: "css" | "all" | "javascript";
23681
24589
  /**
23682
24590
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
23683
24591
  */
@@ -23729,7 +24637,7 @@ declare interface WebpackOptionsNormalized {
23729
24637
  /**
23730
24638
  * Which asset type should receive this devtool value.
23731
24639
  */
23732
- type: "all" | "javascript" | "css";
24640
+ type: "css" | "all" | "javascript";
23733
24641
  /**
23734
24642
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
23735
24643
  */
@@ -23788,6 +24696,7 @@ declare interface WebpackOptionsNormalized {
23788
24696
  | "script"
23789
24697
  | "node-commonjs"
23790
24698
  | "asset"
24699
+ | "asset-url"
23791
24700
  | "css-import"
23792
24701
  | "css-url";
23793
24702
 
@@ -23824,7 +24733,7 @@ declare interface WebpackOptionsNormalized {
23824
24733
  /**
23825
24734
  * Include polyfills or mocks for various node stuff.
23826
24735
  */
23827
- node: Node;
24736
+ node: NodeWebpackOptions;
23828
24737
 
23829
24738
  /**
23830
24739
  * Enables/Disables integrated optimizations.
@@ -23924,18 +24833,18 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
23924
24833
  /**
23925
24834
  * Which asset type should receive this devtool value.
23926
24835
  */
23927
- type: "all" | "javascript" | "css";
24836
+ type: "css" | "all" | "javascript";
23928
24837
  /**
23929
24838
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
23930
24839
  */
23931
24840
  use: RawDevTool;
23932
24841
  }[]
23933
24842
  >;
23934
- } & { stats: NonNullable<StatsValue> } & { node: NonNullable<Node> } & {
23935
- profile: NonNullable<undefined | boolean>;
23936
- } & { parallelism: number } & { snapshot: SnapshotNormalizedWithDefaults } & {
23937
- externalsPresets: ExternalsPresetsNormalizedWithDefaults;
23938
- } & {
24843
+ } & { stats: NonNullable<StatsValue> } & {
24844
+ node: NonNullable<NodeWebpackOptions>;
24845
+ } & { profile: NonNullable<undefined | boolean> } & { parallelism: number } & {
24846
+ snapshot: SnapshotNormalizedWithDefaults;
24847
+ } & { externalsPresets: ExternalsPresetsNormalizedWithDefaults } & {
23939
24848
  externalsType: NonNullable<
23940
24849
  | undefined
23941
24850
  | "import"
@@ -23961,6 +24870,7 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
23961
24870
  | "script"
23962
24871
  | "node-commonjs"
23963
24872
  | "asset"
24873
+ | "asset-url"
23964
24874
  | "css-import"
23965
24875
  | "css-url"
23966
24876
  >;
@@ -24232,7 +25142,6 @@ declare namespace exports {
24232
25142
  export let createScript: "__webpack_require__.ts";
24233
25143
  export let createScriptUrl: "__webpack_require__.tu";
24234
25144
  export let cssInjectStyle: "__webpack_require__.is";
24235
- export let cssMergeStyleSheets: "__webpack_require__.mcs";
24236
25145
  export let currentRemoteGetScope: "__webpack_require__.R";
24237
25146
  export let deferredModuleAsyncTransitiveDependencies: "__webpack_require__.zT";
24238
25147
  export let deferredModuleAsyncTransitiveDependenciesSymbol: "__webpack_require__.zS";
@@ -24290,6 +25199,7 @@ declare namespace exports {
24290
25199
  export let returnExportsFromRuntime: "return-exports-from-runtime";
24291
25200
  export let runtimeId: "__webpack_require__.j";
24292
25201
  export let scriptNonce: "__webpack_require__.nc";
25202
+ export let setAnonymousDefaultName: "__webpack_require__.dn";
24293
25203
  export let shareScopeMap: "__webpack_require__.S";
24294
25204
  export let startup: "__webpack_require__.x";
24295
25205
  export let startupEntrypoint: "__webpack_require__.X";
@@ -24456,6 +25366,14 @@ declare namespace exports {
24456
25366
  export namespace library {
24457
25367
  export { AbstractLibraryPlugin, EnableLibraryPlugin };
24458
25368
  }
25369
+ export namespace dll {
25370
+ export {
25371
+ DelegatedPlugin,
25372
+ DllPlugin,
25373
+ DllReferencePlugin,
25374
+ LibManifestPlugin
25375
+ };
25376
+ }
24459
25377
  export namespace container {
24460
25378
  export const scope: <T>(
24461
25379
  scope: string,
@@ -24747,10 +25665,7 @@ declare namespace exports {
24747
25665
  ContextExclusionPlugin,
24748
25666
  ContextReplacementPlugin,
24749
25667
  DefinePlugin,
24750
- DelegatedPlugin,
24751
25668
  Dependency,
24752
- DllPlugin,
24753
- DllReferencePlugin,
24754
25669
  DynamicEntryPlugin,
24755
25670
  DotenvPlugin,
24756
25671
  EntryOptionPlugin,
@@ -24766,7 +25681,6 @@ declare namespace exports {
24766
25681
  InitFragment,
24767
25682
  IgnorePlugin,
24768
25683
  JavascriptModulesPlugin,
24769
- LibManifestPlugin,
24770
25684
  LibraryTemplatePlugin,
24771
25685
  LoaderOptionsPlugin,
24772
25686
  LoaderTargetPlugin,
@@ -24795,6 +25709,10 @@ declare namespace exports {
24795
25709
  WebpackOptionsDefaulter,
24796
25710
  ValidationError as WebpackOptionsValidationError,
24797
25711
  ValidationError,
25712
+ DelegatedPlugin,
25713
+ DllPlugin,
25714
+ DllReferencePlugin,
25715
+ LibManifestPlugin,
24798
25716
  EntryLibIndex as Entry,
24799
25717
  EntryNormalized,
24800
25718
  EntryObject,
@@ -24826,6 +25744,8 @@ declare namespace exports {
24826
25744
  AssetInfo,
24827
25745
  EntryOptions,
24828
25746
  PathData,
25747
+ PathDataChunk,
25748
+ PathDataModule,
24829
25749
  CodeGenerationResults,
24830
25750
  Entrypoint,
24831
25751
  ExternalItemFunctionData,