@depup/webpack 5.105.4-depup.37 → 5.106.0-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 (124) hide show
  1. package/README.md +6 -3
  2. package/changes.json +50 -0
  3. package/lib/BannerPlugin.js +13 -13
  4. package/lib/Chunk.js +25 -0
  5. package/lib/ChunkGraph.js +8 -4
  6. package/lib/CleanPlugin.js +23 -20
  7. package/lib/CompatibilityPlugin.js +1 -1
  8. package/lib/Compilation.js +34 -11
  9. package/lib/Compiler.js +59 -1
  10. package/lib/CssModule.js +17 -2
  11. package/lib/Dependency.js +1 -1
  12. package/lib/DllPlugin.js +17 -17
  13. package/lib/DllReferencePlugin.js +20 -18
  14. package/lib/DotenvPlugin.js +29 -27
  15. package/lib/ExternalModule.js +39 -6
  16. package/lib/FileSystemInfo.js +3 -1
  17. package/lib/IgnorePlugin.js +12 -11
  18. package/lib/LoaderOptionsPlugin.js +17 -15
  19. package/lib/ManifestPlugin.js +27 -25
  20. package/lib/Module.js +69 -4
  21. package/lib/ModuleGraph.js +3 -0
  22. package/lib/ModuleParseError.js +1 -1
  23. package/lib/ModuleTypeConstants.js +1 -1
  24. package/lib/NormalModule.js +7 -3
  25. package/lib/NormalModuleFactory.js +20 -1
  26. package/lib/ProgressPlugin.js +39 -29
  27. package/lib/RuntimeGlobals.js +6 -0
  28. package/lib/RuntimeTemplate.js +1 -1
  29. package/lib/SourceMapDevToolPlugin.js +13 -11
  30. package/lib/TemplatedPathPlugin.js +4 -3
  31. package/lib/WatchIgnorePlugin.js +15 -13
  32. package/lib/WebpackOptionsApply.js +4 -4
  33. package/lib/asset/AssetModulesPlugin.js +50 -29
  34. package/lib/cli.js +3 -1
  35. package/lib/config/defaults.js +27 -13
  36. package/lib/config/normalization.js +3 -2
  37. package/lib/container/ContainerPlugin.js +46 -42
  38. package/lib/container/ContainerReferencePlugin.js +42 -26
  39. package/lib/container/FallbackModule.js +1 -1
  40. package/lib/container/ModuleFederationPlugin.js +17 -13
  41. package/lib/css/CssGenerator.js +306 -192
  42. package/lib/css/CssInjectStyleRuntimeModule.js +179 -0
  43. package/lib/css/CssLoadingRuntimeModule.js +1 -4
  44. package/lib/css/CssModulesPlugin.js +197 -98
  45. package/lib/css/CssParser.js +231 -134
  46. package/lib/css/walkCssTokens.js +115 -12
  47. package/lib/debug/ProfilingPlugin.js +16 -13
  48. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +20 -15
  49. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -3
  50. package/lib/dependencies/CommonJsExportRequireDependency.js +4 -2
  51. package/lib/dependencies/CommonJsExportsDependency.js +1 -1
  52. package/lib/dependencies/CommonJsExportsParserPlugin.js +1 -1
  53. package/lib/dependencies/CommonJsFullRequireDependency.js +1 -1
  54. package/lib/dependencies/CommonJsImportsParserPlugin.js +63 -2
  55. package/lib/dependencies/CommonJsRequireContextDependency.js +21 -0
  56. package/lib/dependencies/CommonJsRequireDependency.js +42 -1
  57. package/lib/dependencies/CommonJsSelfReferenceDependency.js +1 -1
  58. package/lib/dependencies/ContextElementDependency.js +1 -1
  59. package/lib/dependencies/CssIcssExportDependency.js +210 -87
  60. package/lib/dependencies/CssIcssImportDependency.js +13 -70
  61. package/lib/dependencies/CssIcssSymbolDependency.js +19 -30
  62. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +13 -2
  63. package/lib/dependencies/HarmonyExportExpressionDependency.js +28 -2
  64. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +13 -3
  65. package/lib/dependencies/HarmonyExportInitFragment.js +1 -1
  66. package/lib/dependencies/HarmonyImportDependency.js +21 -8
  67. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +4 -1
  68. package/lib/dependencies/HarmonyImportSideEffectDependency.js +2 -2
  69. package/lib/dependencies/HarmonyImportSpecifierDependency.js +13 -2
  70. package/lib/dependencies/ImportContextDependency.js +1 -1
  71. package/lib/dependencies/ImportDependency.js +16 -2
  72. package/lib/dependencies/ImportMetaPlugin.js +39 -29
  73. package/lib/dependencies/ImportParserPlugin.js +4 -5
  74. package/lib/dependencies/ImportPhase.js +65 -22
  75. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -1
  76. package/lib/esm/ModuleChunkFormatPlugin.js +1 -4
  77. package/lib/ids/HashedModuleIdsPlugin.js +21 -23
  78. package/lib/ids/OccurrenceChunkIdsPlugin.js +15 -11
  79. package/lib/ids/OccurrenceModuleIdsPlugin.js +15 -11
  80. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -4
  81. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -4
  82. package/lib/javascript/EnableChunkLoadingPlugin.js +1 -2
  83. package/lib/javascript/JavascriptModulesPlugin.js +38 -12
  84. package/lib/javascript/JavascriptParser.js +5 -3
  85. package/lib/json/JsonModulesPlugin.js +28 -21
  86. package/lib/library/AssignLibraryPlugin.js +1 -1
  87. package/lib/library/ExportPropertyLibraryPlugin.js +1 -1
  88. package/lib/library/ModuleLibraryPlugin.js +35 -13
  89. package/lib/library/SystemLibraryPlugin.js +1 -1
  90. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +22 -0
  91. package/lib/optimize/AggressiveSplittingPlugin.js +18 -31
  92. package/lib/optimize/ConcatenatedModule.js +4 -3
  93. package/lib/optimize/InnerGraphPlugin.js +11 -5
  94. package/lib/optimize/LimitChunkCountPlugin.js +22 -18
  95. package/lib/optimize/MergeDuplicateChunksPlugin.js +15 -12
  96. package/lib/optimize/MinChunkSizePlugin.js +20 -16
  97. package/lib/optimize/RemoveEmptyChunksPlugin.js +0 -1
  98. package/lib/rules/RuleSetCompiler.js +1 -0
  99. package/lib/schemes/HttpUriPlugin.js +20 -11
  100. package/lib/schemes/VirtualUrlPlugin.js +77 -30
  101. package/lib/serialization/FileMiddleware.js +7 -7
  102. package/lib/sharing/ConsumeSharedPlugin.js +32 -25
  103. package/lib/sharing/ProvideSharedPlugin.js +29 -25
  104. package/lib/util/{propertyName.js → property.js} +26 -1
  105. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +148 -0
  106. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +54 -0
  107. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +105 -0
  108. package/lib/wasm-async/AsyncWebAssemblyParser.js +30 -6
  109. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +26 -2
  110. package/lib/web/FetchCompileAsyncWasmPlugin.js +23 -0
  111. package/lib/web/JsonpTemplatePlugin.js +1 -0
  112. package/lib/webpack.js +34 -4
  113. package/package.json +45 -27
  114. package/schemas/WebpackOptions.check.js +1 -1
  115. package/schemas/WebpackOptions.json +82 -22
  116. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
  117. package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
  118. package/schemas/plugins/css/CssParserOptions.check.js +1 -1
  119. package/schemas/plugins/optimize/LimitChunkCountPlugin.json +1 -1
  120. package/schemas/plugins/schemes/VirtualUrlPlugin.check.js +1 -1
  121. package/schemas/plugins/schemes/VirtualUrlPlugin.json +8 -0
  122. package/types.d.ts +511 -114
  123. package/lib/util/create-schema-validation.js +0 -41
  124. package/lib/util/propertyAccess.js +0 -30
package/types.d.ts CHANGED
@@ -104,6 +104,7 @@ import {
104
104
  import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
105
105
  import { ListenOptions } from "net";
106
106
  import {
107
+ ExtendedSchema,
107
108
  ValidationErrorConfiguration,
108
109
  validate as validateFunction
109
110
  } from "schema-utils";
@@ -920,9 +921,9 @@ declare abstract class BasicEvaluatedExpression {
920
921
  setTemplateString(
921
922
  quasis: BasicEvaluatedExpression[],
922
923
  parts: BasicEvaluatedExpression[],
923
- kind: "raw" | "cooked"
924
+ kind: "cooked" | "raw"
924
925
  ): BasicEvaluatedExpression;
925
- templateStringKind?: "raw" | "cooked";
926
+ templateStringKind?: "cooked" | "raw";
926
927
  setTruthy(): BasicEvaluatedExpression;
927
928
  setFalsy(): BasicEvaluatedExpression;
928
929
 
@@ -1309,28 +1310,108 @@ declare class Chunk {
1309
1310
  renderedHash?: string;
1310
1311
  chunkReason?: string;
1311
1312
  extraAsync: boolean;
1313
+
1314
+ /**
1315
+ * @deprecated
1316
+ */
1312
1317
  get entryModule(): Module;
1318
+
1319
+ /**
1320
+ * @deprecated
1321
+ */
1313
1322
  hasEntryModule(): boolean;
1323
+
1324
+ /**
1325
+ * @deprecated
1326
+ */
1314
1327
  addModule(module: Module): boolean;
1328
+
1329
+ /**
1330
+ * @deprecated
1331
+ */
1315
1332
  removeModule(module: Module): void;
1333
+
1334
+ /**
1335
+ * @deprecated
1336
+ */
1316
1337
  getNumberOfModules(): number;
1338
+
1339
+ /**
1340
+ * @deprecated
1341
+ */
1317
1342
  get modulesIterable(): Iterable<Module>;
1343
+
1344
+ /**
1345
+ * @deprecated
1346
+ */
1318
1347
  compareTo(otherChunk: Chunk): 0 | 1 | -1;
1348
+
1349
+ /**
1350
+ * @deprecated
1351
+ */
1319
1352
  containsModule(module: Module): boolean;
1353
+
1354
+ /**
1355
+ * @deprecated
1356
+ */
1320
1357
  getModules(): Module[];
1358
+
1359
+ /**
1360
+ * @deprecated
1361
+ */
1321
1362
  remove(): void;
1363
+
1364
+ /**
1365
+ * @deprecated
1366
+ */
1322
1367
  moveModule(module: Module, otherChunk: Chunk): void;
1368
+
1369
+ /**
1370
+ * @deprecated
1371
+ */
1323
1372
  integrate(otherChunk: Chunk): boolean;
1373
+
1374
+ /**
1375
+ * @deprecated
1376
+ */
1324
1377
  canBeIntegrated(otherChunk: Chunk): boolean;
1378
+
1379
+ /**
1380
+ * @deprecated
1381
+ */
1325
1382
  isEmpty(): boolean;
1383
+
1384
+ /**
1385
+ * @deprecated
1386
+ */
1326
1387
  modulesSize(): number;
1388
+
1389
+ /**
1390
+ * @deprecated
1391
+ */
1327
1392
  size(options?: ChunkSizeOptions): number;
1393
+
1394
+ /**
1395
+ * @deprecated
1396
+ */
1328
1397
  integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number;
1398
+
1399
+ /**
1400
+ * @deprecated
1401
+ */
1329
1402
  getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps;
1403
+
1404
+ /**
1405
+ * @deprecated
1406
+ */
1330
1407
  hasModuleInGraph(
1331
1408
  filterFn: (m: Module) => boolean,
1332
1409
  filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
1333
1410
  ): boolean;
1411
+
1412
+ /**
1413
+ * @deprecated
1414
+ */
1334
1415
  getChunkMaps(realHash: boolean): ChunkMaps;
1335
1416
  hasRuntime(): boolean;
1336
1417
  canBeInitial(): boolean;
@@ -1545,19 +1626,43 @@ declare class ChunkGraph {
1545
1626
  withConnections?: boolean
1546
1627
  ): bigint;
1547
1628
  getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
1629
+
1630
+ /**
1631
+ * @deprecated
1632
+ */
1548
1633
  static getChunkGraphForModule(
1549
1634
  module: Module,
1550
1635
  deprecateMessage: string,
1551
1636
  deprecationCode: string
1552
1637
  ): ChunkGraph;
1638
+
1639
+ /**
1640
+ * @deprecated
1641
+ */
1553
1642
  static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void;
1643
+
1644
+ /**
1645
+ * @deprecated
1646
+ */
1554
1647
  static clearChunkGraphForModule(module: Module): void;
1648
+
1649
+ /**
1650
+ * @deprecated
1651
+ */
1555
1652
  static getChunkGraphForChunk(
1556
1653
  chunk: Chunk,
1557
1654
  deprecateMessage: string,
1558
1655
  deprecationCode: string
1559
1656
  ): ChunkGraph;
1657
+
1658
+ /**
1659
+ * @deprecated
1660
+ */
1560
1661
  static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void;
1662
+
1663
+ /**
1664
+ * @deprecated
1665
+ */
1561
1666
  static clearChunkGraphForChunk(chunk: Chunk): void;
1562
1667
  }
1563
1668
  declare abstract class ChunkGroup {
@@ -1944,7 +2049,7 @@ declare interface CleanOptions {
1944
2049
  }
1945
2050
  declare class CleanPlugin {
1946
2051
  constructor(options?: CleanOptions);
1947
- options: CleanOptions & { dry: boolean };
2052
+ options: CleanOptions;
1948
2053
 
1949
2054
  /**
1950
2055
  * Apply the plugin
@@ -2294,31 +2399,49 @@ declare class Compilation {
2294
2399
  beforeModuleAssets: SyncHook<[]>;
2295
2400
  shouldGenerateChunkAssets: SyncBailHook<[], boolean | void>;
2296
2401
  beforeChunkAssets: SyncHook<[]>;
2402
+ /**
2403
+ * @deprecated
2404
+ */
2297
2405
  additionalChunkAssets: FakeHook<
2298
2406
  Pick<
2299
2407
  AsyncSeriesHook<[Set<Chunk>]>,
2300
2408
  "name" | "tap" | "tapAsync" | "tapPromise"
2301
2409
  >
2302
2410
  >;
2411
+ /**
2412
+ * @deprecated
2413
+ */
2303
2414
  additionalAssets: FakeHook<
2304
2415
  Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
2305
2416
  >;
2417
+ /**
2418
+ * @deprecated
2419
+ */
2306
2420
  optimizeChunkAssets: FakeHook<
2307
2421
  Pick<
2308
2422
  AsyncSeriesHook<[Set<Chunk>]>,
2309
2423
  "name" | "tap" | "tapAsync" | "tapPromise"
2310
2424
  >
2311
2425
  >;
2426
+ /**
2427
+ * @deprecated
2428
+ */
2312
2429
  afterOptimizeChunkAssets: FakeHook<
2313
2430
  Pick<
2314
2431
  AsyncSeriesHook<[Set<Chunk>]>,
2315
2432
  "name" | "tap" | "tapAsync" | "tapPromise"
2316
2433
  >
2317
2434
  >;
2435
+ /**
2436
+ * @deprecated
2437
+ */
2318
2438
  optimizeAssets: AsyncSeriesHook<
2319
2439
  [CompilationAssets],
2320
2440
  ProcessAssetsAdditionalOptions
2321
2441
  >;
2442
+ /**
2443
+ * @deprecated
2444
+ */
2322
2445
  afterOptimizeAssets: SyncHook<[CompilationAssets]>;
2323
2446
  processAssets: AsyncSeriesHook<
2324
2447
  [CompilationAssets],
@@ -2353,6 +2476,9 @@ declare class Compilation {
2353
2476
  >;
2354
2477
  statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
2355
2478
  statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
2479
+ /**
2480
+ * @deprecated
2481
+ */
2356
2482
  get normalModuleLoader(): SyncHook<[AnyLoaderContext, NormalModule]>;
2357
2483
  }>;
2358
2484
  name?: string;
@@ -2428,6 +2554,10 @@ declare class Compilation {
2428
2554
  contextDependencies: LazySet<string>;
2429
2555
  missingDependencies: LazySet<string>;
2430
2556
  buildDependencies: LazySet<string>;
2557
+
2558
+ /**
2559
+ * @deprecated
2560
+ */
2431
2561
  compilationDependencies: { add: (item: string) => LazySet<string> };
2432
2562
  getStats(): Stats;
2433
2563
  createStatsOptions(
@@ -2575,8 +2705,12 @@ declare class Compilation {
2575
2705
  * and first looks to see if any named chunks already exist and reuse that chunk instead.
2576
2706
  */
2577
2707
  addChunk(name?: null | string): Chunk;
2708
+
2709
+ /**
2710
+ * @deprecated
2711
+ */
2578
2712
  assignDepth(module: Module): void;
2579
- assignDepths(modules: Set<Module>): void;
2713
+ assignDepths(modules: Module[] | Set<Module>): void;
2580
2714
  getDependencyReferencedExports(
2581
2715
  dependency: Dependency,
2582
2716
  runtime: RuntimeSpec
@@ -2844,6 +2978,7 @@ declare class Compiler {
2844
2978
  [string, string, undefined | any[]],
2845
2979
  true | void
2846
2980
  >;
2981
+ validate: SyncHook<[]>;
2847
2982
  environment: SyncHook<[]>;
2848
2983
  afterEnvironment: SyncHook<[]>;
2849
2984
  afterPlugins: SyncHook<[Compiler]>;
@@ -2948,6 +3083,20 @@ declare class Compiler {
2948
3083
  };
2949
3084
  compile(callback: CallbackWebpackFunction_2<Compilation, void>): void;
2950
3085
  close(callback: (err: null | Error, result?: void) => void): void;
3086
+
3087
+ /**
3088
+ * Schema validation function with optional pre-compiled check
3089
+ */
3090
+ validate<T extends Parameters<typeof validateFunction>[1] = object>(
3091
+ schema:
3092
+ | (JSONSchema4 & ExtendedSchema)
3093
+ | (JSONSchema6 & ExtendedSchema)
3094
+ | (JSONSchema7 & ExtendedSchema)
3095
+ | (() => Parameters<typeof validateFunction>[0]),
3096
+ value: T,
3097
+ options?: ValidationErrorConfiguration,
3098
+ check?: (value: T) => boolean
3099
+ ): void;
2951
3100
  }
2952
3101
  declare class ConcatSource extends Source {
2953
3102
  constructor(...args: ConcatSourceChild[]);
@@ -3320,6 +3469,11 @@ declare interface Configuration {
3320
3469
  */
3321
3470
  target?: string | false | string[];
3322
3471
 
3472
+ /**
3473
+ * Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
3474
+ */
3475
+ validate?: boolean;
3476
+
3323
3477
  /**
3324
3478
  * Enter watch mode, which rebuilds on file change.
3325
3479
  */
@@ -3347,7 +3501,7 @@ declare class ConstDependency extends NullDependency {
3347
3501
  static NO_EXPORTS_REFERENCED: string[][];
3348
3502
  static EXPORTS_OBJECT_REFERENCED: string[][];
3349
3503
  static isLowPriorityDependency(dependency: Dependency): boolean;
3350
- static TRANSITIVE: typeof TRANSITIVE;
3504
+ static TRANSITIVE: symbol;
3351
3505
  }
3352
3506
  declare class ConstDependencyTemplate extends NullDependencyTemplate {
3353
3507
  constructor();
@@ -3357,6 +3511,7 @@ declare interface Constructor {
3357
3511
  }
3358
3512
  declare class ConsumeSharedPlugin {
3359
3513
  constructor(options: ConsumeSharedPluginOptions);
3514
+ options: ConsumeSharedPluginOptions;
3360
3515
 
3361
3516
  /**
3362
3517
  * Apply the plugin
@@ -3434,6 +3589,7 @@ declare interface ConsumesObject {
3434
3589
  type ContainerOptionsFormat<T> = Item<T> | (string | Item<T>)[];
3435
3590
  declare class ContainerPlugin {
3436
3591
  constructor(options: ContainerPluginOptions);
3592
+ options: ContainerPluginOptions;
3437
3593
 
3438
3594
  /**
3439
3595
  * Apply the plugin
@@ -3473,6 +3629,7 @@ declare interface ContainerPluginOptions {
3473
3629
  }
3474
3630
  declare class ContainerReferencePlugin {
3475
3631
  constructor(options: ContainerReferencePluginOptions);
3632
+ options: ContainerReferencePluginOptions;
3476
3633
 
3477
3634
  /**
3478
3635
  * Apply the plugin
@@ -3745,6 +3902,12 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
3745
3902
  * Runtime modules which trigger actions on bootstrap
3746
3903
  */
3747
3904
  static STAGE_TRIGGER: number;
3905
+
3906
+ /**
3907
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
3908
+ * @deprecated
3909
+ */
3910
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
3748
3911
  }
3749
3912
  declare interface CssLoadingRuntimeModulePluginHooks {
3750
3913
  createStylesheet: SyncWaterfallHook<[string, Chunk], string>;
@@ -3756,6 +3919,7 @@ declare abstract class CssModule extends NormalModule {
3756
3919
  supports: Supports;
3757
3920
  media: Media;
3758
3921
  inheritance?: [CssLayer, Supports, Media][];
3922
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
3759
3923
  }
3760
3924
 
3761
3925
  /**
@@ -3770,7 +3934,7 @@ declare interface CssModuleGeneratorOptions {
3770
3934
  /**
3771
3935
  * Configure how CSS content is exported as default.
3772
3936
  */
3773
- exportType?: "link" | "text" | "css-style-sheet";
3937
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
3774
3938
 
3775
3939
  /**
3776
3940
  * Specifies the convention of exported names.
@@ -3798,6 +3962,11 @@ declare interface CssModuleGeneratorOptions {
3798
3962
  */
3799
3963
  localIdentHashDigestLength?: number;
3800
3964
 
3965
+ /**
3966
+ * Algorithm used for generation the hash (see node.js crypto package).
3967
+ */
3968
+ localIdentHashFunction?: string | typeof Hash;
3969
+
3801
3970
  /**
3802
3971
  * Any string which is added to the hash to salt it.
3803
3972
  */
@@ -3806,7 +3975,9 @@ declare interface CssModuleGeneratorOptions {
3806
3975
  /**
3807
3976
  * Configure the generated local ident name.
3808
3977
  */
3809
- localIdentName?: string;
3978
+ localIdentName?:
3979
+ | string
3980
+ | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3810
3981
  }
3811
3982
 
3812
3983
  /**
@@ -3836,7 +4007,7 @@ declare interface CssModuleParserOptions {
3836
4007
  /**
3837
4008
  * Configure how CSS content is exported as default.
3838
4009
  */
3839
- exportType?: "link" | "text" | "css-style-sheet";
4010
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
3840
4011
 
3841
4012
  /**
3842
4013
  * Enable/disable renaming of `@function` names.
@@ -3920,7 +4091,7 @@ declare abstract class CssParser extends ParserClass {
3920
4091
  /**
3921
4092
  * Configure how CSS content is exported as default.
3922
4093
  */
3923
- exportType?: "link" | "text" | "css-style-sheet";
4094
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
3924
4095
  /**
3925
4096
  * Enable/disable renaming of `@function` names.
3926
4097
  */
@@ -3962,7 +4133,7 @@ declare interface CssParserOptions {
3962
4133
  /**
3963
4134
  * Configure how CSS content is exported as default.
3964
4135
  */
3965
- exportType?: "link" | "text" | "css-style-sheet";
4136
+ exportType?: "link" | "text" | "css-style-sheet" | "style";
3966
4137
 
3967
4138
  /**
3968
4139
  * Enable/disable `@import` at-rules handling.
@@ -4060,10 +4231,11 @@ declare class Dependency {
4060
4231
  ): void;
4061
4232
  getContext(): undefined | string;
4062
4233
  getResourceIdentifier(): null | string;
4063
- couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
4234
+ couldAffectReferencingModule(): boolean | symbol;
4064
4235
 
4065
4236
  /**
4066
4237
  * Returns the referenced module and export
4238
+ * @deprecated
4067
4239
  */
4068
4240
  getReference(moduleGraph: ModuleGraph): never;
4069
4241
 
@@ -4119,7 +4291,7 @@ declare class Dependency {
4119
4291
  static NO_EXPORTS_REFERENCED: string[][];
4120
4292
  static EXPORTS_OBJECT_REFERENCED: string[][];
4121
4293
  static isLowPriorityDependency(dependency: Dependency): boolean;
4122
- static TRANSITIVE: typeof TRANSITIVE;
4294
+ static TRANSITIVE: symbol;
4123
4295
  }
4124
4296
  declare interface DependencyConstructor {
4125
4297
  new (...args: any[]): Dependency;
@@ -4345,29 +4517,7 @@ declare interface Disposable {
4345
4517
  }
4346
4518
  declare class DllPlugin {
4347
4519
  constructor(options: DllPluginOptions);
4348
- options: {
4349
- entryOnly: boolean;
4350
- /**
4351
- * Context of requests in the manifest file (defaults to the webpack context).
4352
- */
4353
- context?: string;
4354
- /**
4355
- * If true, manifest json file (output) will be formatted.
4356
- */
4357
- format?: boolean;
4358
- /**
4359
- * Name of the exposed dll function (external name, use value of 'output.library').
4360
- */
4361
- name?: string;
4362
- /**
4363
- * Absolute path to the manifest json file (output).
4364
- */
4365
- path: string;
4366
- /**
4367
- * Type of the dll bundle (external type, use value of 'output.libraryTarget').
4368
- */
4369
- type?: string;
4370
- };
4520
+ options: DllPluginOptions;
4371
4521
 
4372
4522
  /**
4373
4523
  * Apply the plugin
@@ -4559,20 +4709,7 @@ declare interface DllReferencePluginOptionsManifest {
4559
4709
  }
4560
4710
  declare class DotenvPlugin {
4561
4711
  constructor(options?: DotenvPluginOptions);
4562
- options: {
4563
- /**
4564
- * The directory from which .env files are loaded. Can be an absolute path, false will disable the .env file loading.
4565
- */
4566
- dir?: string | false;
4567
- /**
4568
- * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.
4569
- */
4570
- prefix?: string | string[];
4571
- /**
4572
- * Template patterns for .env file names. Use [mode] as placeholder for the webpack mode. Defaults to ['.env', '.env.local', '.env.[mode]', '.env.[mode].local'].
4573
- */
4574
- template?: string[];
4575
- };
4712
+ options: DotenvPluginOptions;
4576
4713
  apply(compiler: Compiler): void;
4577
4714
  }
4578
4715
 
@@ -4623,6 +4760,7 @@ declare interface EffectData {
4623
4760
  compiler?: string;
4624
4761
  issuer: string;
4625
4762
  issuerLayer: string;
4763
+ phase?: string;
4626
4764
  }
4627
4765
  declare interface EffectUse {
4628
4766
  type: EffectUseType;
@@ -5208,6 +5346,11 @@ declare interface ExperimentsExtra {
5208
5346
  * Compile entrypoints and import()s only when they are accessed.
5209
5347
  */
5210
5348
  lazyCompilation?: boolean | LazyCompilationOptions;
5349
+
5350
+ /**
5351
+ * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
5352
+ */
5353
+ sourceImport?: boolean;
5211
5354
  }
5212
5355
  type ExperimentsNormalized = ExperimentsCommon & ExperimentsNormalizedExtra;
5213
5356
 
@@ -5234,6 +5377,11 @@ declare interface ExperimentsNormalizedExtra {
5234
5377
  * Compile entrypoints and import()s only when they are accessed.
5235
5378
  */
5236
5379
  lazyCompilation?: false | LazyCompilationOptions;
5380
+
5381
+ /**
5382
+ * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
5383
+ */
5384
+ sourceImport?: boolean;
5237
5385
  }
5238
5386
  declare abstract class ExportInfo {
5239
5387
  name: string;
@@ -5653,10 +5801,20 @@ declare class ExternalModule extends Module {
5653
5801
  unsafeCacheData: UnsafeCacheData,
5654
5802
  normalModuleFactory: NormalModuleFactory
5655
5803
  ): void;
5804
+ static getCompilationHooks(compilation: Compilation): ExternalModuleHooks;
5656
5805
  static ModuleExternalInitFragment: typeof ModuleExternalInitFragment;
5657
5806
  static getExternalModuleNodeCommonjsInitFragment: (
5658
5807
  runtimeTemplate: RuntimeTemplate
5659
5808
  ) => InitFragment<ChunkRenderContextJavascriptModulesPlugin>;
5809
+
5810
+ /**
5811
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
5812
+ * @deprecated
5813
+ */
5814
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
5815
+ }
5816
+ declare interface ExternalModuleHooks {
5817
+ chunkCondition: SyncBailHook<[Chunk, Compilation], boolean>;
5660
5818
  }
5661
5819
  declare interface ExternalModuleInfo {
5662
5820
  type: "external";
@@ -6396,6 +6554,12 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
6396
6554
  * Runtime modules which trigger actions on bootstrap
6397
6555
  */
6398
6556
  static STAGE_TRIGGER: number;
6557
+
6558
+ /**
6559
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
6560
+ * @deprecated
6561
+ */
6562
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
6399
6563
  }
6400
6564
  declare interface GotHandler<T> {
6401
6565
  (result: T, callback: () => void): void;
@@ -6481,8 +6645,20 @@ declare abstract class HarmonyExportImportedSpecifierDependency extends HarmonyI
6481
6645
  otherStarExports: null | ReadonlyArray<HarmonyExportImportedSpecifierDependency>;
6482
6646
  exportPresenceMode: ExportPresenceMode;
6483
6647
  allStarExports: null | HarmonyStarExportsList;
6648
+
6649
+ /**
6650
+ * @deprecated
6651
+ */
6484
6652
  get id(): void;
6653
+
6654
+ /**
6655
+ * @deprecated
6656
+ */
6485
6657
  getId(): void;
6658
+
6659
+ /**
6660
+ * @deprecated
6661
+ */
6486
6662
  setId(): void;
6487
6663
  getIds(moduleGraph: ModuleGraph): string[];
6488
6664
  setIds(moduleGraph: ModuleGraph, ids: string[]): void;
@@ -6541,7 +6717,7 @@ declare class HarmonyImportDependency extends ModuleDependency {
6541
6717
  static NO_EXPORTS_REFERENCED: string[][];
6542
6718
  static EXPORTS_OBJECT_REFERENCED: string[][];
6543
6719
  static isLowPriorityDependency(dependency: Dependency): boolean;
6544
- static TRANSITIVE: typeof TRANSITIVE;
6720
+ static TRANSITIVE: symbol;
6545
6721
  }
6546
6722
  declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
6547
6723
  constructor();
@@ -6609,9 +6785,7 @@ declare interface HashableObject {
6609
6785
  }
6610
6786
  declare class HashedModuleIdsPlugin {
6611
6787
  constructor(options?: HashedModuleIdsPluginOptions);
6612
- options: Required<Omit<HashedModuleIdsPluginOptions, "context">> & {
6613
- context?: string;
6614
- };
6788
+ options: HashedModuleIdsPluginOptions;
6615
6789
 
6616
6790
  /**
6617
6791
  * Apply the plugin
@@ -6818,7 +6992,7 @@ declare interface ImportDependencyMeta {
6818
6992
  externalType?: "import" | "module";
6819
6993
  }
6820
6994
  type ImportExpressionJavascriptParser = ImportExpressionImport & {
6821
- phase?: "defer";
6995
+ phase?: "defer" | "source";
6822
6996
  };
6823
6997
  declare interface ImportModuleOptions {
6824
6998
  /**
@@ -8197,6 +8371,10 @@ declare class JavascriptParser extends ParserClass {
8197
8371
  defined: undefined | (() => R),
8198
8372
  ...args: AsArray<T>
8199
8373
  ): undefined | R;
8374
+
8375
+ /**
8376
+ * @deprecated
8377
+ */
8200
8378
  inScope(
8201
8379
  params: (
8202
8380
  | string
@@ -8697,8 +8875,14 @@ declare interface JavascriptParserOptions {
8697
8875
  */
8698
8876
  requireJs?: boolean;
8699
8877
 
8878
+ /**
8879
+ * Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
8880
+ */
8881
+ sourceImport?: boolean;
8882
+
8700
8883
  /**
8701
8884
  * Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
8885
+ * @deprecated
8702
8886
  */
8703
8887
  strictExportPresence?: boolean;
8704
8888
 
@@ -8889,6 +9073,12 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
8889
9073
  * Runtime modules which trigger actions on bootstrap
8890
9074
  */
8891
9075
  static STAGE_TRIGGER: number;
9076
+
9077
+ /**
9078
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
9079
+ * @deprecated
9080
+ */
9081
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
8892
9082
  }
8893
9083
  declare interface JsonpCompilationPluginHooks {
8894
9084
  linkPreload: SyncWaterfallHook<[string, Chunk], string>;
@@ -8901,6 +9091,11 @@ declare class JsonpTemplatePlugin {
8901
9091
  * Apply the plugin
8902
9092
  */
8903
9093
  apply(compiler: Compiler): void;
9094
+
9095
+ /**
9096
+ * use JsonpChunkLoadingRuntimeModule.getCompilationHooks instead
9097
+ * @deprecated
9098
+ */
8904
9099
  static getCompilationHooks(
8905
9100
  compilation: Compilation
8906
9101
  ): JsonpCompilationPluginHooks;
@@ -9093,7 +9288,6 @@ declare interface KnownBuildInfo {
9093
9288
  }
9094
9289
  declare interface KnownBuildMeta {
9095
9290
  exportsType?: "namespace" | "dynamic" | "default" | "flagged";
9096
- exportType?: "link" | "text" | "css-style-sheet";
9097
9291
  defaultObject?: false | "redirect" | "redirect-warn";
9098
9292
  strictHarmonyModule?: boolean;
9099
9293
  treatAsCommonJs?: boolean;
@@ -9817,7 +10011,7 @@ declare interface LimitChunkCountPluginOptions {
9817
10011
  entryChunkMultiplicator?: number;
9818
10012
 
9819
10013
  /**
9820
- * Limit the maximum number of chunks using a value greater greater than or equal to 1.
10014
+ * Limit the maximum number of chunks using a value greater than or equal to 1.
9821
10015
  */
9822
10016
  maxChunks: number;
9823
10017
  }
@@ -9849,6 +10043,12 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
9849
10043
  * Runtime modules which trigger actions on bootstrap
9850
10044
  */
9851
10045
  static STAGE_TRIGGER: number;
10046
+
10047
+ /**
10048
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
10049
+ * @deprecated
10050
+ */
10051
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
9852
10052
  }
9853
10053
 
9854
10054
  /**
@@ -9857,13 +10057,8 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
9857
10057
  declare interface Loader {
9858
10058
  [index: string]: any;
9859
10059
  }
9860
- type LoaderContextDeclarationsIndex<OptionsType> =
9861
- NormalModuleLoaderContext<OptionsType> &
9862
- LoaderRunnerLoaderContext<OptionsType> &
9863
- LoaderPluginLoaderContext &
9864
- HotModuleReplacementPluginLoaderContext;
9865
- type LoaderContextVirtualUrlPlugin<T> = NormalModuleLoaderContext<T> &
9866
- LoaderRunnerLoaderContext<T> &
10060
+ type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> &
10061
+ LoaderRunnerLoaderContext<OptionsType> &
9867
10062
  LoaderPluginLoaderContext &
9868
10063
  HotModuleReplacementPluginLoaderContext;
9869
10064
  type LoaderDefinition<
@@ -10354,9 +10549,8 @@ declare interface ManifestObject {
10354
10549
  entrypoints: Record<string, ManifestEntrypoint>;
10355
10550
  }
10356
10551
  declare class ManifestPlugin {
10357
- constructor(options: ManifestPluginOptions);
10358
- options: ManifestPluginOptions &
10359
- Required<Omit<ManifestPluginOptions, "filter" | "generate">>;
10552
+ constructor(options?: ManifestPluginOptions);
10553
+ options: ManifestPluginOptions;
10360
10554
 
10361
10555
  /**
10362
10556
  * Apply the plugin
@@ -10480,14 +10674,7 @@ declare interface MergeDuplicateChunksPluginOptions {
10480
10674
  */
10481
10675
  stage?: number;
10482
10676
  }
10483
- type Meta = KnownMeta &
10484
- Record<
10485
- | typeof idsSymbolCommonJsExportRequireDependency
10486
- | typeof idsSymbolHarmonyImportSpecifierDependency
10487
- | typeof idsSymbolHarmonyExportImportedSpecifierDependency,
10488
- string[]
10489
- > &
10490
- Record<string, any>;
10677
+ type Meta = KnownMeta & Record<symbol, string[]> & Record<string, any>;
10491
10678
  declare class MinChunkSizePlugin {
10492
10679
  constructor(options: MinChunkSizePluginOptions);
10493
10680
  options: MinChunkSizePluginOptions;
@@ -10573,27 +10760,109 @@ declare class Module extends DependenciesBlock {
10573
10760
  buildInfo?: BuildInfo;
10574
10761
  presentationalDependencies?: Dependency[];
10575
10762
  codeGenerationDependencies?: Dependency[];
10763
+
10764
+ /**
10765
+ * @deprecated
10766
+ * @deprecated
10767
+ */
10576
10768
  id: null | string | number;
10769
+
10770
+ /**
10771
+ * @deprecated
10772
+ */
10577
10773
  get hash(): string;
10774
+
10775
+ /**
10776
+ * @deprecated
10777
+ */
10578
10778
  get renderedHash(): string;
10779
+
10780
+ /**
10781
+ * @deprecated
10782
+ * @deprecated
10783
+ */
10579
10784
  profile?: ModuleProfile;
10785
+
10786
+ /**
10787
+ * @deprecated
10788
+ * @deprecated
10789
+ */
10580
10790
  index: null | number;
10791
+
10792
+ /**
10793
+ * @deprecated
10794
+ * @deprecated
10795
+ */
10581
10796
  index2: null | number;
10797
+
10798
+ /**
10799
+ * @deprecated
10800
+ * @deprecated
10801
+ */
10582
10802
  depth: null | number;
10803
+
10804
+ /**
10805
+ * @deprecated
10806
+ * @deprecated
10807
+ */
10583
10808
  issuer?: null | Module;
10809
+
10810
+ /**
10811
+ * @deprecated
10812
+ */
10584
10813
  get usedExports(): null | boolean | SortableSet<string>;
10814
+
10815
+ /**
10816
+ * @deprecated
10817
+ */
10585
10818
  get optimizationBailout(): (
10586
10819
  | string
10587
10820
  | ((requestShortener: RequestShortener) => string)
10588
10821
  )[];
10822
+
10823
+ /**
10824
+ * @deprecated
10825
+ */
10589
10826
  get optional(): boolean;
10827
+
10828
+ /**
10829
+ * @deprecated
10830
+ */
10590
10831
  addChunk(chunk: Chunk): boolean;
10832
+
10833
+ /**
10834
+ * @deprecated
10835
+ */
10591
10836
  removeChunk(chunk: Chunk): void;
10837
+
10838
+ /**
10839
+ * @deprecated
10840
+ */
10592
10841
  isInChunk(chunk: Chunk): boolean;
10842
+
10843
+ /**
10844
+ * @deprecated
10845
+ */
10593
10846
  isEntryModule(): boolean;
10847
+
10848
+ /**
10849
+ * @deprecated
10850
+ */
10594
10851
  getChunks(): Chunk[];
10852
+
10853
+ /**
10854
+ * @deprecated
10855
+ */
10595
10856
  getNumberOfChunks(): number;
10857
+
10858
+ /**
10859
+ * @deprecated
10860
+ */
10596
10861
  get chunksIterable(): Iterable<Chunk>;
10862
+
10863
+ /**
10864
+ * @deprecated
10865
+ */
10597
10866
  isProvided(exportName: string): null | boolean;
10598
10867
  get exportsArgument(): string;
10599
10868
  get moduleArgument(): string;
@@ -10632,6 +10901,11 @@ declare class Module extends DependenciesBlock {
10632
10901
  context: NeedBuildContext,
10633
10902
  callback: (err?: null | WebpackError, needBuild?: boolean) => void
10634
10903
  ): void;
10904
+
10905
+ /**
10906
+ * Use needBuild instead
10907
+ * @deprecated
10908
+ */
10635
10909
  needRebuild(
10636
10910
  fileTimestamps: Map<string, null | number>,
10637
10911
  contextTimestamps: Map<string, null | number>
@@ -10656,6 +10930,11 @@ declare class Module extends DependenciesBlock {
10656
10930
  * from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
10657
10931
  */
10658
10932
  getSourceBasicTypes(): ReadonlySet<string>;
10933
+
10934
+ /**
10935
+ * Use codeGeneration() instead
10936
+ * @deprecated
10937
+ */
10659
10938
  source(
10660
10939
  dependencyTemplates: DependencyTemplates,
10661
10940
  runtimeTemplate: RuntimeTemplate,
@@ -10701,6 +10980,12 @@ declare class Module extends DependenciesBlock {
10701
10980
  get errors(): any;
10702
10981
  get warnings(): any;
10703
10982
  used: any;
10983
+
10984
+ /**
10985
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
10986
+ * @deprecated
10987
+ */
10988
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
10704
10989
  }
10705
10990
  declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
10706
10991
  constructor(runtimeRequirements: ReadonlySet<string>);
@@ -10727,6 +11012,12 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
10727
11012
  * Runtime modules which trigger actions on bootstrap
10728
11013
  */
10729
11014
  static STAGE_TRIGGER: number;
11015
+
11016
+ /**
11017
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
11018
+ * @deprecated
11019
+ */
11020
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
10730
11021
  }
10731
11022
  declare class ModuleConcatenationPlugin {
10732
11023
  constructor();
@@ -10746,7 +11037,7 @@ declare class ModuleDependency extends Dependency {
10746
11037
  static NO_EXPORTS_REFERENCED: string[][];
10747
11038
  static EXPORTS_OBJECT_REFERENCED: string[][];
10748
11039
  static isLowPriorityDependency(dependency: Dependency): boolean;
10749
- static TRANSITIVE: typeof TRANSITIVE;
11040
+ static TRANSITIVE: symbol;
10750
11041
  }
10751
11042
  declare class ModuleExternalInitFragment extends InitFragment<GenerateContext> {
10752
11043
  constructor(
@@ -10824,6 +11115,7 @@ declare interface ModuleFactoryResult {
10824
11115
  }
10825
11116
  declare class ModuleFederationPlugin {
10826
11117
  constructor(options: ModuleFederationPluginOptions);
11118
+ options: ModuleFederationPluginOptions;
10827
11119
 
10828
11120
  /**
10829
11121
  * Apply the plugin
@@ -11080,15 +11372,27 @@ declare class ModuleGraph {
11080
11372
  ...((moduleGraph: ModuleGraph, dependency: D, ...args: ARGS) => R)[]
11081
11373
  ]
11082
11374
  ): R;
11375
+
11376
+ /**
11377
+ * @deprecated
11378
+ */
11083
11379
  static getModuleGraphForModule(
11084
11380
  module: Module,
11085
11381
  deprecateMessage: string,
11086
11382
  deprecationCode: string
11087
11383
  ): ModuleGraph;
11384
+
11385
+ /**
11386
+ * @deprecated
11387
+ */
11088
11388
  static setModuleGraphForModule(
11089
11389
  module: Module,
11090
11390
  moduleGraph: ModuleGraph
11091
11391
  ): void;
11392
+
11393
+ /**
11394
+ * @deprecated
11395
+ */
11092
11396
  static clearModuleGraphForModule(module: Module): void;
11093
11397
  static ModuleGraphConnection: typeof ModuleGraphConnection;
11094
11398
  }
@@ -11161,21 +11465,25 @@ declare interface ModuleOptions {
11161
11465
 
11162
11466
  /**
11163
11467
  * Enable warnings for full dynamic dependencies.
11468
+ * @deprecated
11164
11469
  */
11165
11470
  exprContextCritical?: boolean;
11166
11471
 
11167
11472
  /**
11168
11473
  * Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
11474
+ * @deprecated
11169
11475
  */
11170
11476
  exprContextRecursive?: boolean;
11171
11477
 
11172
11478
  /**
11173
11479
  * Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
11480
+ * @deprecated
11174
11481
  */
11175
11482
  exprContextRegExp?: boolean | RegExp;
11176
11483
 
11177
11484
  /**
11178
11485
  * Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
11486
+ * @deprecated
11179
11487
  */
11180
11488
  exprContextRequest?: string;
11181
11489
 
@@ -11205,31 +11513,37 @@ declare interface ModuleOptions {
11205
11513
 
11206
11514
  /**
11207
11515
  * Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
11516
+ * @deprecated
11208
11517
  */
11209
11518
  strictExportPresence?: boolean;
11210
11519
 
11211
11520
  /**
11212
11521
  * Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
11522
+ * @deprecated
11213
11523
  */
11214
11524
  strictThisContextOnImports?: boolean;
11215
11525
 
11216
11526
  /**
11217
11527
  * Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
11528
+ * @deprecated
11218
11529
  */
11219
11530
  unknownContextCritical?: boolean;
11220
11531
 
11221
11532
  /**
11222
11533
  * Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
11534
+ * @deprecated
11223
11535
  */
11224
11536
  unknownContextRecursive?: boolean;
11225
11537
 
11226
11538
  /**
11227
11539
  * Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
11540
+ * @deprecated
11228
11541
  */
11229
11542
  unknownContextRegExp?: boolean | RegExp;
11230
11543
 
11231
11544
  /**
11232
11545
  * Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
11546
+ * @deprecated
11233
11547
  */
11234
11548
  unknownContextRequest?: string;
11235
11549
 
@@ -11240,16 +11554,19 @@ declare interface ModuleOptions {
11240
11554
 
11241
11555
  /**
11242
11556
  * Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
11557
+ * @deprecated
11243
11558
  */
11244
11559
  wrappedContextCritical?: boolean;
11245
11560
 
11246
11561
  /**
11247
11562
  * Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
11563
+ * @deprecated
11248
11564
  */
11249
11565
  wrappedContextRecursive?: boolean;
11250
11566
 
11251
11567
  /**
11252
11568
  * Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
11569
+ * @deprecated
11253
11570
  */
11254
11571
  wrappedContextRegExp?: RegExp;
11255
11572
  }
@@ -11322,6 +11639,10 @@ declare abstract class ModuleProfile {
11322
11639
  additionalFactoryTimes?: { start: number; end: number }[];
11323
11640
  additionalFactories: number;
11324
11641
  additionalFactoriesParallelismFactor: number;
11642
+
11643
+ /**
11644
+ * @deprecated
11645
+ */
11325
11646
  additionalIntegration: number;
11326
11647
  markFactoryStart(): void;
11327
11648
  markFactoryEnd(): void;
@@ -11564,6 +11885,11 @@ declare class MultiCompiler {
11564
11885
  validateDependencies(
11565
11886
  callback: CallbackWebpackFunction_2<MultiStats, void>
11566
11887
  ): boolean;
11888
+
11889
+ /**
11890
+ * This method should have been private
11891
+ * @deprecated
11892
+ */
11567
11893
  runWithDependencies(
11568
11894
  compilers: Compiler[],
11569
11895
  fn: (
@@ -11814,6 +12140,12 @@ declare class NormalModule extends Module {
11814
12140
  compilation: Compilation
11815
12141
  ): NormalModuleCompilationHooks;
11816
12142
  static deserialize(context: ObjectDeserializerContext): NormalModule;
12143
+
12144
+ /**
12145
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
12146
+ * @deprecated
12147
+ */
12148
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
11817
12149
  }
11818
12150
  declare interface NormalModuleCompilationHooks {
11819
12151
  loader: SyncHook<[AnyLoaderContext, NormalModule]>;
@@ -12299,7 +12631,7 @@ declare abstract class NormalReexportItem {
12299
12631
  hidden: boolean;
12300
12632
  }
12301
12633
  declare interface NormalizedModules {
12302
- [index: string]: VirtualModuleConfig;
12634
+ [index: string]: VirtualModule;
12303
12635
  }
12304
12636
  type NormalizedStatsOptions = KnownNormalizedStatsOptions &
12305
12637
  Omit<
@@ -12350,7 +12682,7 @@ declare class NullDependency extends Dependency {
12350
12682
  static NO_EXPORTS_REFERENCED: string[][];
12351
12683
  static EXPORTS_OBJECT_REFERENCED: string[][];
12352
12684
  static isLowPriorityDependency(dependency: Dependency): boolean;
12353
- static TRANSITIVE: typeof TRANSITIVE;
12685
+ static TRANSITIVE: symbol;
12354
12686
  }
12355
12687
  declare class NullDependencyTemplate extends DependencyTemplate {
12356
12688
  constructor();
@@ -12538,6 +12870,7 @@ declare interface Optimization {
12538
12870
 
12539
12871
  /**
12540
12872
  * Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
12873
+ * @deprecated
12541
12874
  */
12542
12875
  noEmitOnErrors?: boolean;
12543
12876
 
@@ -12682,6 +13015,7 @@ declare interface OptimizationNormalized {
12682
13015
 
12683
13016
  /**
12684
13017
  * Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
13018
+ * @deprecated
12685
13019
  */
12686
13020
  noEmitOnErrors?: boolean;
12687
13021
 
@@ -13395,6 +13729,7 @@ declare interface Output {
13395
13729
 
13396
13730
  /**
13397
13731
  * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
13732
+ * @deprecated
13398
13733
  */
13399
13734
  strictModuleExceptionHandling?: boolean;
13400
13735
 
@@ -13703,6 +14038,7 @@ declare interface OutputNormalized {
13703
14038
 
13704
14039
  /**
13705
14040
  * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
14041
+ * @deprecated
13706
14042
  */
13707
14043
  strictModuleExceptionHandling?: boolean;
13708
14044
 
@@ -13967,6 +14303,7 @@ declare interface PathData {
13967
14303
  contentHashWithLength?: (length: number) => string;
13968
14304
  noChunkHash?: boolean;
13969
14305
  url?: string;
14306
+ local?: string;
13970
14307
  prepareId?: (id: string | number) => string | number;
13971
14308
  }
13972
14309
  type PathLikeFs = string | Buffer | URL;
@@ -14151,7 +14488,7 @@ declare class Profiler {
14151
14488
  }
14152
14489
  declare class ProfilingPlugin {
14153
14490
  constructor(options?: ProfilingPluginOptions);
14154
- outputPath: string;
14491
+ options: ProfilingPluginOptions;
14155
14492
 
14156
14493
  /**
14157
14494
  * Apply the plugin
@@ -14167,28 +14504,21 @@ declare interface ProfilingPluginOptions {
14167
14504
  }
14168
14505
  declare class ProgressPlugin {
14169
14506
  constructor(options?: ProgressPluginArgument);
14170
- profile?: null | boolean;
14507
+ options: ProgressPluginOptions;
14508
+ profile: null | boolean;
14171
14509
  handler?: (percentage: number, msg: string, ...args: string[]) => void;
14172
- modulesCount?: number;
14173
- dependenciesCount?: number;
14174
- showEntries?: boolean;
14175
- showModules?: boolean;
14176
- showDependencies?: boolean;
14177
- showActiveModules?: boolean;
14178
- percentBy?: null | "entries" | "modules" | "dependencies";
14510
+ modulesCount: number;
14511
+ dependenciesCount: number;
14512
+ showEntries: boolean;
14513
+ showModules: boolean;
14514
+ showDependencies: boolean;
14515
+ showActiveModules: boolean;
14516
+ percentBy: null | "entries" | "modules" | "dependencies";
14179
14517
  apply(compiler: MultiCompiler | Compiler): void;
14180
14518
  static getReporter(
14181
14519
  compiler: Compiler
14182
14520
  ): undefined | ((p: number, ...args: string[]) => void);
14183
- static defaultOptions: {
14184
- profile: boolean;
14185
- modulesCount: number;
14186
- dependenciesCount: number;
14187
- modules: boolean;
14188
- dependencies: boolean;
14189
- activeModules: boolean;
14190
- entries: boolean;
14191
- };
14521
+ static defaultOptions: Required<Omit<ProgressPluginOptions, "handler">>;
14192
14522
  static createDefaultHandler: (
14193
14523
  profile: undefined | null | boolean,
14194
14524
  logger: WebpackLogger
@@ -14258,6 +14588,7 @@ declare class ProvidePlugin {
14258
14588
  }
14259
14589
  declare class ProvideSharedPlugin {
14260
14590
  constructor(options: ProvideSharedPluginOptions);
14591
+ options: ProvideSharedPluginOptions;
14261
14592
 
14262
14593
  /**
14263
14594
  * Apply the plugin
@@ -15321,6 +15652,7 @@ declare interface ResolveData {
15321
15652
  resolveOptions?: ResolveOptions;
15322
15653
  context: string;
15323
15654
  request: string;
15655
+ phase?: "defer" | "source" | "evaluation";
15324
15656
  attributes?: ImportAttributes;
15325
15657
  dependencies: ModuleDependency[];
15326
15658
  dependencyType: string;
@@ -16216,6 +16548,16 @@ declare interface RuleSetRule {
16216
16548
  */
16217
16549
  parser?: { [index: string]: any };
16218
16550
 
16551
+ /**
16552
+ * Match the import phase of the dependency.
16553
+ */
16554
+ phase?:
16555
+ | string
16556
+ | RegExp
16557
+ | ((value: string) => boolean)
16558
+ | RuleSetLogicalConditions
16559
+ | RuleSetCondition[];
16560
+
16219
16561
  /**
16220
16562
  * Match the real resource path of the module.
16221
16563
  */
@@ -16488,6 +16830,12 @@ declare class RuntimeModule extends Module {
16488
16830
  * Runtime modules which trigger actions on bootstrap
16489
16831
  */
16490
16832
  static STAGE_TRIGGER: number;
16833
+
16834
+ /**
16835
+ * In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
16836
+ * @deprecated
16837
+ */
16838
+ static getSourceBasicTypes(module: Module): ReadonlySet<string>;
16491
16839
  }
16492
16840
  declare interface RuntimeRequirementsContext {
16493
16841
  /**
@@ -17628,12 +17976,17 @@ declare interface StartupRenderContext {
17628
17976
  /**
17629
17977
  * inlined
17630
17978
  */
17631
- inlined: boolean;
17979
+ inlined?: boolean;
17632
17980
 
17633
17981
  /**
17634
17982
  * the inlined entry module is wrapped in an IIFE
17635
17983
  */
17636
17984
  inlinedInIIFE?: boolean;
17985
+
17986
+ /**
17987
+ * whether the top-level exports declaration needs to be generated
17988
+ */
17989
+ needExportsDeclaration?: boolean;
17637
17990
  }
17638
17991
  declare interface StatFs {
17639
17992
  (
@@ -17936,6 +18289,7 @@ declare interface StatsOptions {
17936
18289
 
17937
18290
  /**
17938
18291
  * Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
18292
+ * @deprecated
17939
18293
  */
17940
18294
  cached?: boolean;
17941
18295
 
@@ -18321,6 +18675,7 @@ declare interface StatsOptions {
18321
18675
 
18322
18676
  /**
18323
18677
  * Add information about runtime modules (deprecated: use 'runtimeModules' instead).
18678
+ * @deprecated
18324
18679
  */
18325
18680
  runtime?: boolean;
18326
18681
 
@@ -18483,7 +18838,6 @@ declare interface SyntheticDependencyLocation {
18483
18838
  index?: number;
18484
18839
  }
18485
18840
  declare const TOMBSTONE: unique symbol;
18486
- declare const TRANSITIVE: unique symbol;
18487
18841
  declare const TRANSITIVE_ONLY: unique symbol;
18488
18842
  declare interface TagInfo {
18489
18843
  tag: symbol;
@@ -18609,6 +18963,11 @@ declare interface TsconfigPathsMap {
18609
18963
  */
18610
18964
  refs: { [index: string]: TsconfigPathsData };
18611
18965
 
18966
+ /**
18967
+ * all contexts (main + refs) for quick lookup
18968
+ */
18969
+ allContexts: { [index: string]: TsconfigPathsData };
18970
+
18612
18971
  /**
18613
18972
  * file dependencies
18614
18973
  */
@@ -18654,43 +19013,77 @@ declare class VariableInfo {
18654
19013
  isTagged(): boolean;
18655
19014
  }
18656
19015
  type VariableInfoFlagsType = 0 | 1 | 2 | 4;
18657
- declare interface VirtualModuleConfig {
19016
+
19017
+ /**
19018
+ * A virtual module definition.
19019
+ */
19020
+ declare interface VirtualModule {
18658
19021
  /**
18659
- * the module type
19022
+ * The context for the virtual module. A string path. Defaults to 'auto', which will try to resolve the context from the module id.
18660
19023
  */
18661
- type?: string;
19024
+ context?: string;
18662
19025
 
18663
19026
  /**
18664
- * the source function
19027
+ * The source function that provides the virtual content.
18665
19028
  */
18666
19029
  source: (
18667
- loaderContext: LoaderContextVirtualUrlPlugin<any>
19030
+ loaderContext: LoaderContext<any>
18668
19031
  ) => string | Buffer | Promise<string | Buffer>;
18669
19032
 
18670
19033
  /**
18671
- * optional version function or value
19034
+ * The module type.
19035
+ */
19036
+ type?: string;
19037
+
19038
+ /**
19039
+ * Optional version function or value for cache invalidation.
18672
19040
  */
18673
19041
  version?: string | true | (() => string);
18674
19042
  }
18675
- type VirtualModuleInput =
19043
+ type VirtualModuleContent =
18676
19044
  | string
18677
19045
  | ((
18678
- loaderContext: LoaderContextVirtualUrlPlugin<any>
19046
+ loaderContext: LoaderContext<any>
18679
19047
  ) => string | Buffer | Promise<string | Buffer>)
18680
- | VirtualModuleConfig;
19048
+ | VirtualModule;
18681
19049
  declare interface VirtualModules {
18682
- [index: string]: VirtualModuleInput;
19050
+ [index: string]: VirtualModuleContent;
19051
+ }
19052
+
19053
+ /**
19054
+ * Options for building virtual resources.
19055
+ */
19056
+ declare interface VirtualUrlOptions {
19057
+ /**
19058
+ * The default context for virtual modules. A string path. Defaults to 'auto', which will try to resolve the context from the module id.
19059
+ */
19060
+ context?: string;
19061
+
19062
+ /**
19063
+ * The virtual modules configuration.
19064
+ */
19065
+ modules: { [index: string]: VirtualModuleContent };
19066
+
19067
+ /**
19068
+ * The URL scheme to use for virtual resources.
19069
+ */
19070
+ scheme?: string;
18683
19071
  }
18684
19072
  declare class VirtualUrlPlugin {
18685
- constructor(modules: VirtualModules, scheme?: string);
19073
+ constructor(
19074
+ modules: VirtualModules,
19075
+ schemeOrOptions?: string | Omit<VirtualUrlOptions, "modules">
19076
+ );
19077
+ options: VirtualUrlOptions;
18686
19078
  scheme: string;
19079
+ context?: string;
18687
19080
  modules: NormalizedModules;
18688
19081
 
18689
19082
  /**
18690
19083
  * Apply the plugin
18691
19084
  */
18692
19085
  apply(compiler: Compiler): void;
18693
- findVirtualModuleConfigById(id: string): VirtualModuleConfig;
19086
+ findVirtualModuleConfigById(id: string): VirtualModule;
18694
19087
 
18695
19088
  /**
18696
19089
  * Get the cache version for a given version value
@@ -18735,7 +19128,7 @@ declare interface WatchFileSystem {
18735
19128
  }
18736
19129
  declare class WatchIgnorePlugin {
18737
19130
  constructor(options: WatchIgnorePluginOptions);
18738
- paths: (string | RegExp)[];
19131
+ options: WatchIgnorePluginOptions;
18739
19132
 
18740
19133
  /**
18741
19134
  * Apply the plugin
@@ -19257,6 +19650,11 @@ declare interface WebpackOptionsNormalized {
19257
19650
  */
19258
19651
  target?: string | false | string[];
19259
19652
 
19653
+ /**
19654
+ * Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
19655
+ */
19656
+ validate?: boolean;
19657
+
19260
19658
  /**
19261
19659
  * Enter watch mode, which rebuilds on file change.
19262
19660
  */
@@ -19566,9 +19964,11 @@ declare namespace exports {
19566
19964
  export let chunkCallback: "webpackChunk";
19567
19965
  export let chunkName: "__webpack_require__.cn";
19568
19966
  export let compatGetDefaultExport: "__webpack_require__.n";
19967
+ export let compileWasm: "__webpack_require__.vs";
19569
19968
  export let createFakeNamespaceObject: "__webpack_require__.t";
19570
19969
  export let createScript: "__webpack_require__.ts";
19571
19970
  export let createScriptUrl: "__webpack_require__.tu";
19971
+ export let cssInjectStyle: "__webpack_require__.is";
19572
19972
  export let cssMergeStyleSheets: "__webpack_require__.mcs";
19573
19973
  export let currentRemoteGetScope: "__webpack_require__.R";
19574
19974
  export let deferredModuleAsyncTransitiveDependencies: "__webpack_require__.zT";
@@ -20206,12 +20606,9 @@ declare namespace exports {
20206
20606
  LoaderDefinitionFunction,
20207
20607
  PitchLoaderDefinitionFunction,
20208
20608
  RawLoaderDefinitionFunction,
20209
- LoaderContextDeclarationsIndex as LoaderContext
20609
+ LoaderContext
20210
20610
  };
20211
20611
  }
20212
- declare const idsSymbolCommonJsExportRequireDependency: unique symbol;
20213
- declare const idsSymbolHarmonyExportImportedSpecifierDependency: unique symbol;
20214
- declare const idsSymbolHarmonyImportSpecifierDependency: unique symbol;
20215
20612
  declare const topLevelSymbolTag: unique symbol;
20216
20613
 
20217
20614
  export = exports;