@depup/webpack 5.109.0-depup.0 → 5.109.2-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +4 -4
  2. package/bin/webpack.js +12 -0
  3. package/changes.json +4 -4
  4. package/lib/ChunkGraph.js +17 -15
  5. package/lib/CleanPlugin.js +11 -9
  6. package/lib/CompatibilityPlugin.js +31 -0
  7. package/lib/Compilation.js +21 -5
  8. package/lib/Compiler.js +16 -4
  9. package/lib/DefinePlugin.js +47 -20
  10. package/lib/ExportsInfo.js +22 -5
  11. package/lib/ExternalModule.js +10 -7
  12. package/lib/FileSystemInfo.js +126 -26
  13. package/lib/FlagDependencyUsagePlugin.js +33 -12
  14. package/lib/InitFragment.js +20 -32
  15. package/lib/ModuleFilenameHelpers.js +13 -2
  16. package/lib/NormalModule.js +80 -71
  17. package/lib/NormalModuleFactory.js +8 -2
  18. package/lib/RuntimePlugin.js +40 -113
  19. package/lib/Template.js +23 -3
  20. package/lib/cache/PackFileCacheStrategy.js +259 -5
  21. package/lib/config/defaults.js +21 -2
  22. package/lib/container/HoistContainerReferencesPlugin.js +47 -55
  23. package/lib/container/ModuleFederationPlugin.js +15 -9
  24. package/lib/css/CssGenerator.js +8 -2
  25. package/lib/css/CssLoadingRuntimeModule.js +25 -12
  26. package/lib/css/CssModulesPlugin.js +29 -18
  27. package/lib/css/CssParser.js +135 -50
  28. package/lib/css/syntax.js +862 -765
  29. package/lib/dependencies/CommonJsExportRequireDependency.js +19 -0
  30. package/lib/dependencies/CommonJsFullRequireDependency.js +33 -4
  31. package/lib/dependencies/CommonJsImportsParserPlugin.js +2 -0
  32. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +2 -1
  33. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +17 -9
  34. package/lib/dependencies/HarmonyImportDependency.js +1 -1
  35. package/lib/dependencies/HarmonyImportGuard.js +2 -1
  36. package/lib/dependencies/HarmonyImportSpecifierDependency.js +10 -7
  37. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +15 -9
  38. package/lib/hmr/lazyCompilationBackend.js +19 -4
  39. package/lib/html/HtmlGenerator.js +23 -3
  40. package/lib/html/HtmlModulesPlugin.js +30 -12
  41. package/lib/html/syntax.js +2485 -2399
  42. package/lib/ids/IdHelpers.js +24 -10
  43. package/lib/javascript/JavascriptModulesPlugin.js +83 -49
  44. package/lib/javascript/JavascriptParser.js +49 -13
  45. package/lib/javascript/syntax.js +700 -43
  46. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +10 -2
  47. package/lib/node/ReadFileCompileWasmPlugin.js +10 -2
  48. package/lib/optimize/AggressiveMergingPlugin.js +19 -15
  49. package/lib/optimize/ConcatenatedModule.js +19 -15
  50. package/lib/optimize/ModuleConcatenationPlugin.js +73 -24
  51. package/lib/optimize/RealContentHashPlugin.js +10 -7
  52. package/lib/optimize/SplitChunksPlugin.js +146 -44
  53. package/lib/prefetch/ResourceHintPlugin.js +96 -72
  54. package/lib/serialization/BinaryMiddleware.js +270 -938
  55. package/lib/serialization/FileMiddleware.js +299 -60
  56. package/lib/stats/DefaultStatsFactoryPlugin.js +204 -198
  57. package/lib/stats/DefaultStatsPrinterPlugin.js +24 -166
  58. package/lib/stats/StatsFactory.js +31 -9
  59. package/lib/util/identifier.js +21 -1
  60. package/package.json +10 -10
  61. package/schemas/WebpackOptions.json +110 -55
  62. package/types.d.ts +832 -247
package/types.d.ts CHANGED
@@ -675,11 +675,9 @@ declare class AsyncWebAssemblyModulesPlugin {
675
675
  renderModule(
676
676
  module: Module,
677
677
  renderContext: WebAssemblyRenderContext,
678
- hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
678
+ hooks: CompilationHooks
679
679
  ): Source;
680
- static getCompilationHooks: (
681
- compilation: Compilation
682
- ) => CompilationHooksAsyncWebAssemblyModulesPlugin;
680
+ static getCompilationHooks: (compilation: Compilation) => CompilationHooks;
683
681
  }
684
682
  declare interface AsyncWebAssemblyModulesPluginOptions {
685
683
  /**
@@ -2759,13 +2757,6 @@ declare interface ChunkRenderContextCssModulesPlugin {
2759
2757
  */
2760
2758
  moduleSourceContent: Source;
2761
2759
  }
2762
-
2763
- /**
2764
- * Renames an inlined module's top-level declaration (and all its references) when
2765
- * its name is already taken in the shared startup scope, recording the chosen name
2766
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
2767
- * IIFE by resolving name collisions instead of isolating each module.
2768
- */
2769
2760
  declare interface ChunkRenderContextJavascriptModulesPlugin {
2770
2761
  /**
2771
2762
  * the chunk
@@ -2917,15 +2908,13 @@ declare class CleanPlugin {
2917
2908
  * Applies the plugin by registering its hooks on the compiler.
2918
2909
  */
2919
2910
  apply(compiler: Compiler): void;
2920
- static getCompilationHooks: (
2921
- compilation: Compilation
2922
- ) => CleanPluginCompilationHooks;
2923
- }
2924
- declare interface CleanPluginCompilationHooks {
2925
- /**
2926
- * when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config
2927
- */
2928
- keep: SyncBailHook<[string], boolean | void>;
2911
+ static getCompilationHooks: (compilation: Compilation) => {
2912
+ /**
2913
+ * When returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config.
2914
+ * @since 5.20.0
2915
+ */
2916
+ keep: SyncBailHook<[string], boolean | void>;
2917
+ };
2929
2918
  }
2930
2919
  declare interface ClearCacheOptions {
2931
2920
  /**
@@ -3230,7 +3219,13 @@ declare class Compilation {
3230
3219
  [(string[] | ReferencedExport)[], Dependency, RuntimeSpec],
3231
3220
  (string[] | ReferencedExport)[]
3232
3221
  >;
3222
+ /**
3223
+ * @since 5.32.0
3224
+ */
3233
3225
  executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
3226
+ /**
3227
+ * @since 5.33.0
3228
+ */
3234
3229
  prepareModuleExecution: AsyncParallelHook<
3235
3230
  [ExecuteModuleArgument, ExecuteModuleContext]
3236
3231
  >;
@@ -3358,6 +3353,9 @@ declare class Compilation {
3358
3353
  ProcessAssetsAdditionalOptions
3359
3354
  >;
3360
3355
  afterProcessAssets: SyncHook<[CompilationAssets]>;
3356
+ /**
3357
+ * @since 5.8.0
3358
+ */
3361
3359
  processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
3362
3360
  needAdditionalSeal: SyncBailHook<[], boolean | void>;
3363
3361
  afterSeal: AsyncSeriesHook<[]>;
@@ -3954,93 +3952,12 @@ declare class Compilation {
3954
3952
  declare interface CompilationAssets {
3955
3953
  [index: string]: Source;
3956
3954
  }
3957
- declare interface CompilationHooksAsyncWebAssemblyModulesPlugin {
3955
+ declare interface CompilationHooks {
3958
3956
  renderModuleContent: SyncWaterfallHook<
3959
3957
  [Source, Module, WebAssemblyRenderContext],
3960
3958
  Source
3961
3959
  >;
3962
3960
  }
3963
- declare interface CompilationHooksCssModulesPlugin {
3964
- renderModulePackage: SyncWaterfallHook<
3965
- [Source, Module, ChunkRenderContextCssModulesPlugin],
3966
- Source
3967
- >;
3968
- chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
3969
-
3970
- /**
3971
- * 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
3972
- */
3973
- orderModules: SyncBailHook<
3974
- [Chunk, Module[], Compilation],
3975
- undefined | void | Module[]
3976
- >;
3977
- }
3978
-
3979
- /**
3980
- * Renames an inlined module's top-level declaration (and all its references) when
3981
- * its name is already taken in the shared startup scope, recording the chosen name
3982
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
3983
- * IIFE by resolving name collisions instead of isolating each module.
3984
- */
3985
- declare interface CompilationHooksJavascriptModulesPlugin {
3986
- renderModuleContent: SyncWaterfallHook<
3987
- [Source, Module, ModuleRenderContext],
3988
- Source
3989
- >;
3990
- renderModuleContainer: SyncWaterfallHook<
3991
- [Source, Module, ModuleRenderContext],
3992
- Source
3993
- >;
3994
- renderModulePackage: SyncWaterfallHook<
3995
- [Source, Module, ModuleRenderContext],
3996
- Source
3997
- >;
3998
- renderChunk: SyncWaterfallHook<
3999
- [Source, RenderContextJavascriptModulesPlugin],
4000
- Source
4001
- >;
4002
- renderMain: SyncWaterfallHook<
4003
- [Source, RenderContextJavascriptModulesPlugin],
4004
- Source
4005
- >;
4006
- renderContent: SyncWaterfallHook<
4007
- [Source, RenderContextJavascriptModulesPlugin],
4008
- Source
4009
- >;
4010
- render: SyncWaterfallHook<
4011
- [Source, RenderContextJavascriptModulesPlugin],
4012
- Source
4013
- >;
4014
- renderStartup: SyncWaterfallHook<
4015
- [Source, Module, StartupRenderContext],
4016
- Source
4017
- >;
4018
- renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext], string>;
4019
- inlineInRuntimeBailout: SyncBailHook<
4020
- [Module, Partial<RenderBootstrapContext>],
4021
- string | void
4022
- >;
4023
- embedInRuntimeBailout: SyncBailHook<
4024
- [Module, RenderContextJavascriptModulesPlugin],
4025
- string | void
4026
- >;
4027
- strictRuntimeBailout: SyncBailHook<
4028
- [RenderContextJavascriptModulesPlugin],
4029
- string | void
4030
- >;
4031
- chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
4032
- useSourceMap: SyncBailHook<
4033
- [Chunk, RenderContextJavascriptModulesPlugin],
4034
- boolean | void
4035
- >;
4036
- }
4037
- declare interface CompilationHooksModuleFederationPlugin {
4038
- addContainerEntryDependency: SyncHook<Dependency>;
4039
- addFederationRuntimeDependency: SyncHook<Dependency>;
4040
- }
4041
- declare interface CompilationHooksRealContentHashPlugin {
4042
- updateHash: SyncBailHook<[Buffer[], string], string | void>;
4043
- }
4044
3961
 
4045
3962
  /**
4046
3963
  * Checks whether this object is sorted.
@@ -4141,17 +4058,29 @@ declare class Compiler {
4141
4058
  make: AsyncParallelHook<[Compilation]>;
4142
4059
  finishMake: AsyncParallelHook<[Compilation]>;
4143
4060
  afterCompile: AsyncSeriesHook<[Compilation]>;
4061
+ /**
4062
+ * @since 5.67.0
4063
+ */
4144
4064
  readRecords: AsyncSeriesHook<[]>;
4065
+ /**
4066
+ * @since 5.67.0
4067
+ */
4145
4068
  emitRecords: AsyncSeriesHook<[]>;
4146
4069
  watchRun: AsyncSeriesHook<[Compiler]>;
4147
4070
  failed: SyncHook<[Error]>;
4148
4071
  invalid: SyncHook<[null | string, number]>;
4149
4072
  watchClose: SyncHook<[]>;
4073
+ /**
4074
+ * @since 5.17.0
4075
+ */
4150
4076
  shutdown: AsyncSeriesHook<[]>;
4151
4077
  infrastructureLog: SyncBailHook<
4152
4078
  [string, string, undefined | any[]],
4153
4079
  true | void
4154
4080
  >;
4081
+ /**
4082
+ * @since 5.106.0
4083
+ */
4155
4084
  validate: SyncHook<[]>;
4156
4085
  environment: SyncHook<[]>;
4157
4086
  afterEnvironment: SyncHook<[]>;
@@ -4352,6 +4281,7 @@ type ConcatSourceChild = string | Source | SourceLike;
4352
4281
 
4353
4282
  /**
4354
4283
  * Advanced options for module concatenation.
4284
+ * @since 5.109.0
4355
4285
  */
4356
4286
  declare interface ConcatenateModulesOptions {
4357
4287
  /**
@@ -5465,9 +5395,24 @@ declare interface CssImportDependencyMeta {
5465
5395
  type CssLayer = undefined | string;
5466
5396
  declare class CssLoadingRuntimeModule extends RuntimeModule {
5467
5397
  constructor(runtimeRequirements: ReadonlySet<string>);
5468
- static getCompilationHooks: (
5469
- compilation: Compilation
5470
- ) => CssLoadingRuntimeModulePluginHooks;
5398
+ static getCompilationHooks: (compilation: Compilation) => {
5399
+ /**
5400
+ * @since 5.66.0
5401
+ */
5402
+ createStylesheet: SyncWaterfallHook<[string, Chunk], string>;
5403
+ /**
5404
+ * @since 5.91.0
5405
+ */
5406
+ linkPreload: SyncWaterfallHook<[string, Chunk], string>;
5407
+ /**
5408
+ * @since 5.91.0
5409
+ */
5410
+ linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
5411
+ /**
5412
+ * @since 5.107.0
5413
+ */
5414
+ linkInsert: SyncWaterfallHook<[string, Chunk], string>;
5415
+ };
5471
5416
 
5472
5417
  /**
5473
5418
  * Runtime modules without any dependencies to other runtime modules
@@ -5495,12 +5440,6 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
5495
5440
  */
5496
5441
  static getSourceBasicTypes(module: Module): ReadonlySet<string>;
5497
5442
  }
5498
- declare interface CssLoadingRuntimeModulePluginHooks {
5499
- createStylesheet: SyncWaterfallHook<[string, Chunk], string>;
5500
- linkPreload: SyncWaterfallHook<[string, Chunk], string>;
5501
- linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
5502
- linkInsert: SyncWaterfallHook<[string, Chunk], string>;
5503
- }
5504
5443
  declare abstract class CssModule extends NormalModule {
5505
5444
  cssLayer: CssLayer;
5506
5445
  supports: Supports;
@@ -5682,7 +5621,27 @@ declare class CssModulesPlugin {
5682
5621
  */
5683
5622
  renderChunk(
5684
5623
  __0: RenderContextCssModulesPlugin,
5685
- hooks: CompilationHooksCssModulesPlugin
5624
+ hooks: {
5625
+ /**
5626
+ * @since 5.94.0
5627
+ */
5628
+ renderModulePackage: SyncWaterfallHook<
5629
+ [Source, Module, ChunkRenderContextCssModulesPlugin],
5630
+ Source
5631
+ >;
5632
+ /**
5633
+ * @since 5.94.0
5634
+ */
5635
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
5636
+ /**
5637
+ * 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.
5638
+ * @since 5.107.0
5639
+ */
5640
+ orderModules: SyncBailHook<
5641
+ [Chunk, Module[], Compilation],
5642
+ undefined | void | Module[]
5643
+ >;
5644
+ }
5686
5645
  ): Source;
5687
5646
 
5688
5647
  /**
@@ -5691,7 +5650,27 @@ declare class CssModulesPlugin {
5691
5650
  static renderModule(
5692
5651
  module: CssModule,
5693
5652
  renderContext: ChunkRenderContextCssModulesPlugin,
5694
- hooks: CompilationHooksCssModulesPlugin
5653
+ hooks: {
5654
+ /**
5655
+ * @since 5.94.0
5656
+ */
5657
+ renderModulePackage: SyncWaterfallHook<
5658
+ [Source, Module, ChunkRenderContextCssModulesPlugin],
5659
+ Source
5660
+ >;
5661
+ /**
5662
+ * @since 5.94.0
5663
+ */
5664
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
5665
+ /**
5666
+ * 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.
5667
+ * @since 5.107.0
5668
+ */
5669
+ orderModules: SyncBailHook<
5670
+ [Chunk, Module[], Compilation],
5671
+ undefined | void | Module[]
5672
+ >;
5673
+ }
5695
5674
  ): null | Source;
5696
5675
 
5697
5676
  /**
@@ -5706,9 +5685,27 @@ declare class CssModulesPlugin {
5706
5685
  * Returns true, when the chunk has css.
5707
5686
  */
5708
5687
  static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
5709
- static getCompilationHooks: (
5710
- compilation: Compilation
5711
- ) => CompilationHooksCssModulesPlugin;
5688
+ static getCompilationHooks: (compilation: Compilation) => {
5689
+ /**
5690
+ * @since 5.94.0
5691
+ */
5692
+ renderModulePackage: SyncWaterfallHook<
5693
+ [Source, Module, ChunkRenderContextCssModulesPlugin],
5694
+ Source
5695
+ >;
5696
+ /**
5697
+ * @since 5.94.0
5698
+ */
5699
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
5700
+ /**
5701
+ * 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.
5702
+ * @since 5.107.0
5703
+ */
5704
+ orderModules: SyncBailHook<
5705
+ [Chunk, Module[], Compilation],
5706
+ undefined | void | Module[]
5707
+ >;
5708
+ };
5712
5709
  }
5713
5710
  declare abstract class CssParser extends ParserClass {
5714
5711
  defaultMode: "global" | "auto" | "local" | "pure";
@@ -5796,11 +5793,13 @@ declare interface CssParserOptions {
5796
5793
 
5797
5794
  /**
5798
5795
  * Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).
5796
+ * @since 5.109.0
5799
5797
  */
5800
5798
  customMedia?: boolean;
5801
5799
 
5802
5800
  /**
5803
5801
  * Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).
5802
+ * @since 5.109.0
5804
5803
  */
5805
5804
  customSelectors?: boolean;
5806
5805
 
@@ -5811,6 +5810,7 @@ declare interface CssParserOptions {
5811
5810
 
5812
5811
  /**
5813
5812
  * Auto-emit `<link rel="preload" as="font">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.
5813
+ * @since 5.109.0
5814
5814
  */
5815
5815
  fontPreload?: boolean;
5816
5816
 
@@ -5901,7 +5901,15 @@ declare class DefinePlugin {
5901
5901
  }) => CodeValuePrimitive,
5902
5902
  options?: true | string[] | RuntimeValueOptions
5903
5903
  ): RuntimeValue;
5904
- static getCompilationHooks: (compilation: Compilation) => DefinePluginHooks;
5904
+ static getCompilationHooks: (compilation: Compilation) => {
5905
+ /**
5906
+ * @since 5.104.0
5907
+ */
5908
+ definitions: SyncWaterfallHook<
5909
+ [Record<string, CodeValue>],
5910
+ Record<string, CodeValue>
5911
+ >;
5912
+ };
5905
5913
  static VALUE_DEP_MAIN: "webpack/DefinePlugin_hash";
5906
5914
  static VALUE_DEP_PREFIX: "webpack/DefinePlugin ";
5907
5915
  static getMergedDefinitionNode: (
@@ -5918,12 +5926,6 @@ declare class DefinePlugin {
5918
5926
  ) => string;
5919
5927
  static toPropertyKey: (key: string) => string;
5920
5928
  }
5921
- declare interface DefinePluginHooks {
5922
- definitions: SyncWaterfallHook<
5923
- [Record<string, CodeValue>],
5924
- Record<string, CodeValue>
5925
- >;
5926
- }
5927
5929
  declare interface Definitions {
5928
5930
  [index: string]: CodeValue;
5929
5931
  }
@@ -7269,6 +7271,7 @@ declare interface Environment {
7269
7271
 
7270
7272
  /**
7271
7273
  * The environment supports generator functions and yield ('function* () { yield ... }').
7274
+ * @since 5.109.0
7272
7275
  */
7273
7276
  generator?: boolean;
7274
7277
 
@@ -7309,6 +7312,7 @@ declare interface Environment {
7309
7312
 
7310
7313
  /**
7311
7314
  * The environment supports `<link rel="modulepreload">` to preload EcmaScript modules.
7315
+ * @since 5.109.0
7312
7316
  */
7313
7317
  modulePreload?: boolean;
7314
7318
 
@@ -7487,78 +7491,91 @@ declare interface Experiments {
7487
7491
 
7488
7492
  /**
7489
7493
  * Support WebAssembly as asynchronous EcmaScript Module. `"auto"` (the default) enables it unless a loader is registered for WebAssembly files.
7494
+ * @since 5.0.0
7490
7495
  * @experimental
7491
7496
  */
7492
7497
  asyncWebAssembly?: boolean | "auto";
7493
7498
 
7494
7499
  /**
7495
7500
  * Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
7501
+ * @since 5.62.0
7496
7502
  * @experimental
7497
7503
  */
7498
7504
  backCompat?: boolean;
7499
7505
 
7500
7506
  /**
7501
7507
  * Build http(s): urls using a lockfile and resource content cache.
7508
+ * @since 5.49.0
7502
7509
  * @experimental
7503
7510
  */
7504
7511
  buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
7505
7512
 
7506
7513
  /**
7507
7514
  * Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
7515
+ * @since 5.54.0
7508
7516
  * @experimental
7509
7517
  */
7510
7518
  cacheUnaffected?: boolean;
7511
7519
 
7512
7520
  /**
7513
7521
  * Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
7522
+ * @since 5.66.0
7514
7523
  * @experimental
7515
7524
  */
7516
7525
  css?: boolean | "auto";
7517
7526
 
7518
7527
  /**
7519
7528
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
7529
+ * @since 5.100.0
7520
7530
  * @experimental
7521
7531
  */
7522
7532
  deferImport?: boolean;
7523
7533
 
7524
7534
  /**
7525
7535
  * Apply defaults of next major version.
7536
+ * @since 5.53.0
7526
7537
  * @experimental
7527
7538
  */
7528
7539
  futureDefaults?: boolean;
7529
7540
 
7530
7541
  /**
7531
7542
  * Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `"auto"` (the default) enables it unless a loader is registered for HTML files.
7543
+ * @since 5.107.0
7532
7544
  * @experimental
7533
7545
  */
7534
7546
  html?: boolean | "auto";
7535
7547
 
7536
7548
  /**
7537
7549
  * Compile entrypoints and import()s only when they are accessed.
7550
+ * @since 5.17.0
7538
7551
  * @experimental
7539
7552
  */
7540
7553
  lazyCompilation?: boolean | LazyCompilationOptions;
7541
7554
 
7542
7555
  /**
7543
7556
  * Allow output javascript files as module source type.
7557
+ * @since 5.0.0
7544
7558
  * @experimental
7545
7559
  */
7546
7560
  outputModule?: boolean;
7547
7561
 
7548
7562
  /**
7549
7563
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7564
+ * @since 5.106.0
7550
7565
  * @experimental
7551
7566
  */
7552
7567
  sourceImport?: boolean;
7553
7568
 
7554
7569
  /**
7555
7570
  * Support WebAssembly as synchronous EcmaScript Module (outdated).
7571
+ * @since 5.0.0
7556
7572
  * @experimental
7557
7573
  */
7558
7574
  syncWebAssembly?: boolean;
7559
7575
 
7560
7576
  /**
7561
7577
  * Enable typescript support. `"auto"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.
7578
+ * @since 5.107.0
7562
7579
  * @experimental
7563
7580
  */
7564
7581
  typescript?: boolean | "auto";
@@ -7570,78 +7587,91 @@ declare interface Experiments {
7570
7587
  declare interface ExperimentsNormalized {
7571
7588
  /**
7572
7589
  * Support WebAssembly as asynchronous EcmaScript Module. `"auto"` (the default) enables it unless a loader is registered for WebAssembly files.
7590
+ * @since 5.0.0
7573
7591
  * @experimental
7574
7592
  */
7575
7593
  asyncWebAssembly?: boolean | "auto";
7576
7594
 
7577
7595
  /**
7578
7596
  * Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
7597
+ * @since 5.62.0
7579
7598
  * @experimental
7580
7599
  */
7581
7600
  backCompat?: boolean;
7582
7601
 
7583
7602
  /**
7584
7603
  * Build http(s): urls using a lockfile and resource content cache.
7604
+ * @since 5.49.0
7585
7605
  * @experimental
7586
7606
  */
7587
7607
  buildHttp?: HttpUriOptions;
7588
7608
 
7589
7609
  /**
7590
7610
  * Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
7611
+ * @since 5.54.0
7591
7612
  * @experimental
7592
7613
  */
7593
7614
  cacheUnaffected?: boolean;
7594
7615
 
7595
7616
  /**
7596
7617
  * Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
7618
+ * @since 5.66.0
7597
7619
  * @experimental
7598
7620
  */
7599
7621
  css?: boolean | "auto";
7600
7622
 
7601
7623
  /**
7602
7624
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
7625
+ * @since 5.100.0
7603
7626
  * @experimental
7604
7627
  */
7605
7628
  deferImport?: boolean;
7606
7629
 
7607
7630
  /**
7608
7631
  * Apply defaults of next major version.
7632
+ * @since 5.53.0
7609
7633
  * @experimental
7610
7634
  */
7611
7635
  futureDefaults?: boolean;
7612
7636
 
7613
7637
  /**
7614
7638
  * Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `"auto"` (the default) enables it unless a loader is registered for HTML files.
7639
+ * @since 5.107.0
7615
7640
  * @experimental
7616
7641
  */
7617
7642
  html?: boolean | "auto";
7618
7643
 
7619
7644
  /**
7620
7645
  * Compile entrypoints and import()s only when they are accessed.
7646
+ * @since 5.17.0
7621
7647
  * @experimental
7622
7648
  */
7623
7649
  lazyCompilation?: false | LazyCompilationOptions;
7624
7650
 
7625
7651
  /**
7626
7652
  * Allow output javascript files as module source type.
7653
+ * @since 5.0.0
7627
7654
  * @experimental
7628
7655
  */
7629
7656
  outputModule?: boolean;
7630
7657
 
7631
7658
  /**
7632
7659
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
7660
+ * @since 5.106.0
7633
7661
  * @experimental
7634
7662
  */
7635
7663
  sourceImport?: boolean;
7636
7664
 
7637
7665
  /**
7638
7666
  * Support WebAssembly as synchronous EcmaScript Module (outdated).
7667
+ * @since 5.0.0
7639
7668
  * @experimental
7640
7669
  */
7641
7670
  syncWebAssembly?: boolean;
7642
7671
 
7643
7672
  /**
7644
7673
  * Enable typescript support. `"auto"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.
7674
+ * @since 5.107.0
7645
7675
  * @experimental
7646
7676
  */
7647
7677
  typescript?: boolean | "auto";
@@ -8274,6 +8304,7 @@ type ExternalItemValue =
8274
8304
  declare interface ExternalItemValueObjectKnown {
8275
8305
  /**
8276
8306
  * How an external's exports interoperate with ES module imports, independent of the importing module's strictness (similar to Rollup's `output.interop`). 'default': treat as CommonJS, the default import is the whole exports (Node.js semantics). 'esModule': treat as an ES module namespace, the default import is unboxed to `.default`.
8307
+ * @since 5.109.0
8277
8308
  */
8278
8309
  interop?: "default" | "esModule";
8279
8310
  }
@@ -8310,7 +8341,12 @@ declare class ExternalModule extends Module {
8310
8341
  unsafeCacheData: UnsafeCacheData,
8311
8342
  normalModuleFactory: NormalModuleFactory
8312
8343
  ): void;
8313
- static getCompilationHooks: (compilation: Compilation) => ExternalModuleHooks;
8344
+ static getCompilationHooks: (compilation: Compilation) => {
8345
+ /**
8346
+ * @since 5.106.0
8347
+ */
8348
+ chunkCondition: SyncBailHook<[Chunk, Compilation], boolean>;
8349
+ };
8314
8350
  static ModuleExternalInitFragment: typeof ModuleExternalInitFragment;
8315
8351
  static getExternalModuleNodeCommonjsInitFragment: (
8316
8352
  runtimeTemplate: RuntimeTemplate,
@@ -8326,9 +8362,6 @@ declare class ExternalModule extends Module {
8326
8362
  type ExternalModuleBuildInfo = KnownBuildInfo &
8327
8363
  Record<string, any> &
8328
8364
  KnownExternalModuleBuildInfo;
8329
- declare interface ExternalModuleHooks {
8330
- chunkCondition: SyncBailHook<[Chunk, Compilation], boolean>;
8331
- }
8332
8365
  declare interface ExternalModuleInfo {
8333
8366
  type: "external";
8334
8367
  module: Module;
@@ -9618,33 +9651,6 @@ declare interface HotModuleReplacementPluginLoaderContext {
9618
9651
  declare class HotUpdateChunk extends Chunk {
9619
9652
  constructor();
9620
9653
  }
9621
- declare interface HtmlCompilationHooks {
9622
- /**
9623
- * called with the list of extra tags to inject into each page (initially empty) plus the current HTML; push `HtmlTagDescriptor`s and return the list — webpack serializes and places them by `injectTo`. A structured alternative to the string-level `transformHtml` for adding tags; runs before CSP so injected inline tags are hashed
9624
- */
9625
- injectTags: AsyncSeriesWaterfallHook<
9626
- [HtmlTagDescriptor[], HtmlInjectTagsContext],
9627
- HtmlTagDescriptor[]
9628
- >;
9629
-
9630
- /**
9631
- * called with the page's `<script>`/`<link>`/`<style>`/`<meta>` tags (webpack's own and any injected) as mutable descriptors; mutate `attrs` (add a `nonce`/`data-*`, switch `defer`↔`async`, …), set `remove: true`, or change `injectTo` to move a tag between `<head>` and `<body>`, and webpack rewrites the changed tags. Add new tags with `injectTags` instead
9632
- */
9633
- transformTags: AsyncSeriesHook<[HtmlMutableTag[], HtmlTransformTagsContext]>;
9634
-
9635
- /**
9636
- * called with each emitted page's final HTML (all sentinels resolved) just before it is written; return the (possibly transformed) HTML — e.g. to minify, inject a CSP meta, or rewrite tags
9637
- */
9638
- transformHtml: AsyncSeriesWaterfallHook<
9639
- [string, HtmlTransformHtmlContext],
9640
- string
9641
- >;
9642
-
9643
- /**
9644
- * called once each page's HTML asset has been finalized — a post-emit notification (nothing to return)
9645
- */
9646
- htmlEmitted: AsyncSeriesHook<[HtmlEmittedContext]>;
9647
- }
9648
9654
  declare interface HtmlEmittedContext {
9649
9655
  outputName: string;
9650
9656
  }
@@ -9778,9 +9784,36 @@ declare class HtmlModulesPlugin {
9778
9784
  /**
9779
9785
  * Per-compilation hooks for the experimental HTML support.
9780
9786
  */
9781
- static getCompilationHooks: (
9782
- compilation: Compilation
9783
- ) => HtmlCompilationHooks;
9787
+ static getCompilationHooks: (compilation: Compilation) => {
9788
+ /**
9789
+ * Called with the list of extra tags to inject into each page (initially empty) plus the current HTML; push `HtmlTagDescriptor`s and return the list — webpack serializes and places them by `injectTo`. A structured alternative to the string-level `transformHtml` for adding tags; runs before CSP so injected inline tags are hashed.
9790
+ * @since 5.109.0
9791
+ */
9792
+ injectTags: AsyncSeriesWaterfallHook<
9793
+ [HtmlTagDescriptor[], HtmlInjectTagsContext],
9794
+ HtmlTagDescriptor[]
9795
+ >;
9796
+ /**
9797
+ * Called with the page's `<script>`/`<link>`/`<style>`/`<meta>` tags (webpack's own and any injected) as mutable descriptors; mutate `attrs` (add a `nonce`/`data-*`, switch `defer`↔`async`, …), set `remove: true`, or change `injectTo` to move a tag between `<head>` and `<body>`, and webpack rewrites the changed tags. Add new tags with `injectTags` instead.
9798
+ * @since 5.109.0
9799
+ */
9800
+ transformTags: AsyncSeriesHook<
9801
+ [HtmlMutableTag[], HtmlTransformTagsContext]
9802
+ >;
9803
+ /**
9804
+ * Called with each emitted page's final HTML (all sentinels resolved) just before it is written; return the (possibly transformed) HTML — e.g. to minify, inject a CSP meta, or rewrite tags.
9805
+ * @since 5.109.0
9806
+ */
9807
+ transformHtml: AsyncSeriesWaterfallHook<
9808
+ [string, HtmlTransformHtmlContext],
9809
+ string
9810
+ >;
9811
+ /**
9812
+ * Called once each page's HTML asset has been finalized — a post-emit notification (nothing to return).
9813
+ * @since 5.109.0
9814
+ */
9815
+ htmlEmitted: AsyncSeriesHook<[HtmlEmittedContext]>;
9816
+ };
9784
9817
  }
9785
9818
  declare interface HtmlMutableTag {
9786
9819
  /**
@@ -9825,6 +9858,7 @@ declare abstract class HtmlParser extends ParserClass {
9825
9858
  declare interface HtmlParserOptions {
9826
9859
  /**
9827
9860
  * Configure how the HTML source is parsed: `"document"` (the default) parses a full page; any other value is the tag name of the context element to parse the source as that element's inner HTML (a fragment) — e.g. `"template"` for a neutral fragment, or `"tbody"` so context-sensitive tags like a bare `<tr>`/`<td>` are kept instead of dropped.
9861
+ * @since 5.109.0
9828
9862
  */
9829
9863
  as?: string;
9830
9864
 
@@ -9935,6 +9969,7 @@ type HtmlResourceHintRel =
9935
9969
 
9936
9970
  /**
9937
9971
  * A custom resource-hint `<link>` for `output.html.resourceHints`. Exactly one of `href` / `chunk` / `entry` names the target.
9972
+ * @since 5.109.0
9938
9973
  */
9939
9974
  declare interface HtmlResourceHintWebpackOptions {
9940
9975
  /**
@@ -10488,6 +10523,7 @@ type ImportMetaParserOptions = ImportMetaParserOptionsKnown &
10488
10523
 
10489
10524
  /**
10490
10525
  * Enable/disable evaluating import.meta fields. Omitted fields are enabled and unknown fields are preserved. Custom fields are allowed.
10526
+ * @since 5.109.0
10491
10527
  */
10492
10528
  declare interface ImportMetaParserOptionsKnown {
10493
10529
  /**
@@ -10538,6 +10574,7 @@ declare interface ImportMetaParserOptionsKnown {
10538
10574
 
10539
10575
  /**
10540
10576
  * Enable/disable evaluating import.meta fields. Omitted fields are enabled and unknown fields are preserved. Custom fields are allowed.
10577
+ * @since 5.109.0
10541
10578
  */
10542
10579
  declare interface ImportMetaParserOptionsUnknown {
10543
10580
  [index: string]: boolean;
@@ -10603,6 +10640,7 @@ declare interface InfrastructureLogging {
10603
10640
 
10604
10641
  /**
10605
10642
  * Show build progress. `"auto"` shows it only for interactive terminals. This option is only used when no custom console is provided.
10643
+ * @since 5.109.0
10606
10644
  */
10607
10645
  progress?: boolean | "auto";
10608
10646
 
@@ -10926,7 +10964,79 @@ declare class JavascriptModulesPlugin {
10926
10964
  renderModule(
10927
10965
  module: Module,
10928
10966
  renderContext: ModuleRenderContext,
10929
- hooks: CompilationHooksJavascriptModulesPlugin
10967
+ hooks: {
10968
+ renderModuleContent: SyncWaterfallHook<
10969
+ [Source, Module, ModuleRenderContext],
10970
+ Source
10971
+ >;
10972
+ renderModuleContainer: SyncWaterfallHook<
10973
+ [Source, Module, ModuleRenderContext],
10974
+ Source
10975
+ >;
10976
+ renderModulePackage: SyncWaterfallHook<
10977
+ [Source, Module, ModuleRenderContext],
10978
+ Source
10979
+ >;
10980
+ render: SyncWaterfallHook<
10981
+ [Source, RenderContextJavascriptModulesPlugin],
10982
+ Source
10983
+ >;
10984
+ /**
10985
+ * @since 5.41.0
10986
+ */
10987
+ renderContent: SyncWaterfallHook<
10988
+ [Source, RenderContextJavascriptModulesPlugin],
10989
+ Source
10990
+ >;
10991
+ /**
10992
+ * @since 5.22.0
10993
+ */
10994
+ renderStartup: SyncWaterfallHook<
10995
+ [Source, Module, StartupRenderContext],
10996
+ Source
10997
+ >;
10998
+ renderChunk: SyncWaterfallHook<
10999
+ [Source, RenderContextJavascriptModulesPlugin],
11000
+ Source
11001
+ >;
11002
+ renderMain: SyncWaterfallHook<
11003
+ [Source, RenderContextJavascriptModulesPlugin],
11004
+ Source
11005
+ >;
11006
+ renderRequire: SyncWaterfallHook<
11007
+ [string, RenderBootstrapContext],
11008
+ string
11009
+ >;
11010
+ /**
11011
+ * @since 5.22.0
11012
+ */
11013
+ inlineInRuntimeBailout: SyncBailHook<
11014
+ [Module, Partial<RenderBootstrapContext>],
11015
+ string | void
11016
+ >;
11017
+ /**
11018
+ * @since 5.22.0
11019
+ */
11020
+ embedInRuntimeBailout: SyncBailHook<
11021
+ [Module, RenderContextJavascriptModulesPlugin],
11022
+ string | void
11023
+ >;
11024
+ /**
11025
+ * @since 5.26.1
11026
+ */
11027
+ strictRuntimeBailout: SyncBailHook<
11028
+ [RenderContextJavascriptModulesPlugin],
11029
+ string | void
11030
+ >;
11031
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11032
+ /**
11033
+ * @since 5.2.1
11034
+ */
11035
+ useSourceMap: SyncBailHook<
11036
+ [Chunk, RenderContextJavascriptModulesPlugin],
11037
+ boolean | void
11038
+ >;
11039
+ }
10930
11040
  ): null | Source;
10931
11041
 
10932
11042
  /**
@@ -10934,7 +11044,79 @@ declare class JavascriptModulesPlugin {
10934
11044
  */
10935
11045
  renderChunk(
10936
11046
  renderContext: RenderContextJavascriptModulesPlugin,
10937
- hooks: CompilationHooksJavascriptModulesPlugin
11047
+ hooks: {
11048
+ renderModuleContent: SyncWaterfallHook<
11049
+ [Source, Module, ModuleRenderContext],
11050
+ Source
11051
+ >;
11052
+ renderModuleContainer: SyncWaterfallHook<
11053
+ [Source, Module, ModuleRenderContext],
11054
+ Source
11055
+ >;
11056
+ renderModulePackage: SyncWaterfallHook<
11057
+ [Source, Module, ModuleRenderContext],
11058
+ Source
11059
+ >;
11060
+ render: SyncWaterfallHook<
11061
+ [Source, RenderContextJavascriptModulesPlugin],
11062
+ Source
11063
+ >;
11064
+ /**
11065
+ * @since 5.41.0
11066
+ */
11067
+ renderContent: SyncWaterfallHook<
11068
+ [Source, RenderContextJavascriptModulesPlugin],
11069
+ Source
11070
+ >;
11071
+ /**
11072
+ * @since 5.22.0
11073
+ */
11074
+ renderStartup: SyncWaterfallHook<
11075
+ [Source, Module, StartupRenderContext],
11076
+ Source
11077
+ >;
11078
+ renderChunk: SyncWaterfallHook<
11079
+ [Source, RenderContextJavascriptModulesPlugin],
11080
+ Source
11081
+ >;
11082
+ renderMain: SyncWaterfallHook<
11083
+ [Source, RenderContextJavascriptModulesPlugin],
11084
+ Source
11085
+ >;
11086
+ renderRequire: SyncWaterfallHook<
11087
+ [string, RenderBootstrapContext],
11088
+ string
11089
+ >;
11090
+ /**
11091
+ * @since 5.22.0
11092
+ */
11093
+ inlineInRuntimeBailout: SyncBailHook<
11094
+ [Module, Partial<RenderBootstrapContext>],
11095
+ string | void
11096
+ >;
11097
+ /**
11098
+ * @since 5.22.0
11099
+ */
11100
+ embedInRuntimeBailout: SyncBailHook<
11101
+ [Module, RenderContextJavascriptModulesPlugin],
11102
+ string | void
11103
+ >;
11104
+ /**
11105
+ * @since 5.26.1
11106
+ */
11107
+ strictRuntimeBailout: SyncBailHook<
11108
+ [RenderContextJavascriptModulesPlugin],
11109
+ string | void
11110
+ >;
11111
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11112
+ /**
11113
+ * @since 5.2.1
11114
+ */
11115
+ useSourceMap: SyncBailHook<
11116
+ [Chunk, RenderContextJavascriptModulesPlugin],
11117
+ boolean | void
11118
+ >;
11119
+ }
10938
11120
  ): Source;
10939
11121
 
10940
11122
  /**
@@ -10942,7 +11124,79 @@ declare class JavascriptModulesPlugin {
10942
11124
  */
10943
11125
  renderMain(
10944
11126
  renderContext: MainRenderContext,
10945
- hooks: CompilationHooksJavascriptModulesPlugin,
11127
+ hooks: {
11128
+ renderModuleContent: SyncWaterfallHook<
11129
+ [Source, Module, ModuleRenderContext],
11130
+ Source
11131
+ >;
11132
+ renderModuleContainer: SyncWaterfallHook<
11133
+ [Source, Module, ModuleRenderContext],
11134
+ Source
11135
+ >;
11136
+ renderModulePackage: SyncWaterfallHook<
11137
+ [Source, Module, ModuleRenderContext],
11138
+ Source
11139
+ >;
11140
+ render: SyncWaterfallHook<
11141
+ [Source, RenderContextJavascriptModulesPlugin],
11142
+ Source
11143
+ >;
11144
+ /**
11145
+ * @since 5.41.0
11146
+ */
11147
+ renderContent: SyncWaterfallHook<
11148
+ [Source, RenderContextJavascriptModulesPlugin],
11149
+ Source
11150
+ >;
11151
+ /**
11152
+ * @since 5.22.0
11153
+ */
11154
+ renderStartup: SyncWaterfallHook<
11155
+ [Source, Module, StartupRenderContext],
11156
+ Source
11157
+ >;
11158
+ renderChunk: SyncWaterfallHook<
11159
+ [Source, RenderContextJavascriptModulesPlugin],
11160
+ Source
11161
+ >;
11162
+ renderMain: SyncWaterfallHook<
11163
+ [Source, RenderContextJavascriptModulesPlugin],
11164
+ Source
11165
+ >;
11166
+ renderRequire: SyncWaterfallHook<
11167
+ [string, RenderBootstrapContext],
11168
+ string
11169
+ >;
11170
+ /**
11171
+ * @since 5.22.0
11172
+ */
11173
+ inlineInRuntimeBailout: SyncBailHook<
11174
+ [Module, Partial<RenderBootstrapContext>],
11175
+ string | void
11176
+ >;
11177
+ /**
11178
+ * @since 5.22.0
11179
+ */
11180
+ embedInRuntimeBailout: SyncBailHook<
11181
+ [Module, RenderContextJavascriptModulesPlugin],
11182
+ string | void
11183
+ >;
11184
+ /**
11185
+ * @since 5.26.1
11186
+ */
11187
+ strictRuntimeBailout: SyncBailHook<
11188
+ [RenderContextJavascriptModulesPlugin],
11189
+ string | void
11190
+ >;
11191
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11192
+ /**
11193
+ * @since 5.2.1
11194
+ */
11195
+ useSourceMap: SyncBailHook<
11196
+ [Chunk, RenderContextJavascriptModulesPlugin],
11197
+ boolean | void
11198
+ >;
11199
+ },
10946
11200
  compilation: Compilation
10947
11201
  ): Source;
10948
11202
 
@@ -10952,7 +11206,79 @@ declare class JavascriptModulesPlugin {
10952
11206
  updateHashWithBootstrap(
10953
11207
  hash: Hash,
10954
11208
  renderContext: RenderBootstrapContext,
10955
- hooks: CompilationHooksJavascriptModulesPlugin
11209
+ hooks: {
11210
+ renderModuleContent: SyncWaterfallHook<
11211
+ [Source, Module, ModuleRenderContext],
11212
+ Source
11213
+ >;
11214
+ renderModuleContainer: SyncWaterfallHook<
11215
+ [Source, Module, ModuleRenderContext],
11216
+ Source
11217
+ >;
11218
+ renderModulePackage: SyncWaterfallHook<
11219
+ [Source, Module, ModuleRenderContext],
11220
+ Source
11221
+ >;
11222
+ render: SyncWaterfallHook<
11223
+ [Source, RenderContextJavascriptModulesPlugin],
11224
+ Source
11225
+ >;
11226
+ /**
11227
+ * @since 5.41.0
11228
+ */
11229
+ renderContent: SyncWaterfallHook<
11230
+ [Source, RenderContextJavascriptModulesPlugin],
11231
+ Source
11232
+ >;
11233
+ /**
11234
+ * @since 5.22.0
11235
+ */
11236
+ renderStartup: SyncWaterfallHook<
11237
+ [Source, Module, StartupRenderContext],
11238
+ Source
11239
+ >;
11240
+ renderChunk: SyncWaterfallHook<
11241
+ [Source, RenderContextJavascriptModulesPlugin],
11242
+ Source
11243
+ >;
11244
+ renderMain: SyncWaterfallHook<
11245
+ [Source, RenderContextJavascriptModulesPlugin],
11246
+ Source
11247
+ >;
11248
+ renderRequire: SyncWaterfallHook<
11249
+ [string, RenderBootstrapContext],
11250
+ string
11251
+ >;
11252
+ /**
11253
+ * @since 5.22.0
11254
+ */
11255
+ inlineInRuntimeBailout: SyncBailHook<
11256
+ [Module, Partial<RenderBootstrapContext>],
11257
+ string | void
11258
+ >;
11259
+ /**
11260
+ * @since 5.22.0
11261
+ */
11262
+ embedInRuntimeBailout: SyncBailHook<
11263
+ [Module, RenderContextJavascriptModulesPlugin],
11264
+ string | void
11265
+ >;
11266
+ /**
11267
+ * @since 5.26.1
11268
+ */
11269
+ strictRuntimeBailout: SyncBailHook<
11270
+ [RenderContextJavascriptModulesPlugin],
11271
+ string | void
11272
+ >;
11273
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11274
+ /**
11275
+ * @since 5.2.1
11276
+ */
11277
+ useSourceMap: SyncBailHook<
11278
+ [Chunk, RenderContextJavascriptModulesPlugin],
11279
+ boolean | void
11280
+ >;
11281
+ }
10956
11282
  ): void;
10957
11283
 
10958
11284
  /**
@@ -10960,7 +11286,79 @@ declare class JavascriptModulesPlugin {
10960
11286
  */
10961
11287
  renderBootstrap(
10962
11288
  renderContext: RenderBootstrapContext,
10963
- hooks: CompilationHooksJavascriptModulesPlugin
11289
+ hooks: {
11290
+ renderModuleContent: SyncWaterfallHook<
11291
+ [Source, Module, ModuleRenderContext],
11292
+ Source
11293
+ >;
11294
+ renderModuleContainer: SyncWaterfallHook<
11295
+ [Source, Module, ModuleRenderContext],
11296
+ Source
11297
+ >;
11298
+ renderModulePackage: SyncWaterfallHook<
11299
+ [Source, Module, ModuleRenderContext],
11300
+ Source
11301
+ >;
11302
+ render: SyncWaterfallHook<
11303
+ [Source, RenderContextJavascriptModulesPlugin],
11304
+ Source
11305
+ >;
11306
+ /**
11307
+ * @since 5.41.0
11308
+ */
11309
+ renderContent: SyncWaterfallHook<
11310
+ [Source, RenderContextJavascriptModulesPlugin],
11311
+ Source
11312
+ >;
11313
+ /**
11314
+ * @since 5.22.0
11315
+ */
11316
+ renderStartup: SyncWaterfallHook<
11317
+ [Source, Module, StartupRenderContext],
11318
+ Source
11319
+ >;
11320
+ renderChunk: SyncWaterfallHook<
11321
+ [Source, RenderContextJavascriptModulesPlugin],
11322
+ Source
11323
+ >;
11324
+ renderMain: SyncWaterfallHook<
11325
+ [Source, RenderContextJavascriptModulesPlugin],
11326
+ Source
11327
+ >;
11328
+ renderRequire: SyncWaterfallHook<
11329
+ [string, RenderBootstrapContext],
11330
+ string
11331
+ >;
11332
+ /**
11333
+ * @since 5.22.0
11334
+ */
11335
+ inlineInRuntimeBailout: SyncBailHook<
11336
+ [Module, Partial<RenderBootstrapContext>],
11337
+ string | void
11338
+ >;
11339
+ /**
11340
+ * @since 5.22.0
11341
+ */
11342
+ embedInRuntimeBailout: SyncBailHook<
11343
+ [Module, RenderContextJavascriptModulesPlugin],
11344
+ string | void
11345
+ >;
11346
+ /**
11347
+ * @since 5.26.1
11348
+ */
11349
+ strictRuntimeBailout: SyncBailHook<
11350
+ [RenderContextJavascriptModulesPlugin],
11351
+ string | void
11352
+ >;
11353
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11354
+ /**
11355
+ * @since 5.2.1
11356
+ */
11357
+ useSourceMap: SyncBailHook<
11358
+ [Chunk, RenderContextJavascriptModulesPlugin],
11359
+ boolean | void
11360
+ >;
11361
+ }
10964
11362
  ): Bootstrap;
10965
11363
 
10966
11364
  /**
@@ -10968,7 +11366,79 @@ declare class JavascriptModulesPlugin {
10968
11366
  */
10969
11367
  renderRequire(
10970
11368
  renderContext: RenderBootstrapContext,
10971
- hooks: CompilationHooksJavascriptModulesPlugin
11369
+ hooks: {
11370
+ renderModuleContent: SyncWaterfallHook<
11371
+ [Source, Module, ModuleRenderContext],
11372
+ Source
11373
+ >;
11374
+ renderModuleContainer: SyncWaterfallHook<
11375
+ [Source, Module, ModuleRenderContext],
11376
+ Source
11377
+ >;
11378
+ renderModulePackage: SyncWaterfallHook<
11379
+ [Source, Module, ModuleRenderContext],
11380
+ Source
11381
+ >;
11382
+ render: SyncWaterfallHook<
11383
+ [Source, RenderContextJavascriptModulesPlugin],
11384
+ Source
11385
+ >;
11386
+ /**
11387
+ * @since 5.41.0
11388
+ */
11389
+ renderContent: SyncWaterfallHook<
11390
+ [Source, RenderContextJavascriptModulesPlugin],
11391
+ Source
11392
+ >;
11393
+ /**
11394
+ * @since 5.22.0
11395
+ */
11396
+ renderStartup: SyncWaterfallHook<
11397
+ [Source, Module, StartupRenderContext],
11398
+ Source
11399
+ >;
11400
+ renderChunk: SyncWaterfallHook<
11401
+ [Source, RenderContextJavascriptModulesPlugin],
11402
+ Source
11403
+ >;
11404
+ renderMain: SyncWaterfallHook<
11405
+ [Source, RenderContextJavascriptModulesPlugin],
11406
+ Source
11407
+ >;
11408
+ renderRequire: SyncWaterfallHook<
11409
+ [string, RenderBootstrapContext],
11410
+ string
11411
+ >;
11412
+ /**
11413
+ * @since 5.22.0
11414
+ */
11415
+ inlineInRuntimeBailout: SyncBailHook<
11416
+ [Module, Partial<RenderBootstrapContext>],
11417
+ string | void
11418
+ >;
11419
+ /**
11420
+ * @since 5.22.0
11421
+ */
11422
+ embedInRuntimeBailout: SyncBailHook<
11423
+ [Module, RenderContextJavascriptModulesPlugin],
11424
+ string | void
11425
+ >;
11426
+ /**
11427
+ * @since 5.26.1
11428
+ */
11429
+ strictRuntimeBailout: SyncBailHook<
11430
+ [RenderContextJavascriptModulesPlugin],
11431
+ string | void
11432
+ >;
11433
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11434
+ /**
11435
+ * @since 5.2.1
11436
+ */
11437
+ useSourceMap: SyncBailHook<
11438
+ [Chunk, RenderContextJavascriptModulesPlugin],
11439
+ boolean | void
11440
+ >;
11441
+ }
10972
11442
  ): string;
10973
11443
 
10974
11444
  /**
@@ -10978,9 +11448,76 @@ declare class JavascriptModulesPlugin {
10978
11448
  chunk: Chunk,
10979
11449
  outputOptions: OutputNormalizedWithDefaults
10980
11450
  ): ChunkFilenameTemplate;
10981
- static getCompilationHooks: (
10982
- compilation: Compilation
10983
- ) => CompilationHooksJavascriptModulesPlugin;
11451
+ static getCompilationHooks: (compilation: Compilation) => {
11452
+ renderModuleContent: SyncWaterfallHook<
11453
+ [Source, Module, ModuleRenderContext],
11454
+ Source
11455
+ >;
11456
+ renderModuleContainer: SyncWaterfallHook<
11457
+ [Source, Module, ModuleRenderContext],
11458
+ Source
11459
+ >;
11460
+ renderModulePackage: SyncWaterfallHook<
11461
+ [Source, Module, ModuleRenderContext],
11462
+ Source
11463
+ >;
11464
+ render: SyncWaterfallHook<
11465
+ [Source, RenderContextJavascriptModulesPlugin],
11466
+ Source
11467
+ >;
11468
+ /**
11469
+ * @since 5.41.0
11470
+ */
11471
+ renderContent: SyncWaterfallHook<
11472
+ [Source, RenderContextJavascriptModulesPlugin],
11473
+ Source
11474
+ >;
11475
+ /**
11476
+ * @since 5.22.0
11477
+ */
11478
+ renderStartup: SyncWaterfallHook<
11479
+ [Source, Module, StartupRenderContext],
11480
+ Source
11481
+ >;
11482
+ renderChunk: SyncWaterfallHook<
11483
+ [Source, RenderContextJavascriptModulesPlugin],
11484
+ Source
11485
+ >;
11486
+ renderMain: SyncWaterfallHook<
11487
+ [Source, RenderContextJavascriptModulesPlugin],
11488
+ Source
11489
+ >;
11490
+ renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext], string>;
11491
+ /**
11492
+ * @since 5.22.0
11493
+ */
11494
+ inlineInRuntimeBailout: SyncBailHook<
11495
+ [Module, Partial<RenderBootstrapContext>],
11496
+ string | void
11497
+ >;
11498
+ /**
11499
+ * @since 5.22.0
11500
+ */
11501
+ embedInRuntimeBailout: SyncBailHook<
11502
+ [Module, RenderContextJavascriptModulesPlugin],
11503
+ string | void
11504
+ >;
11505
+ /**
11506
+ * @since 5.26.1
11507
+ */
11508
+ strictRuntimeBailout: SyncBailHook<
11509
+ [RenderContextJavascriptModulesPlugin],
11510
+ string | void
11511
+ >;
11512
+ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
11513
+ /**
11514
+ * @since 5.2.1
11515
+ */
11516
+ useSourceMap: SyncBailHook<
11517
+ [Chunk, RenderContextJavascriptModulesPlugin],
11518
+ boolean | void
11519
+ >;
11520
+ };
10984
11521
  static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
10985
11522
  }
10986
11523
  declare class JavascriptParser extends ParserClass {
@@ -11052,9 +11589,15 @@ declare class JavascriptParser extends ParserClass {
11052
11589
  undefined | null | BasicEvaluatedExpression
11053
11590
  >
11054
11591
  >;
11592
+ /**
11593
+ * @since 5.73.0
11594
+ */
11055
11595
  evaluateNewExpression: HookMap<
11056
11596
  SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
11057
11597
  >;
11598
+ /**
11599
+ * @since 5.73.0
11600
+ */
11058
11601
  evaluateCallExpression: HookMap<
11059
11602
  SyncBailHook<
11060
11603
  [CallExpression],
@@ -11143,6 +11686,9 @@ declare class JavascriptParser extends ParserClass {
11143
11686
  ],
11144
11687
  boolean | void
11145
11688
  >;
11689
+ /**
11690
+ * @since 5.109.0
11691
+ */
11146
11692
  preStatementByType: HookMap<
11147
11693
  SyncBailHook<
11148
11694
  [
@@ -11211,6 +11757,9 @@ declare class JavascriptParser extends ParserClass {
11211
11757
  ],
11212
11758
  boolean | void
11213
11759
  >;
11760
+ /**
11761
+ * @since 5.109.0
11762
+ */
11214
11763
  blockPreStatementByType: HookMap<
11215
11764
  SyncBailHook<
11216
11765
  [
@@ -11280,6 +11829,9 @@ declare class JavascriptParser extends ParserClass {
11280
11829
  boolean | void
11281
11830
  >;
11282
11831
  statementIf: SyncBailHook<[IfStatement], boolean | void>;
11832
+ /**
11833
+ * @since 5.105.0
11834
+ */
11283
11835
  collectGuards: SyncBailHook<[Expression], void | GuardCollection>;
11284
11836
  classExtendsExpression: SyncBailHook<
11285
11837
  [
@@ -11295,6 +11847,9 @@ declare class JavascriptParser extends ParserClass {
11295
11847
  ],
11296
11848
  boolean | void
11297
11849
  >;
11850
+ /**
11851
+ * @since 5.36.0
11852
+ */
11298
11853
  classBodyValue: SyncBailHook<
11299
11854
  [
11300
11855
  Expression,
@@ -11396,9 +11951,15 @@ declare class JavascriptParser extends ParserClass {
11396
11951
  varDeclaration: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11397
11952
  varDeclarationLet: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11398
11953
  varDeclarationConst: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11954
+ /**
11955
+ * @since 5.100.0
11956
+ */
11399
11957
  varDeclarationUsing: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11400
11958
  varDeclarationVar: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11401
11959
  pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
11960
+ /**
11961
+ * @since 5.101.3
11962
+ */
11402
11963
  collectDestructuringAssignmentProperties: SyncBailHook<
11403
11964
  [Expression],
11404
11965
  boolean | void
@@ -11477,6 +12038,9 @@ declare class JavascriptParser extends ParserClass {
11477
12038
  >;
11478
12039
  optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
11479
12040
  new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
12041
+ /**
12042
+ * @since 5.71.0
12043
+ */
11480
12044
  binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
11481
12045
  expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
11482
12046
  expressionMemberChain: HookMap<
@@ -11497,8 +12061,14 @@ declare class JavascriptParser extends ParserClass {
11497
12061
  boolean | void
11498
12062
  >;
11499
12063
  program: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
12064
+ /**
12065
+ * @since 5.99.0
12066
+ */
11500
12067
  terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
11501
12068
  finish: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>;
12069
+ /**
12070
+ * @since 5.99.9
12071
+ */
11502
12072
  unusedStatement: SyncBailHook<[Statement], boolean | void>;
11503
12073
  }>;
11504
12074
  sourceType: "module" | "auto" | "script";
@@ -13156,11 +13726,13 @@ declare interface JavascriptParserOptions {
13156
13726
 
13157
13727
  /**
13158
13728
  * Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
13729
+ * @since 5.100.0
13159
13730
  */
13160
13731
  deferImport?: boolean;
13161
13732
 
13162
13733
  /**
13163
13734
  * Auto-emit `<link rel="preload" as="style">` for the CSS of every dynamically imported (`import()`) chunk, so the stylesheet fetches in parallel with the chunk's JavaScript instead of after it parses. Unlike `dynamicImportPreload`, the JavaScript itself is not preloaded. `true` uses the default order; a number sets the preload order.
13735
+ * @since 5.109.0
13164
13736
  */
13165
13737
  dynamicImportCssPreload?: number | boolean;
13166
13738
 
@@ -13298,6 +13870,7 @@ declare interface JavascriptParserOptions {
13298
13870
 
13299
13871
  /**
13300
13872
  * Specifies the behavior of constructs that break at runtime in strict mode (e.g. 'with', 'arguments.callee', assigning to read-only globals) when modules are emitted as ES module output.
13873
+ * @since 5.109.0
13301
13874
  */
13302
13875
  strictModeViolations?: false | "error" | "warn";
13303
13876
 
@@ -13354,6 +13927,7 @@ declare interface JavascriptParserOptions {
13354
13927
 
13355
13928
  /**
13356
13929
  * Disable or configure parsing of Worklet syntax like context.audioWorklet.addModule() or CSS.paintWorklet.addModule().
13930
+ * @since 5.109.0
13357
13931
  */
13358
13932
  worklet?: boolean | string[];
13359
13933
 
@@ -14971,13 +15545,6 @@ type LogTypeEnum =
14971
15545
  | "status";
14972
15546
  declare const MEASURE_END_OPERATION: unique symbol;
14973
15547
  declare const MEASURE_START_OPERATION: unique symbol;
14974
-
14975
- /**
14976
- * Renames an inlined module's top-level declaration (and all its references) when
14977
- * its name is already taken in the shared startup scope, recording the chosen name
14978
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
14979
- * IIFE by resolving name collisions instead of isolating each module.
14980
- */
14981
15548
  declare interface MainRenderContext {
14982
15549
  /**
14983
15550
  * the chunk
@@ -15239,10 +15806,6 @@ type Matcher =
15239
15806
  | RegExp
15240
15807
  | ((str: string) => boolean)
15241
15808
  | (string | RegExp | ((str: string) => boolean))[];
15242
-
15243
- /**
15244
- * Extract fragment index.
15245
- */
15246
15809
  declare interface MaybeMergeableInitFragment<GenerateContext> {
15247
15810
  key?: string;
15248
15811
  stage: number;
@@ -15804,9 +16367,16 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
15804
16367
  * Creates an instance of ModuleChunkLoadingRuntimeModule.
15805
16368
  */
15806
16369
  constructor(runtimeRequirements: ReadonlySet<string>);
15807
- static getCompilationHooks: (
15808
- compilation: Compilation
15809
- ) => JsonpCompilationPluginHooks;
16370
+ static getCompilationHooks: (compilation: Compilation) => {
16371
+ /**
16372
+ * @since 5.41.0
16373
+ */
16374
+ linkPreload: SyncWaterfallHook<[string, Chunk], string>;
16375
+ /**
16376
+ * @since 5.41.0
16377
+ */
16378
+ linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
16379
+ };
15810
16380
 
15811
16381
  /**
15812
16382
  * Runtime modules without any dependencies to other runtime modules
@@ -16004,9 +16574,16 @@ declare class ModuleFederationPlugin {
16004
16574
  * Applies the plugin by registering its hooks on the compiler.
16005
16575
  */
16006
16576
  apply(compiler: Compiler): void;
16007
- static getCompilationHooks: (
16008
- compilation: Compilation
16009
- ) => CompilationHooksModuleFederationPlugin;
16577
+ static getCompilationHooks: (compilation: Compilation) => {
16578
+ /**
16579
+ * @since 5.96.0
16580
+ */
16581
+ addContainerEntryDependency: SyncHook<Dependency>;
16582
+ /**
16583
+ * @since 5.96.0
16584
+ */
16585
+ addFederationRuntimeDependency: SyncHook<Dependency>;
16586
+ };
16010
16587
  }
16011
16588
  declare interface ModuleFederationPluginOptions {
16012
16589
  /**
@@ -16826,13 +17403,6 @@ declare interface ModuleReferenceOptions {
16826
17403
  */
16827
17404
  asiSafe?: boolean;
16828
17405
  }
16829
-
16830
- /**
16831
- * Renames an inlined module's top-level declaration (and all its references) when
16832
- * its name is already taken in the shared startup scope, recording the chosen name
16833
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
16834
- * IIFE by resolving name collisions instead of isolating each module.
16835
- */
16836
17406
  declare interface ModuleRenderContext {
16837
17407
  /**
16838
17408
  * the chunk
@@ -17438,9 +18008,55 @@ declare class NormalModule extends Module {
17438
18008
  | (string | RegExp | ((content: string) => boolean))[],
17439
18009
  request: string
17440
18010
  ): boolean;
17441
- static getCompilationHooks(
17442
- compilation: Compilation
17443
- ): NormalModuleCompilationHooks;
18011
+ static getCompilationHooks(compilation: Compilation): {
18012
+ /**
18013
+ * Use the `readResource` hook instead.
18014
+ * @deprecated
18015
+ */
18016
+ readResourceForScheme: HookMap<
18017
+ FakeHook<
18018
+ AsyncSeriesBailHook<[string, NormalModule], null | string | Buffer>
18019
+ >
18020
+ >;
18021
+ /**
18022
+ * @since 5.58.0
18023
+ */
18024
+ readResource: HookMap<
18025
+ AsyncSeriesBailHook<[AnyLoaderContext], null | string | Buffer>
18026
+ >;
18027
+ loader: SyncHook<[AnyLoaderContext, NormalModule]>;
18028
+ beforeLoaders: SyncHook<[LoaderItem[], NormalModule, AnyLoaderContext]>;
18029
+ /**
18030
+ * @since 5.59.0
18031
+ */
18032
+ beforeParse: SyncHook<[NormalModule]>;
18033
+ /**
18034
+ * @since 5.59.0
18035
+ */
18036
+ beforeSnapshot: SyncHook<[NormalModule]>;
18037
+ /**
18038
+ * @since 5.99.0
18039
+ */
18040
+ processResult: SyncWaterfallHook<
18041
+ [
18042
+ [
18043
+ string | Buffer,
18044
+ undefined | string | RawSourceMap,
18045
+ undefined | PreparsedAst
18046
+ ],
18047
+ NormalModule
18048
+ ],
18049
+ [
18050
+ string | Buffer,
18051
+ undefined | string | RawSourceMap,
18052
+ undefined | PreparsedAst
18053
+ ]
18054
+ >;
18055
+ /**
18056
+ * @since 5.49.0
18057
+ */
18058
+ needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
18059
+ };
17444
18060
  static deserialize(
17445
18061
  context: ObjectDeserializerContextObjectMiddlewareObject_4
17446
18062
  ): NormalModule;
@@ -17454,36 +18070,6 @@ declare class NormalModule extends Module {
17454
18070
  type NormalModuleBuildInfo = KnownBuildInfo &
17455
18071
  Record<string, any> &
17456
18072
  KnownNormalModuleBuildInfo;
17457
- declare interface NormalModuleCompilationHooks {
17458
- loader: SyncHook<[AnyLoaderContext, NormalModule]>;
17459
- beforeLoaders: SyncHook<[LoaderItem[], NormalModule, AnyLoaderContext]>;
17460
- beforeParse: SyncHook<[NormalModule]>;
17461
- beforeSnapshot: SyncHook<[NormalModule]>;
17462
- readResourceForScheme: HookMap<
17463
- FakeHook<
17464
- AsyncSeriesBailHook<[string, NormalModule], null | string | Buffer>
17465
- >
17466
- >;
17467
- readResource: HookMap<
17468
- AsyncSeriesBailHook<[AnyLoaderContext], null | string | Buffer>
17469
- >;
17470
- processResult: SyncWaterfallHook<
17471
- [
17472
- [
17473
- string | Buffer,
17474
- undefined | string | RawSourceMap,
17475
- undefined | PreparsedAst
17476
- ],
17477
- NormalModule
17478
- ],
17479
- [
17480
- string | Buffer,
17481
- undefined | string | RawSourceMap,
17482
- undefined | PreparsedAst
17483
- ]
17484
- >;
17485
- needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
17486
- }
17487
18073
  declare interface NormalModuleCreateDataNormalModuleObject_1<
17488
18074
  T extends string = string
17489
18075
  > {
@@ -17637,6 +18223,9 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
17637
18223
  resolveForScheme: HookMap<
17638
18224
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
17639
18225
  >;
18226
+ /**
18227
+ * @since 5.49.0
18228
+ */
17640
18229
  resolveInScheme: HookMap<
17641
18230
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
17642
18231
  >;
@@ -17871,6 +18460,9 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
17871
18460
  > &
17872
18461
  Record<string, SyncBailHook<[Generator, GeneratorOptions], void>>
17873
18462
  >;
18463
+ /**
18464
+ * @since 5.81.0
18465
+ */
17874
18466
  createModuleClass: HookMap<
17875
18467
  SyncBailHook<[CreateData, ResolveData], void | Module>
17876
18468
  >;
@@ -19560,6 +20152,7 @@ declare interface OutputFileSystem {
19560
20152
  declare interface OutputHtmlOptions {
19561
20153
  /**
19562
20154
  * Inject a `<base>` element into the page `<head>`. A string sets `href`; an object sets both `href` and optionally `target`. Skipped if the HTML already contains a `<base>` element.
20155
+ * @since 5.109.0
19563
20156
  */
19564
20157
  base?:
19565
20158
  | string
@@ -19596,6 +20189,7 @@ declare interface OutputHtmlOptions {
19596
20189
 
19597
20190
  /**
19598
20191
  * Favicon(s) for webpack-generated HTML (authored pages are left untouched). `false` (default) injects nothing; `true` injects the webpack logo; a string is a path to an icon; an object maps each `<link rel>` to an icon — a path string, an object with the icon `href` plus extra link attributes (`sizes`, `media`, `color`, `type`, `crossorigin`), or an array of these for multiple icons under the same `rel` (e.g. several `sizes`, or light/dark `media` variants); a function receives the page name and returns one of these. Every icon is emitted as a hashed asset.
20192
+ * @since 5.109.0
19599
20193
  */
19600
20194
  favicon?:
19601
20195
  | string
@@ -19668,16 +20262,19 @@ declare interface OutputHtmlOptions {
19668
20262
 
19669
20263
  /**
19670
20264
  * Where to place injected chunk `<script>`/`<link>` tags. `"body"` (default; `"head"` with `output.module`) keeps them next to the entry tag — end of `<body>` on generated pages; `"head"` moves them into `<head>`; `false` suppresses sibling-chunk injection (entry tags and resource hints remain).
20265
+ * @since 5.109.0
19671
20266
  */
19672
20267
  inject?: false | "body" | "head";
19673
20268
 
19674
20269
  /**
19675
20270
  * Inline the content of matching chunks directly into the HTML instead of emitting a separate `<script>`/`<link>` tag. `true` inlines every chunk; `"script"` inlines only JavaScript, `"style"` only CSS; an array of `RegExp` patterns matches against the chunk name.
20271
+ * @since 5.109.0
19676
20272
  */
19677
20273
  inline?: boolean | "script" | "style" | RegExp[];
19678
20274
 
19679
20275
  /**
19680
20276
  * Add Subresource Integrity (SRI) `integrity` attributes to injected `<script>`/`<link>` tags. `true` uses `['sha384']`; an array sets the hash algorithms; a function receives each referenced asset and returns the algorithms to use or `false` to skip it.
20277
+ * @since 5.109.0
19681
20278
  */
19682
20279
  integrity?:
19683
20280
  | boolean
@@ -19695,6 +20292,7 @@ declare interface OutputHtmlOptions {
19695
20292
 
19696
20293
  /**
19697
20294
  * Inject `<meta>` tags into the page `<head>`. Each key is the `name` attribute (or `"charset"` for a charset declaration); the value is the `content` string. Keys beginning with `og:` use the `property` attribute instead of `name`. A tag is skipped if the HTML already contains a meta with the same name.
20295
+ * @since 5.109.0
19698
20296
  */
19699
20297
  meta?: { [index: string]: string };
19700
20298
 
@@ -19705,6 +20303,7 @@ declare interface OutputHtmlOptions {
19705
20303
 
19706
20304
  /**
19707
20305
  * Sets the `<title>` of the generated HTML page. Skipped if the HTML already contains a `<title>` element.
20306
+ * @since 5.109.0
19708
20307
  */
19709
20308
  title?: string;
19710
20309
  }
@@ -21423,9 +22022,12 @@ declare class RealContentHashPlugin {
21423
22022
  * Applies the plugin by registering its hooks on the compiler.
21424
22023
  */
21425
22024
  apply(compiler: Compiler): void;
21426
- static getCompilationHooks: (
21427
- compilation: Compilation
21428
- ) => CompilationHooksRealContentHashPlugin;
22025
+ static getCompilationHooks: (compilation: Compilation) => {
22026
+ /**
22027
+ * @since 5.8.0
22028
+ */
22029
+ updateHash: SyncBailHook<[Buffer[], string], string | void>;
22030
+ };
21429
22031
  }
21430
22032
  declare interface RealContentHashPluginOptions {
21431
22033
  /**
@@ -21640,13 +22242,6 @@ declare interface RemotesConfig {
21640
22242
  declare interface RemotesObject {
21641
22243
  [index: string]: string | RemotesConfig | string[];
21642
22244
  }
21643
-
21644
- /**
21645
- * Renames an inlined module's top-level declaration (and all its references) when
21646
- * its name is already taken in the shared startup scope, recording the chosen name
21647
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
21648
- * IIFE by resolving name collisions instead of isolating each module.
21649
- */
21650
22245
  declare interface RenderBootstrapContext {
21651
22246
  /**
21652
22247
  * the chunk
@@ -21719,13 +22314,6 @@ declare interface RenderContextCssModulesPlugin {
21719
22314
  */
21720
22315
  modules: CssModule[];
21721
22316
  }
21722
-
21723
- /**
21724
- * Renames an inlined module's top-level declaration (and all its references) when
21725
- * its name is already taken in the shared startup scope, recording the chosen name
21726
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
21727
- * IIFE by resolving name collisions instead of isolating each module.
21728
- */
21729
22317
  declare interface RenderContextJavascriptModulesPlugin {
21730
22318
  /**
21731
22319
  * the chunk
@@ -22629,10 +23217,12 @@ declare interface ResourceDataWithData {
22629
23217
 
22630
23218
  /**
22631
23219
  * Full resource-hint configuration.
23220
+ * @since 5.109.0
22632
23221
  */
22633
23222
  declare interface ResourceHintsOptions {
22634
23223
  /**
22635
23224
  * Initial dependency-graph chunk hints. `true` auto-emits `<link rel="modulepreload">` (ESM output) or `<link rel="preload" as="script">` (classic) for each of the entry's initial dependency chunks; `"prefetch"` uses `<link rel="prefetch">`; `"preload"` is an alias of `true`; `false` disables chunk hints (URL-asset hints from magic comments / `urlHints` still fire); `"none"` is a hard off switch (no `<link>` anywhere, empty stats / manifest); an array of `HtmlResourceHint` descriptors replaces the auto set; a function receives the auto `defaultHints` plus context (`entryName`, `entrypoint`, `hostType: "html" | "js"`, `compilation`) and returns the final list (replaces the removed `resolveDependencies` hook).
23225
+ * @since 5.109.0
22636
23226
  */
22637
23227
  initial?:
22638
23228
  | boolean
@@ -24939,13 +25529,6 @@ declare interface StarListSerializerContext {
24939
25529
  obj?: LazyOptions
24940
25530
  ) => LazyFunction<any, any, any, LazyOptions>;
24941
25531
  }
24942
-
24943
- /**
24944
- * Renames an inlined module's top-level declaration (and all its references) when
24945
- * its name is already taken in the shared startup scope, recording the chosen name
24946
- * in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
24947
- * IIFE by resolving name collisions instead of isolating each module.
24948
- */
24949
25532
  declare interface StartupRenderContext {
24950
25533
  /**
24951
25534
  * the chunk
@@ -25394,6 +25977,7 @@ declare interface StatsOptions {
25394
25977
 
25395
25978
  /**
25396
25979
  * Include the resolved `<link>` resource-hint descriptors for each entrypoint (`entrypoints[name].resourceHints`). Combines `output.resourceHints.chunks` (initial-graph modulepreload/preload/prefetch) with `output.resourceHints.assets` (URL-referenced fonts / images / …). Lets SSR frameworks inject the hints server-side without walking the chunk graph themselves; the analogue of Vite's `build.ssrManifest`.
25980
+ * @since 5.109.0
25397
25981
  */
25398
25982
  chunkGroupResourceHints?: boolean;
25399
25983
 
@@ -26148,6 +26732,7 @@ declare interface UpdateHashContextGenerator {
26148
26732
 
26149
26733
  /**
26150
26734
  * One default-hint rule for URL-referenced assets emitted by this parser (JS `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`). `test` / `include` / `exclude` match against the asset's request; omit all three to apply to every asset. Matching rules set the same fields a `webpackPrefetch` / `webpackPreload` / `webpackAs` / `webpackType` / `webpackMedia` / `webpackFetchPriority` magic comment would; explicit magic comments on the same URL still win.
26735
+ * @since 5.109.0
26151
26736
  */
26152
26737
  declare interface UrlHintRule {
26153
26738
  /**