webpack 5.87.0 → 5.88.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.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

Files changed (144) hide show
  1. package/lib/APIPlugin.js +1 -1
  2. package/lib/AsyncDependenciesBlock.js +3 -3
  3. package/lib/ChunkGraph.js +4 -4
  4. package/lib/ChunkGroup.js +9 -3
  5. package/lib/CompatibilityPlugin.js +50 -30
  6. package/lib/Compilation.js +2 -1
  7. package/lib/ContextModule.js +4 -1
  8. package/lib/ContextReplacementPlugin.js +13 -0
  9. package/lib/DelegatedModule.js +15 -3
  10. package/lib/DelegatedModuleFactoryPlugin.js +6 -0
  11. package/lib/Dependency.js +11 -5
  12. package/lib/DllEntryPlugin.js +11 -1
  13. package/lib/DllReferencePlugin.js +13 -1
  14. package/lib/Entrypoint.js +1 -1
  15. package/lib/ErrorHelpers.js +1 -0
  16. package/lib/EvalSourceMapDevToolPlugin.js +4 -0
  17. package/lib/ExportsInfo.js +17 -3
  18. package/lib/ExportsInfoApiPlugin.js +14 -5
  19. package/lib/ExternalModule.js +5 -0
  20. package/lib/FlagAllModulesAsUsedPlugin.js +6 -1
  21. package/lib/FlagDependencyUsagePlugin.js +3 -1
  22. package/lib/HotModuleReplacementPlugin.js +8 -0
  23. package/lib/InitFragment.js +28 -5
  24. package/lib/JavascriptMetaInfoPlugin.js +11 -6
  25. package/lib/LibManifestPlugin.js +20 -4
  26. package/lib/Module.js +7 -2
  27. package/lib/ModuleProfile.js +1 -0
  28. package/lib/ModuleRestoreError.js +2 -0
  29. package/lib/NodeStuffPlugin.js +32 -6
  30. package/lib/ProvidePlugin.js +13 -4
  31. package/lib/RawModule.js +3 -1
  32. package/lib/RequireJsStuffPlugin.js +7 -0
  33. package/lib/RuntimeModule.js +3 -3
  34. package/lib/RuntimePlugin.js +4 -2
  35. package/lib/RuntimeTemplate.js +2 -2
  36. package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -0
  37. package/lib/SourceMapDevToolPlugin.js +7 -2
  38. package/lib/UseStrictPlugin.js +10 -3
  39. package/lib/WebpackIsIncludedPlugin.js +6 -4
  40. package/lib/asset/AssetGenerator.js +2 -1
  41. package/lib/asset/AssetParser.js +11 -6
  42. package/lib/asset/AssetSourceParser.js +8 -3
  43. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -0
  44. package/lib/cache/IdleFileCachePlugin.js +2 -1
  45. package/lib/cache/PackFileCacheStrategy.js +35 -14
  46. package/lib/config/browserslistTargetHandler.js +7 -7
  47. package/lib/config/defaults.js +12 -24
  48. package/lib/container/RemoteRuntimeModule.js +1 -1
  49. package/lib/css/CssLoadingRuntimeModule.js +30 -13
  50. package/lib/css/CssParser.js +11 -1
  51. package/lib/dependencies/AMDDefineDependency.js +34 -4
  52. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +5 -0
  53. package/lib/dependencies/AMDRuntimeModules.js +2 -2
  54. package/lib/dependencies/CommonJsExportsParserPlugin.js +14 -4
  55. package/lib/dependencies/CommonJsImportsParserPlugin.js +169 -59
  56. package/lib/dependencies/CommonJsPlugin.js +13 -8
  57. package/lib/dependencies/CommonJsRequireContextDependency.js +2 -2
  58. package/lib/dependencies/ContextDependency.js +7 -2
  59. package/lib/dependencies/CssImportDependency.js +1 -1
  60. package/lib/dependencies/CssLocalIdentifierDependency.js +5 -0
  61. package/lib/dependencies/CssUrlDependency.js +3 -3
  62. package/lib/dependencies/DllEntryDependency.js +5 -0
  63. package/lib/dependencies/DynamicExports.js +10 -6
  64. package/lib/dependencies/ExportsInfoDependency.js +14 -4
  65. package/lib/dependencies/HarmonyCompatibilityDependency.js +2 -1
  66. package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -1
  67. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +12 -5
  68. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +2 -0
  69. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +4 -4
  70. package/lib/dependencies/HarmonyExports.js +9 -5
  71. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +32 -17
  72. package/lib/dependencies/HarmonyImportSideEffectDependency.js +1 -2
  73. package/lib/dependencies/HarmonyImportSpecifierDependency.js +19 -9
  74. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -3
  75. package/lib/dependencies/ImportDependency.js +5 -3
  76. package/lib/dependencies/ImportEagerDependency.js +5 -3
  77. package/lib/dependencies/ImportMetaPlugin.js +31 -15
  78. package/lib/dependencies/ImportParserPlugin.js +38 -25
  79. package/lib/dependencies/ImportWeakDependency.js +5 -3
  80. package/lib/dependencies/ModuleDependency.js +1 -1
  81. package/lib/dependencies/ModuleDependencyTemplateAsId.js +2 -1
  82. package/lib/dependencies/ProvidedDependency.js +4 -1
  83. package/lib/dependencies/RequireContextDependencyParserPlugin.js +13 -5
  84. package/lib/dependencies/RequireEnsureDependenciesBlock.js +5 -2
  85. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +6 -1
  86. package/lib/dependencies/RequireHeaderDependency.js +4 -0
  87. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +26 -5
  88. package/lib/dependencies/RequireResolveHeaderDependency.js +9 -0
  89. package/lib/dependencies/SystemPlugin.js +17 -5
  90. package/lib/dependencies/SystemRuntimeModule.js +1 -1
  91. package/lib/dependencies/URLDependency.js +2 -2
  92. package/lib/dependencies/URLPlugin.js +9 -4
  93. package/lib/dependencies/WebAssemblyImportDependency.js +1 -1
  94. package/lib/dependencies/WorkerPlugin.js +59 -22
  95. package/lib/esm/ExportWebpackRequireRuntimeModule.js +1 -1
  96. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -1
  97. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  98. package/lib/ids/HashedModuleIdsPlugin.js +1 -1
  99. package/lib/javascript/JavascriptParser.js +17 -5
  100. package/lib/logging/runtime.js +1 -1
  101. package/lib/logging/truncateArgs.js +4 -0
  102. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +10 -6
  103. package/lib/node/RequireChunkLoadingRuntimeModule.js +10 -6
  104. package/lib/optimize/InnerGraph.js +1 -1
  105. package/lib/optimize/InnerGraphPlugin.js +2 -1
  106. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +1 -1
  107. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +1 -1
  108. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -1
  109. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -1
  110. package/lib/runtime/AsyncModuleRuntimeModule.js +4 -4
  111. package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -1
  112. package/lib/runtime/BaseUriRuntimeModule.js +1 -1
  113. package/lib/runtime/ChunkNameRuntimeModule.js +1 -1
  114. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +1 -1
  115. package/lib/runtime/CompatRuntimeModule.js +1 -1
  116. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +1 -1
  117. package/lib/runtime/CreateScriptRuntimeModule.js +1 -1
  118. package/lib/runtime/CreateScriptUrlRuntimeModule.js +1 -1
  119. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +1 -1
  120. package/lib/runtime/EnsureChunkRuntimeModule.js +1 -1
  121. package/lib/runtime/GetChunkFilenameRuntimeModule.js +1 -1
  122. package/lib/runtime/GetFullHashRuntimeModule.js +1 -1
  123. package/lib/runtime/GetMainFilenameRuntimeModule.js +1 -1
  124. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
  125. package/lib/runtime/GlobalRuntimeModule.js +1 -1
  126. package/lib/runtime/HasOwnPropertyRuntimeModule.js +1 -1
  127. package/lib/runtime/LoadScriptRuntimeModule.js +1 -1
  128. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +1 -1
  129. package/lib/runtime/NonceRuntimeModule.js +1 -1
  130. package/lib/runtime/OnChunksLoadedRuntimeModule.js +1 -1
  131. package/lib/runtime/PublicPathRuntimeModule.js +1 -1
  132. package/lib/runtime/RelativeUrlRuntimeModule.js +1 -1
  133. package/lib/runtime/RuntimeIdRuntimeModule.js +1 -1
  134. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -1
  135. package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -1
  136. package/lib/runtime/SystemContextRuntimeModule.js +1 -1
  137. package/lib/sharing/ConsumeSharedRuntimeModule.js +1 -1
  138. package/lib/sharing/ShareRuntimeModule.js +1 -1
  139. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +1 -1
  140. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +1 -1
  141. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -1
  142. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
  143. package/package.json +2 -1
  144. package/types.d.ts +86 -38
@@ -17,7 +17,7 @@ class ChunkNameRuntimeModule extends RuntimeModule {
17
17
  }
18
18
 
19
19
  /**
20
- * @returns {string} runtime code
20
+ * @returns {string | null} runtime code
21
21
  */
22
22
  generate() {
23
23
  return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`;
@@ -16,7 +16,7 @@ class CompatGetDefaultExportRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -19,7 +19,7 @@ class CompatRuntimeModule extends RuntimeModule {
19
19
  }
20
20
 
21
21
  /**
22
- * @returns {string} runtime code
22
+ * @returns {string | null} runtime code
23
23
  */
24
24
  generate() {
25
25
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class CreateFakeNamespaceObjectRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class CreateScriptRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class CreateScriptUrlRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class DefinePropertyGettersRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -20,7 +20,7 @@ class EnsureChunkRuntimeModule extends RuntimeModule {
20
20
  }
21
21
 
22
22
  /**
23
- * @returns {string} runtime code
23
+ * @returns {string | null} runtime code
24
24
  */
25
25
  generate() {
26
26
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -35,7 +35,7 @@ class GetChunkFilenameRuntimeModule extends RuntimeModule {
35
35
  }
36
36
 
37
37
  /**
38
- * @returns {string} runtime code
38
+ * @returns {string | null} runtime code
39
39
  */
40
40
  generate() {
41
41
  const { global, contentType, getFilenameForChunk, allChunks } = this;
@@ -16,7 +16,7 @@ class GetFullHashRuntimeModule extends RuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -24,7 +24,7 @@ class GetMainFilenameRuntimeModule extends RuntimeModule {
24
24
  }
25
25
 
26
26
  /**
27
- * @returns {string} runtime code
27
+ * @returns {string | null} runtime code
28
28
  */
29
29
  generate() {
30
30
  const { global, filename } = this;
@@ -20,7 +20,7 @@ class GetTrustedTypesPolicyRuntimeModule extends HelperRuntimeModule {
20
20
  }
21
21
 
22
22
  /**
23
- * @returns {string} runtime code
23
+ * @returns {string | null} runtime code
24
24
  */
25
25
  generate() {
26
26
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -14,7 +14,7 @@ class GlobalRuntimeModule extends RuntimeModule {
14
14
  }
15
15
 
16
16
  /**
17
- * @returns {string} runtime code
17
+ * @returns {string | null} runtime code
18
18
  */
19
19
  generate() {
20
20
  return Template.asString([
@@ -17,7 +17,7 @@ class HasOwnPropertyRuntimeModule extends RuntimeModule {
17
17
  }
18
18
 
19
19
  /**
20
- * @returns {string} runtime code
20
+ * @returns {string | null} runtime code
21
21
  */
22
22
  generate() {
23
23
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -53,7 +53,7 @@ class LoadScriptRuntimeModule extends HelperRuntimeModule {
53
53
  }
54
54
 
55
55
  /**
56
- * @returns {string} runtime code
56
+ * @returns {string | null} runtime code
57
57
  */
58
58
  generate() {
59
59
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class MakeNamespaceObjectRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -14,7 +14,7 @@ class NonceRuntimeModule extends RuntimeModule {
14
14
  }
15
15
 
16
16
  /**
17
- * @returns {string} runtime code
17
+ * @returns {string | null} runtime code
18
18
  */
19
19
  generate() {
20
20
  return `${RuntimeGlobals.scriptNonce} = undefined;`;
@@ -16,7 +16,7 @@ class OnChunksLoadedRuntimeModule extends RuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -20,7 +20,7 @@ class PublicPathRuntimeModule extends RuntimeModule {
20
20
  }
21
21
 
22
22
  /**
23
- * @returns {string} runtime code
23
+ * @returns {string | null} runtime code
24
24
  */
25
25
  generate() {
26
26
  const { publicPath } = this;
@@ -16,7 +16,7 @@ class RelativeUrlRuntimeModule extends HelperRuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -16,7 +16,7 @@ class RuntimeIdRuntimeModule extends RuntimeModule {
16
16
  }
17
17
 
18
18
  /**
19
- * @returns {string} runtime code
19
+ * @returns {string | null} runtime code
20
20
  */
21
21
  generate() {
22
22
  const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
@@ -23,7 +23,7 @@ class StartupChunkDependenciesRuntimeModule extends RuntimeModule {
23
23
  }
24
24
 
25
25
  /**
26
- * @returns {string} runtime code
26
+ * @returns {string | null} runtime code
27
27
  */
28
28
  generate() {
29
29
  const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
@@ -20,7 +20,7 @@ class StartupEntrypointRuntimeModule extends RuntimeModule {
20
20
  }
21
21
 
22
22
  /**
23
- * @returns {string} runtime code
23
+ * @returns {string | null} runtime code
24
24
  */
25
25
  generate() {
26
26
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -15,7 +15,7 @@ class SystemContextRuntimeModule extends RuntimeModule {
15
15
  }
16
16
 
17
17
  /**
18
- * @returns {string} runtime code
18
+ * @returns {string | null} runtime code
19
19
  */
20
20
  generate() {
21
21
  return `${RuntimeGlobals.systemContext} = __system_context__;`;
@@ -32,7 +32,7 @@ class ConsumeSharedRuntimeModule extends RuntimeModule {
32
32
  }
33
33
 
34
34
  /**
35
- * @returns {string} runtime code
35
+ * @returns {string | null} runtime code
36
36
  */
37
37
  generate() {
38
38
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -23,7 +23,7 @@ class ShareRuntimeModule extends RuntimeModule {
23
23
  }
24
24
 
25
25
  /**
26
- * @returns {string} runtime code
26
+ * @returns {string | null} runtime code
27
27
  */
28
28
  generate() {
29
29
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -29,7 +29,7 @@ class AsyncWasmLoadingRuntimeModule extends RuntimeModule {
29
29
  }
30
30
 
31
31
  /**
32
- * @returns {string} runtime code
32
+ * @returns {string | null} runtime code
33
33
  */
34
34
  generate() {
35
35
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -226,7 +226,7 @@ class WasmChunkLoadingRuntimeModule extends RuntimeModule {
226
226
  }
227
227
 
228
228
  /**
229
- * @returns {string} runtime code
229
+ * @returns {string | null} runtime code
230
230
  */
231
231
  generate() {
232
232
  const fn = RuntimeGlobals.ensureChunkHandlers;
@@ -70,7 +70,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
70
70
  }
71
71
 
72
72
  /**
73
- * @returns {string} runtime code
73
+ * @returns {string | null} runtime code
74
74
  */
75
75
  generate() {
76
76
  const compilation = /** @type {Compilation} */ (this.compilation);
@@ -59,7 +59,7 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
59
59
  }
60
60
 
61
61
  /**
62
- * @returns {string} runtime code
62
+ * @returns {string | null} runtime code
63
63
  */
64
64
  generate() {
65
65
  const compilation = /** @type {Compilation} */ (this.compilation);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.87.0",
3
+ "version": "5.88.0",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "license": "MIT",
@@ -39,6 +39,7 @@
39
39
  "@babel/core": "^7.21.4",
40
40
  "@babel/preset-react": "^7.18.6",
41
41
  "@types/jest": "^29.5.0",
42
+ "@types/mime-types": "^2.1.1",
42
43
  "@types/node": "^20.1.7",
43
44
  "assemblyscript": "^0.27.2",
44
45
  "babel-loader": "^8.1.0",
package/types.d.ts CHANGED
@@ -13,7 +13,6 @@ import {
13
13
  AssignmentPattern,
14
14
  AssignmentProperty,
15
15
  AwaitExpression,
16
- BaseCallExpression,
17
16
  BigIntLiteral,
18
17
  BinaryExpression,
19
18
  BlockStatement,
@@ -352,17 +351,19 @@ declare interface AssetResourceGeneratorOptions {
352
351
  }
353
352
  declare class AsyncDependenciesBlock extends DependenciesBlock {
354
353
  constructor(
355
- groupOptions: RawChunkGroupOptions & { name?: string } & {
356
- entryOptions?: EntryOptions;
357
- },
358
- loc?: SyntheticDependencyLocation | RealDependencyLocation,
359
- request?: string
354
+ groupOptions:
355
+ | null
356
+ | (RawChunkGroupOptions & { name?: string } & {
357
+ entryOptions?: EntryOptions;
358
+ }),
359
+ loc?: null | SyntheticDependencyLocation | RealDependencyLocation,
360
+ request?: null | string
360
361
  );
361
362
  groupOptions: RawChunkGroupOptions & { name?: string } & {
362
363
  entryOptions?: EntryOptions;
363
364
  };
364
- loc?: SyntheticDependencyLocation | RealDependencyLocation;
365
- request?: string;
365
+ loc?: null | SyntheticDependencyLocation | RealDependencyLocation;
366
+ request?: null | string;
366
367
  chunkName?: string;
367
368
  module: any;
368
369
  }
@@ -2841,7 +2842,7 @@ declare interface ContextModuleOptions {
2841
2842
  /**
2842
2843
  * exports referenced from modules (won't be mangled)
2843
2844
  */
2844
- referencedExports?: string[][];
2845
+ referencedExports?: null | string[][];
2845
2846
  layer?: string;
2846
2847
  resource: string | false | string[];
2847
2848
  resourceQuery?: string;
@@ -2850,18 +2851,22 @@ declare interface ContextModuleOptions {
2850
2851
  }
2851
2852
  declare class ContextReplacementPlugin {
2852
2853
  constructor(
2853
- resourceRegExp?: any,
2854
+ resourceRegExp: RegExp,
2854
2855
  newContentResource?: any,
2855
2856
  newContentRecursive?: any,
2856
2857
  newContentRegExp?: any
2857
2858
  );
2858
- resourceRegExp: any;
2859
+ resourceRegExp: RegExp;
2859
2860
  newContentCallback: any;
2860
2861
  newContentResource: any;
2861
2862
  newContentCreateContextMap: any;
2862
2863
  newContentRecursive: any;
2863
2864
  newContentRegExp: any;
2864
- apply(compiler?: any): void;
2865
+
2866
+ /**
2867
+ * Apply the plugin
2868
+ */
2869
+ apply(compiler: Compiler): void;
2865
2870
  }
2866
2871
  declare interface ContextTimestampAndHash {
2867
2872
  safeTime: number;
@@ -2949,10 +2954,10 @@ declare class Dependency {
2949
2954
  get category(): string;
2950
2955
  loc: DependencyLocation;
2951
2956
  setLoc(
2952
- startLine?: any,
2953
- startColumn?: any,
2954
- endLine?: any,
2955
- endColumn?: any
2957
+ startLine: number,
2958
+ startColumn: number,
2959
+ endLine: number,
2960
+ endColumn: number
2956
2961
  ): void;
2957
2962
  getContext(): undefined | string;
2958
2963
  getResourceIdentifier(): null | string;
@@ -2985,12 +2990,12 @@ declare class Dependency {
2985
2990
  /**
2986
2991
  * Returns warnings
2987
2992
  */
2988
- getWarnings(moduleGraph: ModuleGraph): WebpackError[];
2993
+ getWarnings(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
2989
2994
 
2990
2995
  /**
2991
2996
  * Returns errors
2992
2997
  */
2993
- getErrors(moduleGraph: ModuleGraph): WebpackError[];
2998
+ getErrors(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
2994
2999
 
2995
3000
  /**
2996
3001
  * Update the hash
@@ -3004,7 +3009,7 @@ declare class Dependency {
3004
3009
  getModuleEvaluationSideEffectsState(
3005
3010
  moduleGraph: ModuleGraph
3006
3011
  ): ConnectionState;
3007
- createIgnoredModule(context: string): Module;
3012
+ createIgnoredModule(context: string): null | Module;
3008
3013
  serialize(__0: ObjectSerializerContext): void;
3009
3014
  deserialize(__0: ObjectDeserializerContext): void;
3010
3015
  module: any;
@@ -3218,7 +3223,11 @@ declare interface DllPluginOptions {
3218
3223
  declare class DllReferencePlugin {
3219
3224
  constructor(options: DllReferencePluginOptions);
3220
3225
  options: DllReferencePluginOptions;
3221
- apply(compiler?: any): void;
3226
+
3227
+ /**
3228
+ * Apply the plugin
3229
+ */
3230
+ apply(compiler: Compiler): void;
3222
3231
  }
3223
3232
  type DllReferencePluginOptions =
3224
3233
  | {
@@ -4232,7 +4241,11 @@ declare interface ExternalItemObjectUnknown {
4232
4241
  }
4233
4242
  type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
4234
4243
  declare class ExternalModule extends Module {
4235
- constructor(request?: any, type?: any, userRequest?: any);
4244
+ constructor(
4245
+ request: string | string[] | Record<string, string | string[]>,
4246
+ type: any,
4247
+ userRequest: string
4248
+ );
4236
4249
  request: string | string[] | Record<string, string | string[]>;
4237
4250
  externalType: string;
4238
4251
  userRequest: string;
@@ -4348,6 +4361,9 @@ declare interface FactorizeModuleOptions {
4348
4361
  contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
4349
4362
  context?: string;
4350
4363
  }
4364
+ declare interface FactoryMeta {
4365
+ sideEffectFree?: boolean;
4366
+ }
4351
4367
  type FakeHook<T> = T & FakeHookMarker;
4352
4368
  declare interface FakeHookMarker {}
4353
4369
  declare interface FallbackCacheGroup {
@@ -5119,8 +5135,8 @@ declare abstract class InitFragment<Context> {
5119
5135
  endContent?: string | Source;
5120
5136
  getContent(context: Context): string | Source;
5121
5137
  getEndContent(context: Context): undefined | string | Source;
5122
- serialize(context?: any): void;
5123
- deserialize(context?: any): void;
5138
+ serialize(context: ObjectSerializerContext): void;
5139
+ deserialize(context: ObjectDeserializerContext): void;
5124
5140
  merge: any;
5125
5141
  }
5126
5142
  declare interface InputFileSystem {
@@ -5502,7 +5518,7 @@ declare class JavascriptParser extends Parser {
5502
5518
  typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
5503
5519
  importCall: SyncBailHook<[ImportExpression], boolean | void>;
5504
5520
  topLevelAwait: SyncBailHook<[Expression], boolean | void>;
5505
- call: HookMap<SyncBailHook<[BaseCallExpression], boolean | void>>;
5521
+ call: HookMap<SyncBailHook<[CallExpression], boolean | void>>;
5506
5522
  callMemberChain: HookMap<
5507
5523
  SyncBailHook<
5508
5524
  [CallExpression, string[], boolean[], [number, number][]],
@@ -5517,7 +5533,7 @@ declare class JavascriptParser extends Parser {
5517
5533
  >;
5518
5534
  callMemberChainOfCallMemberChain: HookMap<
5519
5535
  SyncBailHook<
5520
- [Expression, string[], CallExpression, string[]],
5536
+ [CallExpression, string[], CallExpression, string[]],
5521
5537
  boolean | void
5522
5538
  >
5523
5539
  >;
@@ -5527,12 +5543,12 @@ declare class JavascriptParser extends Parser {
5527
5543
  expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
5528
5544
  expressionMemberChain: HookMap<
5529
5545
  SyncBailHook<
5530
- [Expression, string[], boolean[], [number, number][]],
5546
+ [MemberExpression, string[], boolean[], [number, number][]],
5531
5547
  boolean | void
5532
5548
  >
5533
5549
  >;
5534
5550
  unhandledExpressionMemberChain: HookMap<
5535
- SyncBailHook<[Expression, string[]], boolean | void>
5551
+ SyncBailHook<[MemberExpression, string[]], boolean | void>
5536
5552
  >;
5537
5553
  expressionConditionalOperator: SyncBailHook<
5538
5554
  [ConditionalExpression],
@@ -6884,14 +6900,45 @@ declare interface LibIdentOptions {
6884
6900
  associatedObjectForCache?: Object;
6885
6901
  }
6886
6902
  declare class LibManifestPlugin {
6887
- constructor(options?: any);
6888
- options: any;
6903
+ constructor(options: LibManifestPluginOptions);
6904
+ options: LibManifestPluginOptions;
6889
6905
 
6890
6906
  /**
6891
6907
  * Apply the plugin
6892
6908
  */
6893
6909
  apply(compiler: Compiler): void;
6894
6910
  }
6911
+ declare interface LibManifestPluginOptions {
6912
+ /**
6913
+ * Context of requests in the manifest file (defaults to the webpack context).
6914
+ */
6915
+ context?: string;
6916
+
6917
+ /**
6918
+ * If true, only entry points will be exposed (default: true).
6919
+ */
6920
+ entryOnly?: boolean;
6921
+
6922
+ /**
6923
+ * If true, manifest json file (output) will be formatted.
6924
+ */
6925
+ format?: boolean;
6926
+
6927
+ /**
6928
+ * Name of the exposed dll function (external name, use value of 'output.library').
6929
+ */
6930
+ name?: string;
6931
+
6932
+ /**
6933
+ * Absolute path to the manifest json file (output).
6934
+ */
6935
+ path: string;
6936
+
6937
+ /**
6938
+ * Type of the dll bundle (external type, use value of 'output.libraryTarget').
6939
+ */
6940
+ type?: string;
6941
+ }
6895
6942
  declare interface LibraryContext<T> {
6896
6943
  compilation: Compilation;
6897
6944
  chunkGraph: ChunkGraph;
@@ -7470,7 +7517,7 @@ declare class Module extends DependenciesBlock {
7470
7517
  needId: boolean;
7471
7518
  debugId: number;
7472
7519
  resolveOptions?: ResolveOptionsWebpackOptions;
7473
- factoryMeta?: object;
7520
+ factoryMeta?: FactoryMeta;
7474
7521
  useSourceMap: boolean;
7475
7522
  useSimpleSourceMap: boolean;
7476
7523
  buildMeta?: BuildMeta;
@@ -7503,7 +7550,7 @@ declare class Module extends DependenciesBlock {
7503
7550
  get moduleArgument(): string;
7504
7551
  getExportsType(
7505
7552
  moduleGraph: ModuleGraph,
7506
- strict: boolean
7553
+ strict?: boolean
7507
7554
  ): "namespace" | "default-only" | "default-with-named" | "dynamic";
7508
7555
  addPresentationalDependency(presentationalDependency: Dependency): void;
7509
7556
  addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
@@ -8042,7 +8089,7 @@ declare abstract class ModuleProfile {
8042
8089
  storingEndTime: number;
8043
8090
  storing: number;
8044
8091
  storingParallelismFactor: number;
8045
- additionalFactoryTimes: any;
8092
+ additionalFactoryTimes?: { start: number; end: number }[];
8046
8093
  additionalFactories: number;
8047
8094
  additionalFactoriesParallelismFactor: number;
8048
8095
  additionalIntegration: number;
@@ -11151,8 +11198,8 @@ declare class RuntimeModule extends Module {
11151
11198
  fullHash: boolean;
11152
11199
  dependentHash: boolean;
11153
11200
  attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
11154
- generate(): string;
11155
- getGeneratedCode(): string;
11201
+ generate(): null | string;
11202
+ getGeneratedCode(): null | string;
11156
11203
  shouldIsolate(): boolean;
11157
11204
 
11158
11205
  /**
@@ -11332,7 +11379,7 @@ declare abstract class RuntimeTemplate {
11332
11379
  /**
11333
11380
  * the module
11334
11381
  */
11335
- module: Module;
11382
+ module: null | Module;
11336
11383
  /**
11337
11384
  * the chunk graph
11338
11385
  */
@@ -11354,7 +11401,7 @@ declare abstract class RuntimeTemplate {
11354
11401
  /**
11355
11402
  * the module
11356
11403
  */
11357
- module: Module;
11404
+ module: null | Module;
11358
11405
  /**
11359
11406
  * the chunk graph
11360
11407
  */
@@ -11653,9 +11700,10 @@ declare interface ScopeInfo {
11653
11700
  definitions: StackedMap<string, ScopeInfo | VariableInfo>;
11654
11701
  topLevelScope: boolean | "arrow";
11655
11702
  inShorthand: string | boolean;
11703
+ inTaggedTemplateTag: boolean;
11704
+ inTry: boolean;
11656
11705
  isStrict: boolean;
11657
11706
  isAsmJs: boolean;
11658
- inTry: boolean;
11659
11707
  }
11660
11708
  declare interface Selector<A, B> {
11661
11709
  (input: A): B;
@@ -13743,7 +13791,7 @@ declare namespace exports {
13743
13791
  ) => boolean;
13744
13792
  export let getDependencyUsedByExportsCondition: (
13745
13793
  dependency: Dependency,
13746
- usedByExports: boolean | Set<string>,
13794
+ usedByExports: undefined | boolean | Set<string>,
13747
13795
  moduleGraph: ModuleGraph
13748
13796
  ) =>
13749
13797
  | null