webpack 5.104.1 → 5.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/bin/webpack.js +6 -3
  2. package/lib/APIPlugin.js +85 -15
  3. package/lib/AbstractMethodError.js +1 -0
  4. package/lib/AsyncDependenciesBlock.js +13 -1
  5. package/lib/AsyncDependencyToInitialChunkError.js +1 -0
  6. package/lib/AutomaticPrefetchPlugin.js +1 -1
  7. package/lib/BannerPlugin.js +2 -0
  8. package/lib/CacheFacade.js +2 -2
  9. package/lib/CaseSensitiveModulesWarning.js +1 -0
  10. package/lib/Chunk.js +8 -4
  11. package/lib/ChunkGraph.js +30 -9
  12. package/lib/ChunkGroup.js +6 -3
  13. package/lib/ChunkRenderError.js +2 -0
  14. package/lib/CleanPlugin.js +4 -1
  15. package/lib/CodeGenerationError.js +7 -1
  16. package/lib/CodeGenerationResults.js +10 -3
  17. package/lib/CommentCompilationWarning.js +2 -1
  18. package/lib/Compilation.js +280 -236
  19. package/lib/Compiler.js +3 -2
  20. package/lib/ConcatenationScope.js +2 -1
  21. package/lib/ConcurrentCompilationError.js +3 -3
  22. package/lib/ContextModule.js +248 -111
  23. package/lib/ContextModuleFactory.js +14 -2
  24. package/lib/DefinePlugin.js +3 -1
  25. package/lib/DelegatedModule.js +6 -0
  26. package/lib/DelegatedModuleFactoryPlugin.js +2 -0
  27. package/lib/Dependency.js +6 -1
  28. package/lib/DependencyTemplates.js +3 -2
  29. package/lib/DllModule.js +2 -0
  30. package/lib/DllReferencePlugin.js +1 -0
  31. package/lib/DotenvPlugin.js +11 -5
  32. package/lib/DynamicEntryPlugin.js +1 -0
  33. package/lib/EnvironmentNotSupportAsyncWarning.js +1 -0
  34. package/lib/EvalSourceMapDevToolPlugin.js +17 -13
  35. package/lib/ExportsInfo.js +8 -4
  36. package/lib/ExternalModule.js +16 -0
  37. package/lib/FalseIIFEUmdWarning.js +1 -0
  38. package/lib/FileSystemInfo.js +49 -25
  39. package/lib/FlagDependencyExportsPlugin.js +8 -1
  40. package/lib/FlagDependencyUsagePlugin.js +9 -7
  41. package/lib/HarmonyLinkingError.js +1 -0
  42. package/lib/HookWebpackError.js +2 -0
  43. package/lib/HotModuleReplacementPlugin.js +16 -2
  44. package/lib/InitFragment.js +1 -0
  45. package/lib/InvalidDependenciesModuleWarning.js +1 -0
  46. package/lib/LibManifestPlugin.js +1 -0
  47. package/lib/ManifestPlugin.js +4 -1
  48. package/lib/Module.js +7 -4
  49. package/lib/ModuleBuildError.js +3 -1
  50. package/lib/ModuleDependencyError.js +1 -0
  51. package/lib/ModuleDependencyWarning.js +1 -0
  52. package/lib/ModuleError.js +2 -1
  53. package/lib/ModuleFilenameHelpers.js +2 -1
  54. package/lib/ModuleGraph.js +3 -0
  55. package/lib/ModuleGraphConnection.js +10 -1
  56. package/lib/ModuleHashingError.js +2 -0
  57. package/lib/ModuleInfoHeaderPlugin.js +6 -1
  58. package/lib/ModuleNotFoundError.js +1 -0
  59. package/lib/ModuleParseError.js +5 -1
  60. package/lib/ModuleProfile.js +1 -1
  61. package/lib/ModuleRestoreError.js +2 -0
  62. package/lib/ModuleSourceTypeConstants.js +1 -11
  63. package/lib/ModuleStoreError.js +2 -0
  64. package/lib/ModuleWarning.js +3 -1
  65. package/lib/MultiCompiler.js +11 -7
  66. package/lib/MultiWatching.js +2 -2
  67. package/lib/NoModeWarning.js +1 -0
  68. package/lib/NodeStuffInWebError.js +1 -0
  69. package/lib/NormalModule.js +26 -5
  70. package/lib/NormalModuleFactory.js +20 -4
  71. package/lib/OptionsApply.js +3 -1
  72. package/lib/ProgressPlugin.js +4 -0
  73. package/lib/RawModule.js +2 -0
  74. package/lib/RuntimeModule.js +10 -0
  75. package/lib/RuntimePlugin.js +7 -9
  76. package/lib/RuntimeTemplate.js +14 -7
  77. package/lib/SourceMapDevToolPlugin.js +30 -23
  78. package/lib/Template.js +10 -5
  79. package/lib/TemplatedPathPlugin.js +4 -2
  80. package/lib/UnhandledSchemeError.js +1 -0
  81. package/lib/UnsupportedFeatureWarning.js +1 -0
  82. package/lib/WarnDeprecatedOptionPlugin.js +1 -0
  83. package/lib/WatchIgnorePlugin.js +1 -1
  84. package/lib/Watching.js +5 -0
  85. package/lib/WebpackError.js +4 -0
  86. package/lib/WebpackOptionsApply.js +60 -40
  87. package/lib/asset/AssetBytesGenerator.js +1 -0
  88. package/lib/asset/AssetGenerator.js +9 -3
  89. package/lib/asset/AssetModulesPlugin.js +33 -2
  90. package/lib/asset/AssetSourceGenerator.js +1 -0
  91. package/lib/asset/RawDataUrlModule.js +4 -0
  92. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -1
  93. package/lib/buildChunkGraph.js +31 -2
  94. package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
  95. package/lib/cache/PackFileCacheStrategy.js +41 -8
  96. package/lib/cache/getLazyHashedEtag.js +13 -4
  97. package/lib/cache/mergeEtags.js +3 -1
  98. package/lib/cli.js +3 -1
  99. package/lib/config/defaults.js +65 -44
  100. package/lib/config/normalization.js +96 -0
  101. package/lib/container/ContainerEntryModule.js +4 -0
  102. package/lib/container/FallbackModule.js +2 -0
  103. package/lib/container/HoistContainerReferencesPlugin.js +6 -0
  104. package/lib/container/RemoteModule.js +19 -0
  105. package/lib/css/CssGenerator.js +31 -4
  106. package/lib/css/CssModulesPlugin.js +26 -30
  107. package/lib/css/CssParser.js +12 -9
  108. package/lib/debug/ProfilingPlugin.js +1 -0
  109. package/lib/dependencies/AMDDefineDependency.js +3 -1
  110. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -0
  111. package/lib/dependencies/AMDPlugin.js +1 -1
  112. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +7 -1
  113. package/lib/dependencies/CachedConstDependency.js +1 -0
  114. package/lib/dependencies/CommonJsDependencyHelpers.js +2 -0
  115. package/lib/dependencies/CommonJsExportRequireDependency.js +1 -0
  116. package/lib/dependencies/CommonJsFullRequireDependency.js +2 -0
  117. package/lib/dependencies/CommonJsImportsParserPlugin.js +3 -0
  118. package/lib/dependencies/CommonJsRequireContextDependency.js +2 -2
  119. package/lib/dependencies/CommonJsSelfReferenceDependency.js +1 -0
  120. package/lib/dependencies/ConstDependency.js +1 -0
  121. package/lib/dependencies/ContextDependencyHelpers.js +11 -4
  122. package/lib/dependencies/ContextElementDependency.js +1 -0
  123. package/lib/dependencies/CriticalDependencyWarning.js +1 -0
  124. package/lib/dependencies/CssIcssExportDependency.js +5 -4
  125. package/lib/dependencies/CssIcssSymbolDependency.js +1 -0
  126. package/lib/dependencies/CssUrlDependency.js +2 -3
  127. package/lib/dependencies/ExternalModuleInitFragment.js +4 -1
  128. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +0 -9
  129. package/lib/dependencies/HarmonyAcceptDependency.js +3 -0
  130. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +1 -0
  131. package/lib/dependencies/HarmonyExportExpressionDependency.js +4 -0
  132. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +8 -1
  133. package/lib/dependencies/HarmonyExportInitFragment.js +17 -3
  134. package/lib/dependencies/HarmonyExportSpecifierDependency.js +4 -0
  135. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +266 -5
  136. package/lib/dependencies/HarmonyImportSpecifierDependency.js +22 -3
  137. package/lib/dependencies/ImportDependency.js +1 -0
  138. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -0
  139. package/lib/dependencies/ImportMetaPlugin.js +53 -11
  140. package/lib/dependencies/ImportParserPlugin.js +7 -12
  141. package/lib/dependencies/LoaderPlugin.js +3 -0
  142. package/lib/dependencies/ModuleDecoratorDependency.js +1 -0
  143. package/lib/dependencies/ModuleDependency.js +1 -0
  144. package/lib/dependencies/ModuleInitFragmentDependency.js +87 -0
  145. package/lib/dependencies/ProvidedDependency.js +1 -0
  146. package/lib/dependencies/RequireContextPlugin.js +1 -0
  147. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +7 -2
  148. package/lib/dependencies/RuntimeRequirementsDependency.js +1 -0
  149. package/lib/dependencies/WorkerDependency.js +9 -3
  150. package/lib/dependencies/WorkerPlugin.js +1 -0
  151. package/lib/dependencies/getFunctionExpression.js +3 -1
  152. package/lib/errors/BuildCycleError.js +4 -1
  153. package/lib/esm/ModuleChunkFormatPlugin.js +6 -4
  154. package/lib/esm/ModuleChunkLoadingPlugin.js +1 -0
  155. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -0
  156. package/lib/hmr/LazyCompilationPlugin.js +5 -0
  157. package/lib/hmr/lazyCompilationBackend.js +3 -2
  158. package/lib/ids/ChunkModuleIdRangePlugin.js +2 -0
  159. package/lib/ids/IdHelpers.js +10 -8
  160. package/lib/ids/OccurrenceModuleIdsPlugin.js +15 -7
  161. package/lib/ids/SyncModuleIdsPlugin.js +5 -1
  162. package/lib/javascript/BasicEvaluatedExpression.js +1 -0
  163. package/lib/javascript/EnableChunkLoadingPlugin.js +5 -2
  164. package/lib/javascript/JavascriptModulesPlugin.js +29 -8
  165. package/lib/javascript/JavascriptParser.js +47 -14
  166. package/lib/json/JsonParser.js +6 -0
  167. package/lib/library/AbstractLibraryPlugin.js +4 -1
  168. package/lib/library/AmdLibraryPlugin.js +2 -1
  169. package/lib/library/AssignLibraryPlugin.js +6 -2
  170. package/lib/library/EnableLibraryPlugin.js +1 -0
  171. package/lib/library/ExportPropertyLibraryPlugin.js +1 -1
  172. package/lib/library/JsonpLibraryPlugin.js +1 -1
  173. package/lib/library/ModuleLibraryPlugin.js +130 -13
  174. package/lib/library/SystemLibraryPlugin.js +4 -1
  175. package/lib/library/UmdLibraryPlugin.js +4 -3
  176. package/lib/logging/createConsoleLogger.js +3 -0
  177. package/lib/logging/truncateArgs.js +1 -1
  178. package/lib/node/CommonJsChunkLoadingPlugin.js +1 -0
  179. package/lib/node/NodeTargetPlugin.js +1 -0
  180. package/lib/node/NodeWatchFileSystem.js +3 -0
  181. package/lib/node/nodeConsole.js +18 -1
  182. package/lib/optimize/AggressiveMergingPlugin.js +2 -1
  183. package/lib/optimize/AggressiveSplittingPlugin.js +10 -6
  184. package/lib/optimize/ConcatenatedModule.js +33 -19
  185. package/lib/optimize/FlagIncludedChunksPlugin.js +11 -1
  186. package/lib/optimize/InnerGraph.js +5 -3
  187. package/lib/optimize/InnerGraphPlugin.js +25 -25
  188. package/lib/optimize/MangleExportsPlugin.js +14 -2
  189. package/lib/optimize/MergeDuplicateChunksPlugin.js +3 -0
  190. package/lib/optimize/MinChunkSizePlugin.js +5 -2
  191. package/lib/optimize/ModuleConcatenationPlugin.js +19 -4
  192. package/lib/optimize/RealContentHashPlugin.js +35 -27
  193. package/lib/optimize/RemoveParentModulesPlugin.js +12 -3
  194. package/lib/optimize/SideEffectsFlagPlugin.js +3 -0
  195. package/lib/optimize/SplitChunksPlugin.js +14 -3
  196. package/lib/performance/AssetsOverSizeLimitWarning.js +6 -2
  197. package/lib/performance/EntrypointsOverSizeLimitWarning.js +6 -2
  198. package/lib/performance/NoAsyncChunksWarning.js +1 -0
  199. package/lib/rules/BasicEffectRulePlugin.js +2 -0
  200. package/lib/rules/BasicMatcherRulePlugin.js +3 -0
  201. package/lib/rules/ObjectMatcherRulePlugin.js +5 -1
  202. package/lib/rules/RuleSetCompiler.js +2 -0
  203. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -0
  204. package/lib/runtime/ChunkNameRuntimeModule.js +1 -0
  205. package/lib/runtime/CompatRuntimeModule.js +1 -0
  206. package/lib/runtime/EnsureChunkRuntimeModule.js +1 -0
  207. package/lib/runtime/GetChunkFilenameRuntimeModule.js +4 -0
  208. package/lib/runtime/GetMainFilenameRuntimeModule.js +2 -0
  209. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -0
  210. package/lib/runtime/LoadScriptRuntimeModule.js +2 -0
  211. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +15 -32
  212. package/lib/runtime/PublicPathRuntimeModule.js +1 -0
  213. package/lib/runtime/StartupChunkDependenciesPlugin.js +2 -0
  214. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -0
  215. package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -0
  216. package/lib/schemes/HttpUriPlugin.js +27 -7
  217. package/lib/schemes/VirtualUrlPlugin.js +7 -2
  218. package/lib/serialization/BinaryMiddleware.js +4 -0
  219. package/lib/serialization/FileMiddleware.js +9 -4
  220. package/lib/serialization/ObjectMiddleware.js +34 -11
  221. package/lib/serialization/PlainObjectSerializer.js +2 -0
  222. package/lib/sharing/ConsumeSharedModule.js +60 -0
  223. package/lib/sharing/ConsumeSharedPlugin.js +5 -4
  224. package/lib/sharing/ProvideSharedModule.js +4 -0
  225. package/lib/sharing/ProvideSharedPlugin.js +24 -25
  226. package/lib/sharing/resolveMatchedConfigs.js +2 -2
  227. package/lib/sharing/utils.js +8 -6
  228. package/lib/stats/DefaultStatsFactoryPlugin.js +14 -12
  229. package/lib/stats/DefaultStatsPrinterPlugin.js +6 -5
  230. package/lib/stats/StatsFactory.js +2 -2
  231. package/lib/url/URLParserPlugin.js +4 -3
  232. package/lib/util/AppendOnlyStackedSet.js +57 -0
  233. package/lib/util/Hash.js +1 -0
  234. package/lib/util/IterableHelpers.js +1 -0
  235. package/lib/util/LazyBucketSortedSet.js +1 -0
  236. package/lib/util/LazySet.js +1 -0
  237. package/lib/util/ParallelismFactorCalculator.js +1 -0
  238. package/lib/util/SortableSet.js +1 -0
  239. package/lib/util/StringXor.js +1 -0
  240. package/lib/util/binarySearchBounds.js +15 -8
  241. package/lib/util/chainedImports.js +1 -1
  242. package/lib/util/cleverMerge.js +6 -1
  243. package/lib/util/comparators.js +21 -1
  244. package/lib/util/compileBooleanMatcher.js +3 -3
  245. package/lib/util/concatenate.js +3 -2
  246. package/lib/util/conventions.js +3 -2
  247. package/lib/util/deterministicGrouping.js +13 -1
  248. package/lib/util/extractSourceMap.js +12 -13
  249. package/lib/util/fs.js +15 -19
  250. package/lib/util/hash/BatchedHash.js +3 -0
  251. package/lib/util/hash/BulkUpdateHash.js +7 -1
  252. package/lib/util/hash/hash-digest.js +1 -0
  253. package/lib/util/hash/wasm-hash.js +16 -1
  254. package/lib/util/identifier.js +7 -2
  255. package/lib/util/magicComment.js +1 -1
  256. package/lib/util/propertyName.js +1 -1
  257. package/lib/util/registerExternalSerializer.js +1 -0
  258. package/lib/util/runtime.js +15 -1
  259. package/lib/util/semver.js +1 -0
  260. package/lib/util/serialization.js +2 -2
  261. package/lib/wasm/EnableWasmLoadingPlugin.js +1 -0
  262. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +11 -3
  263. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -0
  264. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -2
  265. package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +5 -1
  266. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +3 -0
  267. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +2 -0
  268. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -3
  269. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
  270. package/lib/wasm-sync/WebAssemblyParser.js +3 -1
  271. package/lib/web/FetchCompileWasmPlugin.js +1 -0
  272. package/lib/web/JsonpChunkLoadingPlugin.js +1 -0
  273. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -0
  274. package/lib/webpack.js +13 -3
  275. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +1 -0
  276. package/package.json +20 -28
  277. package/schemas/WebpackOptions.check.js +1 -1
  278. package/schemas/WebpackOptions.json +71 -5
  279. package/types.d.ts +339 -93
package/types.d.ts CHANGED
@@ -124,12 +124,9 @@ import {
124
124
  TypedHookMap
125
125
  } from "tapable";
126
126
  import { URL } from "url";
127
- import { Context } from "vm";
127
+ import { Context as ContextImport } from "vm";
128
128
 
129
129
  declare interface Abortable {
130
- /**
131
- * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
132
- */
133
130
  signal?: AbortSignal;
134
131
  }
135
132
  declare class AbstractLibraryPlugin<T> {
@@ -139,7 +136,7 @@ declare class AbstractLibraryPlugin<T> {
139
136
  * Apply the plugin
140
137
  */
141
138
  apply(compiler: Compiler): void;
142
- parseOptions(library: LibraryOptions): false | T;
139
+ parseOptions(library: LibraryOptions): T;
143
140
  finishEntryModule(
144
141
  module: Module,
145
142
  entryName: string,
@@ -273,6 +270,12 @@ type AnyLoaderContext = NormalModuleLoaderContext<any> &
273
270
  LoaderRunnerLoaderContext<any> &
274
271
  LoaderPluginLoaderContext &
275
272
  HotModuleReplacementPluginLoaderContext;
273
+ declare abstract class AppendOnlyStackedSet<T> {
274
+ add(el: T): void;
275
+ has(el: T): boolean;
276
+ clear(): void;
277
+ createChild(): AppendOnlyStackedSet<T>;
278
+ }
276
279
  declare interface Argument {
277
280
  description?: string;
278
281
  simpleType: SimpleType;
@@ -461,16 +464,17 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
461
464
  | string
462
465
  | (RawChunkGroupOptions & { name?: null | string } & {
463
466
  entryOptions?: EntryOptions;
464
- }),
467
+ } & { circular?: boolean }),
465
468
  loc?: null | SyntheticDependencyLocation | RealDependencyLocation,
466
469
  request?: null | string
467
470
  );
468
471
  groupOptions: RawChunkGroupOptions & { name?: null | string } & {
469
472
  entryOptions?: EntryOptions;
470
- };
473
+ } & { circular?: boolean };
471
474
  loc?: null | SyntheticDependencyLocation | RealDependencyLocation;
472
475
  request?: null | string;
473
476
  chunkName?: null | string;
477
+ get circular(): boolean;
474
478
  module: any;
475
479
  }
476
480
  declare abstract class AsyncQueue<T, K, R> {
@@ -603,7 +607,7 @@ declare interface BaseResolveRequest {
603
607
  /**
604
608
  * content
605
609
  */
606
- context?: object;
610
+ context?: ContextTypes;
607
611
 
608
612
  /**
609
613
  * description file path
@@ -620,6 +624,11 @@ declare interface BaseResolveRequest {
620
624
  */
621
625
  descriptionFileData?: JsonObjectTypes;
622
626
 
627
+ /**
628
+ * tsconfig paths map
629
+ */
630
+ tsconfigPathsMap?: null | TsconfigPathsMap;
631
+
623
632
  /**
624
633
  * relative path
625
634
  */
@@ -1337,8 +1346,12 @@ declare interface ChunkChildIdsByOrdersMap {
1337
1346
  declare interface ChunkChildIdsByOrdersMapByData {
1338
1347
  [index: string]: ChunkChildIdsByOrdersMap;
1339
1348
  }
1349
+ declare interface ChunkConditionMap {
1350
+ [index: number]: boolean;
1351
+ [index: string]: boolean;
1352
+ }
1340
1353
  declare class ChunkGraph {
1341
- constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
1354
+ constructor(moduleGraph: ModuleGraph, hashFunction?: HashFunction);
1342
1355
  moduleGraph: ModuleGraph;
1343
1356
  connectChunkAndModule(chunk: Chunk, module: Module): void;
1344
1357
  disconnectChunkAndModule(chunk: Chunk, module: Module): void;
@@ -1404,7 +1417,7 @@ declare class ChunkGraph {
1404
1417
  getChunkConditionMap(
1405
1418
  chunk: Chunk,
1406
1419
  filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean
1407
- ): Record<ChunkId, boolean>;
1420
+ ): ChunkConditionMap;
1408
1421
  hasModuleInGraph(
1409
1422
  chunk: Chunk,
1410
1423
  filterFn: (m: Module) => boolean,
@@ -2003,6 +2016,7 @@ type CodeGenerationResultData = Map<"topLevelDeclarations", Set<string>> &
2003
2016
  Map<"filename", string> &
2004
2017
  Map<"assetInfo", AssetInfo> &
2005
2018
  Map<"fullContentHash", string> &
2019
+ Map<"url", { javascript: string }> &
2006
2020
  Map<"share-init", [{ shareScope: string; initStage: number; init: string }]> &
2007
2021
  Map<string, any>;
2008
2022
  declare abstract class CodeGenerationResults {
@@ -2811,8 +2825,22 @@ declare class Compiler {
2811
2825
  immutablePaths: Set<string | RegExp>;
2812
2826
  modifiedFiles?: ReadonlySet<string>;
2813
2827
  removedFiles?: ReadonlySet<string>;
2814
- fileTimestamps?: Map<string, FileSystemInfoEntry | "ignore">;
2815
- contextTimestamps?: Map<string, FileSystemInfoEntry | "ignore">;
2828
+ fileTimestamps?: Map<
2829
+ string,
2830
+ | null
2831
+ | EntryTypesIndex
2832
+ | OnlySafeTimeEntry
2833
+ | ExistenceOnlyTimeEntryTypesIndex
2834
+ | "ignore"
2835
+ >;
2836
+ contextTimestamps?: Map<
2837
+ string,
2838
+ | null
2839
+ | EntryTypesIndex
2840
+ | OnlySafeTimeEntry
2841
+ | ExistenceOnlyTimeEntryTypesIndex
2842
+ | "ignore"
2843
+ >;
2816
2844
  fsStartTime?: number;
2817
2845
  resolverFactory: ResolverFactory;
2818
2846
  infrastructureLogger?: (
@@ -3019,7 +3047,19 @@ declare interface Configuration {
3019
3047
  /**
3020
3048
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
3021
3049
  */
3022
- devtool?: string | false;
3050
+ devtool?:
3051
+ | string
3052
+ | false
3053
+ | {
3054
+ /**
3055
+ * Which asset type should receive this devtool value.
3056
+ */
3057
+ type: "all" | "javascript" | "css";
3058
+ /**
3059
+ * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
3060
+ */
3061
+ use: RawDevTool;
3062
+ }[];
3023
3063
 
3024
3064
  /**
3025
3065
  * Enable and configure the Dotenv plugin to load environment variables from .env files.
@@ -3520,6 +3560,7 @@ declare interface ContextOptions {
3520
3560
  referencedExports?: null | string[][];
3521
3561
  layer?: null | string;
3522
3562
  attributes?: ImportAttributes;
3563
+ phase?: 0 | 1 | 2;
3523
3564
  }
3524
3565
  declare class ContextReplacementPlugin {
3525
3566
  constructor(
@@ -3561,7 +3602,6 @@ declare interface ContextResolveData {
3561
3602
  contextDependencies: LazySet<string>;
3562
3603
  dependencies: ContextDependency[];
3563
3604
  }
3564
- type ContextTimestamp = null | ContextFileSystemInfoEntry | "ignore";
3565
3605
  declare interface ContextTimestampAndHash {
3566
3606
  safeTime: number;
3567
3607
  timestampHash?: string;
@@ -3569,6 +3609,7 @@ declare interface ContextTimestampAndHash {
3569
3609
  resolved?: ResolvedContextTimestampAndHash;
3570
3610
  symlinks?: Set<string>;
3571
3611
  }
3612
+ type ContextTypes = KnownContext & Record<any, any>;
3572
3613
  type CreateReadStreamFSImplementation = FSImplementation & {
3573
3614
  read: (...args: any[]) => any;
3574
3615
  };
@@ -3784,14 +3825,14 @@ declare class CssModulesPlugin {
3784
3825
  apply(compiler: Compiler): void;
3785
3826
  getModulesInOrder(
3786
3827
  chunk: Chunk,
3787
- modules: Iterable<Module>,
3828
+ modules: undefined | Iterable<Module>,
3788
3829
  compilation: Compilation
3789
3830
  ): Module[];
3790
3831
  getOrderedChunkCssModules(
3791
3832
  chunk: Chunk,
3792
3833
  chunkGraph: ChunkGraph,
3793
3834
  compilation: Compilation
3794
- ): Module[];
3835
+ ): CssModule[];
3795
3836
  renderChunk(
3796
3837
  __0: RenderContextCssModulesPlugin,
3797
3838
  hooks: CompilationHooksCssModulesPlugin
@@ -3859,7 +3900,7 @@ declare abstract class CssParser extends ParserClass {
3859
3900
  defaultMode?: "global" | "auto" | "pure" | "local";
3860
3901
  };
3861
3902
  comments?: CommentCssParser[];
3862
- magicCommentContext: Context;
3903
+ magicCommentContext: ContextImport;
3863
3904
  getComments(range: [number, number]): CommentCssParser[];
3864
3905
  parseCommentOptions(range: [number, number]): {
3865
3906
  options: null | Record<string, any>;
@@ -4613,11 +4654,6 @@ type EncodingOption =
4613
4654
  | "binary"
4614
4655
  | "hex"
4615
4656
  | ObjectEncodingOptions;
4616
- type Entry =
4617
- | string
4618
- | (() => string | EntryObject | string[] | Promise<EntryStatic>)
4619
- | EntryObject
4620
- | string[];
4621
4657
  declare interface EntryData {
4622
4658
  /**
4623
4659
  * dependencies of the entrypoint that should be evaluated at startup
@@ -4756,6 +4792,11 @@ declare interface EntryDescriptionNormalized {
4756
4792
  wasmLoading?: string | false;
4757
4793
  }
4758
4794
  type EntryItem = string | string[];
4795
+ type EntryLibIndex =
4796
+ | string
4797
+ | (() => string | EntryObject | string[] | Promise<EntryStatic>)
4798
+ | EntryObject
4799
+ | string[];
4759
4800
  type EntryNormalized =
4760
4801
  | (() => Promise<EntryStaticNormalized>)
4761
4802
  | EntryStaticNormalized;
@@ -4810,6 +4851,11 @@ type EntryStatic = string | EntryObject | string[];
4810
4851
  declare interface EntryStaticNormalized {
4811
4852
  [index: string]: EntryDescriptionNormalized;
4812
4853
  }
4854
+ declare interface EntryTypesIndex {
4855
+ safeTime: number;
4856
+ timestamp: number;
4857
+ accuracy: number;
4858
+ }
4813
4859
  declare abstract class Entrypoint extends ChunkGroup {
4814
4860
  /**
4815
4861
  * Sets the runtimeChunk for an entrypoint.
@@ -5047,6 +5093,8 @@ declare interface ExecuteOptions {
5047
5093
  */
5048
5094
  require: WebpackRequire;
5049
5095
  }
5096
+ declare interface ExistenceOnlyTimeEntryFileSystemInfo {}
5097
+ declare interface ExistenceOnlyTimeEntryTypesIndex {}
5050
5098
  type Experiments = ExperimentsCommon & ExperimentsExtra;
5051
5099
 
5052
5100
  /**
@@ -5945,11 +5993,23 @@ declare abstract class FileSystemInfo {
5945
5993
  logStatistics(): void;
5946
5994
  clear(): void;
5947
5995
  addFileTimestamps(
5948
- map: ReadonlyMap<string, FileTimestamp>,
5996
+ map: ReadonlyMap<
5997
+ string,
5998
+ | null
5999
+ | FileSystemInfoEntry
6000
+ | "ignore"
6001
+ | ExistenceOnlyTimeEntryFileSystemInfo
6002
+ >,
5949
6003
  immutable?: boolean
5950
6004
  ): void;
5951
6005
  addContextTimestamps(
5952
- map: ReadonlyMap<string, ContextTimestamp>,
6006
+ map: ReadonlyMap<
6007
+ string,
6008
+ | null
6009
+ | ContextFileSystemInfoEntry
6010
+ | "ignore"
6011
+ | ExistenceOnlyTimeEntryFileSystemInfo
6012
+ >,
5953
6013
  immutable?: boolean
5954
6014
  ): void;
5955
6015
  getFileTimestamp(
@@ -6016,7 +6076,6 @@ declare interface FileSystemInfoEntry {
6016
6076
  safeTime: number;
6017
6077
  timestamp?: number;
6018
6078
  }
6019
- type FileTimestamp = null | FileSystemInfoEntry | "ignore";
6020
6079
  type FilterItemTypes = string | RegExp | ((value: string) => boolean);
6021
6080
  declare interface Flags {
6022
6081
  [index: string]: Argument;
@@ -6380,6 +6439,9 @@ declare interface HarmonySettings {
6380
6439
  attributes?: ImportAttributes;
6381
6440
  phase: ImportPhaseType;
6382
6441
  }
6442
+ declare interface HarmonySpecifierGuards {
6443
+ guards?: AppendOnlyStackedSet<string>;
6444
+ }
6383
6445
  declare abstract class HarmonyStarExportsList {
6384
6446
  dependencies: HarmonyExportImportedSpecifierDependency[];
6385
6447
  push(dep: HarmonyExportImportedSpecifierDependency): void;
@@ -7139,6 +7201,10 @@ declare class JavascriptParser extends ParserClass {
7139
7201
  boolean | void
7140
7202
  >;
7141
7203
  statementIf: SyncBailHook<[IfStatement], boolean | void>;
7204
+ collectGuards: SyncBailHook<
7205
+ [Expression],
7206
+ void | ((walk: () => void) => void)
7207
+ >;
7142
7208
  classExtendsExpression: SyncBailHook<
7143
7209
  [
7144
7210
  Expression,
@@ -7432,8 +7498,9 @@ declare class JavascriptParser extends ParserClass {
7432
7498
  | HarmonySettings
7433
7499
  | ImportSettings
7434
7500
  | CommonJsImportSettings
7435
- | CompatibilitySettings;
7436
- magicCommentContext: Context;
7501
+ | CompatibilitySettings
7502
+ | HarmonySpecifierGuards;
7503
+ magicCommentContext: ContextImport;
7437
7504
  destructuringAssignmentPropertiesFor(
7438
7505
  node: Expression
7439
7506
  ): undefined | Set<DestructuringAssignmentProperty>;
@@ -8202,7 +8269,8 @@ declare class JavascriptParser extends ParserClass {
8202
8269
  | HarmonySettings
8203
8270
  | ImportSettings
8204
8271
  | CommonJsImportSettings
8205
- | CompatibilitySettings;
8272
+ | CompatibilitySettings
8273
+ | HarmonySpecifierGuards;
8206
8274
  tagVariable(
8207
8275
  name: string,
8208
8276
  tag: symbol,
@@ -8212,7 +8280,8 @@ declare class JavascriptParser extends ParserClass {
8212
8280
  | HarmonySettings
8213
8281
  | ImportSettings
8214
8282
  | CommonJsImportSettings
8215
- | CompatibilitySettings,
8283
+ | CompatibilitySettings
8284
+ | HarmonySpecifierGuards,
8216
8285
  flags?: 0 | 1 | 2 | 4
8217
8286
  ): void;
8218
8287
  defineVariable(name: string): void;
@@ -8458,9 +8527,9 @@ declare interface JavascriptParserOptions {
8458
8527
  importExportsPresence?: false | "auto" | "error" | "warn";
8459
8528
 
8460
8529
  /**
8461
- * Enable/disable evaluating import.meta.
8530
+ * Enable/disable evaluating import.meta. Set to 'preserve-unknown' to preserve unknown properties for runtime evaluation.
8462
8531
  */
8463
- importMeta?: boolean;
8532
+ importMeta?: boolean | "preserve-unknown";
8464
8533
 
8465
8534
  /**
8466
8535
  * Enable/disable evaluating import.meta.webpackContext.
@@ -8911,8 +8980,14 @@ declare interface KnownBuildMeta {
8911
8980
  sideEffectFree?: boolean;
8912
8981
  isCSSModule?: boolean;
8913
8982
  jsIncompatibleExports?: Record<string, string>;
8914
- exportsFinalNameByRuntime?: Map<RuntimeSpec, Record<string, string>>;
8915
- exportsSourceByRuntime?: Map<RuntimeSpec, string>;
8983
+ exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
8984
+ exportsSourceByRuntime?: Map<string, string>;
8985
+ }
8986
+ declare interface KnownContext {
8987
+ /**
8988
+ * environments
8989
+ */
8990
+ environments?: string[];
8916
8991
  }
8917
8992
  declare interface KnownCreateStatsOptionsContext {
8918
8993
  forToString?: boolean;
@@ -9929,7 +10004,21 @@ declare abstract class LocalModule {
9929
10004
  deserialize(context: ObjectDeserializerContext): void;
9930
10005
  }
9931
10006
  declare interface LogEntry {
9932
- type: string;
10007
+ type:
10008
+ | "error"
10009
+ | "warn"
10010
+ | "info"
10011
+ | "log"
10012
+ | "profile"
10013
+ | "debug"
10014
+ | "trace"
10015
+ | "group"
10016
+ | "groupCollapsed"
10017
+ | "groupEnd"
10018
+ | "profileEnd"
10019
+ | "time"
10020
+ | "clear"
10021
+ | "status";
9933
10022
  args?: any[];
9934
10023
  time: number;
9935
10024
  trace?: string[];
@@ -10893,12 +10982,15 @@ declare class ModuleGraphConnection {
10893
10982
  dependency: null | Dependency;
10894
10983
  resolvedModule: Module;
10895
10984
  module: Module;
10896
- weak: boolean;
10985
+ weak?: boolean;
10897
10986
  conditional: boolean;
10898
- condition?: (
10899
- moduleGraphConnection: ModuleGraphConnection,
10900
- runtime: RuntimeSpec
10901
- ) => ConnectionState;
10987
+ condition?:
10988
+ | null
10989
+ | false
10990
+ | ((
10991
+ moduleGraphConnection: ModuleGraphConnection,
10992
+ runtime: RuntimeSpec
10993
+ ) => ConnectionState);
10902
10994
  explanations?: Set<string>;
10903
10995
  clone(): ModuleGraphConnection;
10904
10996
  addCondition(
@@ -12055,6 +12147,9 @@ declare abstract class NormalReexportItem {
12055
12147
  checked: boolean;
12056
12148
  hidden: boolean;
12057
12149
  }
12150
+ declare interface NormalizedModules {
12151
+ [index: string]: VirtualModuleConfig;
12152
+ }
12058
12153
  type NormalizedStatsOptions = KnownNormalizedStatsOptions &
12059
12154
  Omit<
12060
12155
  StatsOptions,
@@ -12185,6 +12280,9 @@ declare interface OccurrenceModuleIdsPluginOptions {
12185
12280
  */
12186
12281
  prioritiseInitial?: boolean;
12187
12282
  }
12283
+ declare interface OnlySafeTimeEntry {
12284
+ safeTime: number;
12285
+ }
12188
12286
  declare interface Open {
12189
12287
  (
12190
12288
  file: PathLikeFs,
@@ -12866,7 +12964,8 @@ declare interface Options {
12866
12964
  declare abstract class OptionsApply {
12867
12965
  process(
12868
12966
  options: WebpackOptionsNormalizedWithDefaults,
12869
- compiler: Compiler
12967
+ compiler: Compiler,
12968
+ interception?: WebpackOptionsInterception
12870
12969
  ): WebpackOptionsNormalizedWithDefaults;
12871
12970
  }
12872
12971
  declare interface OriginRecord {
@@ -13191,7 +13290,10 @@ declare interface Output {
13191
13290
  declare interface OutputFileSystem {
13192
13291
  mkdir: Mkdir;
13193
13292
  readdir?: ReaddirFs;
13194
- rmdir?: Rmdir;
13293
+ rmdir?: (
13294
+ file: PathLikeFs,
13295
+ callback: (err: null | NodeJS.ErrnoException) => void
13296
+ ) => void;
13195
13297
  writeFile: WriteFile;
13196
13298
  unlink?: (
13197
13299
  pathLike: PathLikeFs,
@@ -14087,6 +14189,7 @@ declare interface RawChunkGroupOptions {
14087
14189
  prefetchOrder?: number;
14088
14190
  fetchPriority?: "auto" | "low" | "high";
14089
14191
  }
14192
+ type RawDevTool = string | false;
14090
14193
  type RawLoaderDefinition<
14091
14194
  OptionsType = {},
14092
14195
  ContextAdditions = {}
@@ -15304,6 +15407,23 @@ declare interface ResolveOptions {
15304
15407
  */
15305
15408
  symlinks?: boolean;
15306
15409
 
15410
+ /**
15411
+ * TypeScript config for paths mapping. Can be `false` (disabled), `true` (use default `tsconfig.json`), a string path to `tsconfig.json`, or an object with `configFile` and `references` options.
15412
+ */
15413
+ tsconfig?:
15414
+ | string
15415
+ | boolean
15416
+ | {
15417
+ /**
15418
+ * A path to the tsconfig file.
15419
+ */
15420
+ configFile?: string;
15421
+ /**
15422
+ * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths.
15423
+ */
15424
+ references?: string;
15425
+ };
15426
+
15307
15427
  /**
15308
15428
  * Enable caching of successfully resolved requests (cache entries are not revalidated).
15309
15429
  */
@@ -15449,6 +15569,11 @@ declare interface ResolveOptionsResolverFactoryObject1 {
15449
15569
  * prefer absolute
15450
15570
  */
15451
15571
  preferAbsolute: boolean;
15572
+
15573
+ /**
15574
+ * tsconfig file path or config object
15575
+ */
15576
+ tsconfig: string | boolean | TsconfigOptions;
15452
15577
  }
15453
15578
  declare interface ResolveOptionsResolverFactoryObject2 {
15454
15579
  /**
@@ -15594,6 +15719,11 @@ declare interface ResolveOptionsResolverFactoryObject2 {
15594
15719
  * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
15595
15720
  */
15596
15721
  preferAbsolute?: boolean;
15722
+
15723
+ /**
15724
+ * TypeScript config file path or config object with configFile and references
15725
+ */
15726
+ tsconfig?: string | boolean | TsconfigOptions;
15597
15727
  }
15598
15728
  type ResolveOptionsWithDependencyType = ResolveOptions & {
15599
15729
  dependencyType?: string;
@@ -15650,9 +15780,13 @@ declare abstract class Resolver {
15650
15780
  [ResolveRequest, ResolveContext],
15651
15781
  null | ResolveRequest
15652
15782
  >;
15653
- resolveSync(context: object, path: string, request: string): string | false;
15783
+ resolveSync(
15784
+ context: ContextTypes,
15785
+ path: string,
15786
+ request: string
15787
+ ): string | false;
15654
15788
  resolve(
15655
- context: object,
15789
+ context: ContextTypes,
15656
15790
  path: string,
15657
15791
  request: string,
15658
15792
  resolveContext: ResolveContext,
@@ -15752,22 +15886,6 @@ declare interface RestoreProvidedDataExports {
15752
15886
  terminalBinding: boolean;
15753
15887
  exportsInfo?: RestoreProvidedData;
15754
15888
  }
15755
- declare interface RmDirOptions {
15756
- maxRetries?: number;
15757
- recursive?: boolean;
15758
- retryDelay?: number;
15759
- }
15760
- declare interface Rmdir {
15761
- (
15762
- file: PathLikeFs,
15763
- callback: (err: null | NodeJS.ErrnoException) => void
15764
- ): void;
15765
- (
15766
- file: PathLikeFs,
15767
- options: RmDirOptions,
15768
- callback: (err: null | NodeJS.ErrnoException) => void
15769
- ): void;
15770
- }
15771
15889
  type Rule = string | RegExp | ((str: string) => boolean);
15772
15890
  declare interface RuleSet {
15773
15891
  /**
@@ -16541,6 +16659,10 @@ declare abstract class RuntimeTemplate {
16541
16659
  * the module
16542
16660
  */
16543
16661
  module: Module;
16662
+ /**
16663
+ * module in which the statement is emitted
16664
+ */
16665
+ originModule: Module;
16544
16666
  /**
16545
16667
  * the module graph
16546
16668
  */
@@ -16550,29 +16672,25 @@ declare abstract class RuntimeTemplate {
16550
16672
  */
16551
16673
  chunkGraph: ChunkGraph;
16552
16674
  /**
16553
- * the request that should be printed as comment
16675
+ * if set, will be filled with runtime requirements
16554
16676
  */
16555
- request: string;
16677
+ runtimeRequirements: Set<string>;
16556
16678
  /**
16557
16679
  * name of the import variable
16558
16680
  */
16559
16681
  importVar: string;
16560
16682
  /**
16561
- * module in which the statement is emitted
16683
+ * the request that should be printed as comment
16562
16684
  */
16563
- originModule: Module;
16685
+ request?: string;
16564
16686
  /**
16565
16687
  * true, if this is a weak dependency
16566
16688
  */
16567
16689
  weak?: boolean;
16568
- /**
16569
- * if set, will be filled with runtime requirements
16570
- */
16571
- runtimeRequirements: Set<string>;
16572
16690
  /**
16573
16691
  * module dependency
16574
16692
  */
16575
- dependency: ModuleDependency;
16693
+ dependency?: ModuleDependency;
16576
16694
  }): [string, string];
16577
16695
  exportFromImport<GenerateContext>(__0: {
16578
16696
  /**
@@ -16606,7 +16724,7 @@ declare abstract class RuntimeTemplate {
16606
16724
  /**
16607
16725
  * true, if expression will be called
16608
16726
  */
16609
- isCall: boolean;
16727
+ isCall?: boolean;
16610
16728
  /**
16611
16729
  * when false, call context will not be preserved
16612
16730
  */
@@ -17334,7 +17452,7 @@ declare interface SplitChunksSizes {
17334
17452
  declare interface SplitData {
17335
17453
  id?: string | number;
17336
17454
  hash?: string;
17337
- modules: Module[];
17455
+ modules: string[];
17338
17456
  size: number;
17339
17457
  }
17340
17458
  declare abstract class StackedMap<K, V> {
@@ -18159,6 +18277,9 @@ declare interface StreamOptions {
18159
18277
  start?: number;
18160
18278
  signal?: null | AbortSignal;
18161
18279
  }
18280
+ declare interface Stringable {
18281
+ toString: () => string;
18282
+ }
18162
18283
  type Supports = undefined | string;
18163
18284
  declare class SyncModuleIdsPlugin {
18164
18285
  constructor(__0: SyncModuleIdsPluginOptions);
@@ -18204,7 +18325,8 @@ declare interface TagInfo {
18204
18325
  | HarmonySettings
18205
18326
  | ImportSettings
18206
18327
  | CommonJsImportSettings
18207
- | CompatibilitySettings;
18328
+ | CompatibilitySettings
18329
+ | HarmonySpecifierGuards;
18208
18330
  next?: TagInfo;
18209
18331
  }
18210
18332
  declare interface TargetItemWithConnection {
@@ -18219,7 +18341,7 @@ declare interface TargetItemWithoutConnection {
18219
18341
  }
18220
18342
  declare class Template {
18221
18343
  constructor();
18222
- static getFunctionContent<T extends Function>(fn: T): string;
18344
+ static getFunctionContent(fn: Stringable): string;
18223
18345
  static toIdentifier(str: string): string;
18224
18346
  static toComment(str: string): string;
18225
18347
  static toNormalComment(str: string): string;
@@ -18276,6 +18398,49 @@ declare interface TrustedTypes {
18276
18398
  */
18277
18399
  policyName?: string;
18278
18400
  }
18401
+ declare interface TsconfigOptions {
18402
+ /**
18403
+ * A relative path to the tsconfig file based on cwd, or an absolute path of tsconfig file
18404
+ */
18405
+ configFile?: string;
18406
+
18407
+ /**
18408
+ * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths
18409
+ */
18410
+ references?: string[] | "auto";
18411
+ }
18412
+ declare interface TsconfigPathsData {
18413
+ /**
18414
+ * tsconfig file data
18415
+ */
18416
+ alias: AliasOption[];
18417
+
18418
+ /**
18419
+ * tsconfig file data
18420
+ */
18421
+ modules: string[];
18422
+ }
18423
+ declare interface TsconfigPathsMap {
18424
+ /**
18425
+ * main tsconfig paths data
18426
+ */
18427
+ main: TsconfigPathsData;
18428
+
18429
+ /**
18430
+ * main tsconfig base URL (absolute path)
18431
+ */
18432
+ mainContext: string;
18433
+
18434
+ /**
18435
+ * referenced tsconfig paths data mapped by baseUrl
18436
+ */
18437
+ refs: { [index: string]: TsconfigPathsData };
18438
+
18439
+ /**
18440
+ * file dependencies
18441
+ */
18442
+ fileDependencies: Set<string>;
18443
+ }
18279
18444
  declare const UNDEFINED_MARKER: unique symbol;
18280
18445
  declare interface URL_url extends URL {}
18281
18446
  type UnsafeCacheData = KnownUnsafeCacheData & Record<string, any>;
@@ -18346,7 +18511,7 @@ declare interface VirtualModules {
18346
18511
  declare class VirtualUrlPlugin {
18347
18512
  constructor(modules: VirtualModules, scheme?: string);
18348
18513
  scheme: string;
18349
- modules: { [index: string]: VirtualModuleConfig };
18514
+ modules: NormalizedModules;
18350
18515
 
18351
18516
  /**
18352
18517
  * Apply the plugin
@@ -18373,8 +18538,22 @@ declare interface WatchFileSystem {
18373
18538
  options: WatchOptions,
18374
18539
  callback: (
18375
18540
  err: null | Error,
18376
- timeInfoEntries1?: Map<string, FileSystemInfoEntry | "ignore">,
18377
- timeInfoEntries2?: Map<string, FileSystemInfoEntry | "ignore">,
18541
+ timeInfoEntries1?: Map<
18542
+ string,
18543
+ | null
18544
+ | EntryTypesIndex
18545
+ | OnlySafeTimeEntry
18546
+ | ExistenceOnlyTimeEntryTypesIndex
18547
+ | "ignore"
18548
+ >,
18549
+ timeInfoEntries2?: Map<
18550
+ string,
18551
+ | null
18552
+ | EntryTypesIndex
18553
+ | OnlySafeTimeEntry
18554
+ | ExistenceOnlyTimeEntryTypesIndex
18555
+ | "ignore"
18556
+ >,
18378
18557
  changes?: Set<string>,
18379
18558
  removals?: Set<string>
18380
18559
  ) => void,
@@ -18450,12 +18629,26 @@ declare interface Watcher {
18450
18629
  /**
18451
18630
  * get info about files
18452
18631
  */
18453
- getFileTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
18632
+ getFileTimeInfoEntries: () => Map<
18633
+ string,
18634
+ | null
18635
+ | EntryTypesIndex
18636
+ | OnlySafeTimeEntry
18637
+ | ExistenceOnlyTimeEntryTypesIndex
18638
+ | "ignore"
18639
+ >;
18454
18640
 
18455
18641
  /**
18456
18642
  * get info about directories
18457
18643
  */
18458
- getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
18644
+ getContextTimeInfoEntries: () => Map<
18645
+ string,
18646
+ | null
18647
+ | EntryTypesIndex
18648
+ | OnlySafeTimeEntry
18649
+ | ExistenceOnlyTimeEntryTypesIndex
18650
+ | "ignore"
18651
+ >;
18459
18652
 
18460
18653
  /**
18461
18654
  * get info about timestamps and changes
@@ -18476,12 +18669,26 @@ declare interface WatcherInfo {
18476
18669
  /**
18477
18670
  * get info about files
18478
18671
  */
18479
- fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
18672
+ fileTimeInfoEntries: Map<
18673
+ string,
18674
+ | null
18675
+ | EntryTypesIndex
18676
+ | OnlySafeTimeEntry
18677
+ | ExistenceOnlyTimeEntryTypesIndex
18678
+ | "ignore"
18679
+ >;
18480
18680
 
18481
18681
  /**
18482
18682
  * get info about directories
18483
18683
  */
18484
- contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
18684
+ contextTimeInfoEntries: Map<
18685
+ string,
18686
+ | null
18687
+ | EntryTypesIndex
18688
+ | OnlySafeTimeEntry
18689
+ | ExistenceOnlyTimeEntryTypesIndex
18690
+ | "ignore"
18691
+ >;
18485
18692
  }
18486
18693
  declare abstract class Watching {
18487
18694
  startTime: null | number;
@@ -18652,6 +18859,21 @@ declare class WebpackOptionsDefaulter {
18652
18859
  constructor();
18653
18860
  process(options: Configuration): WebpackOptionsNormalized;
18654
18861
  }
18862
+ declare interface WebpackOptionsInterception {
18863
+ devtool?:
18864
+ | string
18865
+ | false
18866
+ | {
18867
+ /**
18868
+ * Which asset type should receive this devtool value.
18869
+ */
18870
+ type: "all" | "javascript" | "css";
18871
+ /**
18872
+ * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
18873
+ */
18874
+ use: RawDevTool;
18875
+ }[];
18876
+ }
18655
18877
 
18656
18878
  /**
18657
18879
  * Normalized webpack options object.
@@ -18690,7 +18912,19 @@ declare interface WebpackOptionsNormalized {
18690
18912
  /**
18691
18913
  * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
18692
18914
  */
18693
- devtool?: string | false;
18915
+ devtool?:
18916
+ | string
18917
+ | false
18918
+ | {
18919
+ /**
18920
+ * Which asset type should receive this devtool value.
18921
+ */
18922
+ type: "all" | "javascript" | "css";
18923
+ /**
18924
+ * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
18925
+ */
18926
+ use: RawDevTool;
18927
+ }[];
18694
18928
 
18695
18929
  /**
18696
18930
  * Enable and configure the Dotenv plugin to load environment variables from .env files.
@@ -18866,9 +19100,23 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
18866
19100
  target: NonNullable<undefined | string | false | string[]>;
18867
19101
  } & { output: OutputNormalizedWithDefaults } & {
18868
19102
  optimization: OptimizationNormalizedWithDefaults;
18869
- } & { devtool: NonNullable<undefined | string | false> } & {
18870
- stats: NonNullable<StatsValue>;
18871
- } & { node: NonNullable<Node> } & {
19103
+ } & {
19104
+ devtool: NonNullable<
19105
+ | undefined
19106
+ | string
19107
+ | false
19108
+ | {
19109
+ /**
19110
+ * Which asset type should receive this devtool value.
19111
+ */
19112
+ type: "all" | "javascript" | "css";
19113
+ /**
19114
+ * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
19115
+ */
19116
+ use: RawDevTool;
19117
+ }[]
19118
+ >;
19119
+ } & { stats: NonNullable<StatsValue> } & { node: NonNullable<Node> } & {
18872
19120
  profile: NonNullable<undefined | boolean>;
18873
19121
  } & { parallelism: number } & { snapshot: SnapshotNormalizedWithDefaults } & {
18874
19122
  externalsPresets: ExternalsPresetsNormalizedWithDefaults;
@@ -18904,14 +19152,8 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
18904
19152
  } & { watch: NonNullable<undefined | boolean> } & {
18905
19153
  performance: NonNullable<undefined | false | PerformanceOptions>;
18906
19154
  } & { recordsInputPath: NonNullable<undefined | string | false> } & {
18907
- recordsOutputPath:
18908
- | (string & {
18909
- dotenv: NonNullable<undefined | boolean | DotenvPluginOptions>;
18910
- })
18911
- | (false & {
18912
- dotenv: NonNullable<undefined | boolean | DotenvPluginOptions>;
18913
- });
18914
- };
19155
+ recordsOutputPath: NonNullable<undefined | string | false>;
19156
+ } & { dotenv: NonNullable<undefined | boolean | DotenvPluginOptions> };
18915
19157
 
18916
19158
  /**
18917
19159
  * Plugin instance.
@@ -19394,6 +19636,10 @@ declare namespace exports {
19394
19636
  a: DependencyLocation,
19395
19637
  b: DependencyLocation
19396
19638
  ) => 0 | 1 | -1;
19639
+ export let compareModulesByFullName: ParameterizedComparator<
19640
+ Compiler,
19641
+ Module
19642
+ >;
19397
19643
  export let compareModulesById: ParameterizedComparator<
19398
19644
  ChunkGraph,
19399
19645
  Module
@@ -19502,7 +19748,7 @@ declare namespace exports {
19502
19748
  export const buffersSerializer: Serializer<any, any, any>;
19503
19749
  export let createFileSerializer: <D, S, C>(
19504
19750
  fs: IntermediateFileSystem,
19505
- hashFunction: string | typeof Hash
19751
+ hashFunction: HashFunction
19506
19752
  ) => Serializer<D, S, C>;
19507
19753
  export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
19508
19754
  }
@@ -19685,7 +19931,7 @@ declare namespace exports {
19685
19931
  WebpackOptionsDefaulter,
19686
19932
  ValidationError as WebpackOptionsValidationError,
19687
19933
  ValidationError,
19688
- Entry,
19934
+ EntryLibIndex as Entry,
19689
19935
  EntryNormalized,
19690
19936
  EntryObject,
19691
19937
  ExternalItem,