webpack 5.68.0 → 5.70.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.
- package/lib/BannerPlugin.js +10 -4
- package/lib/ChunkGraph.js +1 -2
- package/lib/CleanPlugin.js +64 -18
- package/lib/Compilation.js +43 -17
- package/lib/ContextModule.js +90 -26
- package/lib/ContextModuleFactory.js +65 -21
- package/lib/EntryOptionPlugin.js +1 -0
- package/lib/ExportsInfo.js +4 -4
- package/lib/Generator.js +1 -0
- package/lib/ModuleHashingError.js +29 -0
- package/lib/NodeStuffPlugin.js +10 -0
- package/lib/NormalModule.js +21 -16
- package/lib/NormalModuleFactory.js +40 -35
- package/lib/ProgressPlugin.js +4 -5
- package/lib/RuntimeTemplate.js +1 -0
- package/lib/TemplatedPathPlugin.js +48 -23
- package/lib/WebpackOptionsApply.js +2 -0
- package/lib/asset/AssetGenerator.js +122 -33
- package/lib/buildChunkGraph.js +1 -1
- package/lib/cache/ResolverCachePlugin.js +89 -28
- package/lib/config/browserslistTargetHandler.js +3 -5
- package/lib/config/defaults.js +7 -2
- package/lib/config/normalization.js +1 -0
- package/lib/css/CssLoadingRuntimeModule.js +63 -70
- package/lib/css/CssModulesPlugin.js +2 -1
- package/lib/debug/ProfilingPlugin.js +3 -4
- package/lib/dependencies/ContextDependencyHelpers.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +8 -2
- package/lib/dependencies/ExportsInfoDependency.js +6 -0
- package/lib/dependencies/HarmonyAcceptImportDependency.js +5 -3
- package/lib/dependencies/HarmonyExportInitFragment.js +4 -1
- package/lib/dependencies/ImportContextDependency.js +0 -2
- package/lib/dependencies/ImportMetaContextDependency.js +35 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +252 -0
- package/lib/dependencies/ImportMetaContextPlugin.js +59 -0
- package/lib/dependencies/LoaderPlugin.js +2 -0
- package/lib/dependencies/RequireContextDependency.js +0 -16
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +24 -8
- package/lib/index.js +5 -0
- package/lib/javascript/JavascriptModulesPlugin.js +27 -2
- package/lib/javascript/StartupHelpers.js +3 -2
- package/lib/library/AssignLibraryPlugin.js +8 -2
- package/lib/node/NodeTargetPlugin.js +1 -0
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -7
- package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -7
- package/lib/optimize/ConcatenatedModule.js +10 -4
- package/lib/schemes/HttpUriPlugin.js +68 -6
- package/lib/serialization/FileMiddleware.js +44 -9
- package/lib/util/compileBooleanMatcher.js +1 -1
- package/lib/util/deterministicGrouping.js +1 -1
- package/lib/util/identifier.js +65 -44
- package/lib/util/internalSerializables.js +2 -0
- package/lib/util/nonNumericOnlyHash.js +22 -0
- package/lib/util/semver.js +17 -10
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +15 -5
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -20
- package/module.d.ts +15 -0
- package/package.json +13 -13
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +17 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.json +4 -0
- package/types.d.ts +203 -91
package/types.d.ts
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
* Run `yarn special-lint-fix` to update
|
5
5
|
*/
|
6
6
|
|
7
|
+
import { Buffer } from "buffer";
|
7
8
|
import {
|
8
9
|
ArrayExpression,
|
9
10
|
ArrayPattern,
|
@@ -63,6 +64,7 @@ import {
|
|
63
64
|
SimpleCallExpression,
|
64
65
|
SimpleLiteral,
|
65
66
|
SpreadElement,
|
67
|
+
StaticBlock,
|
66
68
|
Super,
|
67
69
|
SwitchCase,
|
68
70
|
SwitchStatement,
|
@@ -662,7 +664,7 @@ declare interface CacheGroupsContext {
|
|
662
664
|
moduleGraph: ModuleGraph;
|
663
665
|
chunkGraph: ChunkGraph;
|
664
666
|
}
|
665
|
-
type CacheOptionsNormalized = false |
|
667
|
+
type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
|
666
668
|
declare class CachedSource extends Source {
|
667
669
|
constructor(source: Source);
|
668
670
|
constructor(source: Source | (() => Source), cachedData?: any);
|
@@ -1047,6 +1049,11 @@ declare abstract class ChunkGroup {
|
|
1047
1049
|
}
|
1048
1050
|
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
1049
1051
|
declare interface ChunkHashContext {
|
1052
|
+
/**
|
1053
|
+
* results of code generation
|
1054
|
+
*/
|
1055
|
+
codeGenerationResults: CodeGenerationResults;
|
1056
|
+
|
1050
1057
|
/**
|
1051
1058
|
* the runtime template
|
1052
1059
|
*/
|
@@ -2056,7 +2063,7 @@ declare interface Configuration {
|
|
2056
2063
|
/**
|
2057
2064
|
* Cache generated modules and chunks to improve performance for multiple incremental builds.
|
2058
2065
|
*/
|
2059
|
-
cache?: boolean |
|
2066
|
+
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
|
2060
2067
|
|
2061
2068
|
/**
|
2062
2069
|
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
|
@@ -2113,6 +2120,7 @@ declare interface Configuration {
|
|
2113
2120
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
2114
2121
|
*/
|
2115
2122
|
externalsType?:
|
2123
|
+
| "import"
|
2116
2124
|
| "var"
|
2117
2125
|
| "module"
|
2118
2126
|
| "assign"
|
@@ -2131,7 +2139,6 @@ declare interface Configuration {
|
|
2131
2139
|
| "jsonp"
|
2132
2140
|
| "system"
|
2133
2141
|
| "promise"
|
2134
|
-
| "import"
|
2135
2142
|
| "script"
|
2136
2143
|
| "node-commonjs";
|
2137
2144
|
|
@@ -2470,9 +2477,9 @@ declare interface ContextHash {
|
|
2470
2477
|
symlinks?: Set<string>;
|
2471
2478
|
}
|
2472
2479
|
type ContextMode =
|
2480
|
+
| "weak"
|
2473
2481
|
| "sync"
|
2474
2482
|
| "eager"
|
2475
|
-
| "weak"
|
2476
2483
|
| "async-weak"
|
2477
2484
|
| "lazy"
|
2478
2485
|
| "lazy-once";
|
@@ -2519,7 +2526,7 @@ declare interface ContextModuleOptions {
|
|
2519
2526
|
* exports referenced from modules (won't be mangled)
|
2520
2527
|
*/
|
2521
2528
|
referencedExports?: string[][];
|
2522
|
-
resource: string;
|
2529
|
+
resource: string | false | string[];
|
2523
2530
|
resourceQuery?: string;
|
2524
2531
|
resourceFragment?: string;
|
2525
2532
|
resolveOptions: any;
|
@@ -3132,6 +3139,11 @@ declare interface EntryDescription {
|
|
3132
3139
|
*/
|
3133
3140
|
asyncChunks?: boolean;
|
3134
3141
|
|
3142
|
+
/**
|
3143
|
+
* Base uri for this entry.
|
3144
|
+
*/
|
3145
|
+
baseUri?: string;
|
3146
|
+
|
3135
3147
|
/**
|
3136
3148
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
3137
3149
|
*/
|
@@ -3187,6 +3199,11 @@ declare interface EntryDescriptionNormalized {
|
|
3187
3199
|
*/
|
3188
3200
|
asyncChunks?: boolean;
|
3189
3201
|
|
3202
|
+
/**
|
3203
|
+
* Base uri for this entry.
|
3204
|
+
*/
|
3205
|
+
baseUri?: string;
|
3206
|
+
|
3190
3207
|
/**
|
3191
3208
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
3192
3209
|
*/
|
@@ -3956,6 +3973,7 @@ declare interface ExternalsPresets {
|
|
3956
3973
|
webAsync?: boolean;
|
3957
3974
|
}
|
3958
3975
|
type ExternalsType =
|
3976
|
+
| "import"
|
3959
3977
|
| "var"
|
3960
3978
|
| "module"
|
3961
3979
|
| "assign"
|
@@ -3974,7 +3992,6 @@ type ExternalsType =
|
|
3974
3992
|
| "jsonp"
|
3975
3993
|
| "system"
|
3976
3994
|
| "promise"
|
3977
|
-
| "import"
|
3978
3995
|
| "script"
|
3979
3996
|
| "node-commonjs";
|
3980
3997
|
declare interface FactorizeModuleOptions {
|
@@ -4462,12 +4479,12 @@ declare class Hash {
|
|
4462
4479
|
constructor();
|
4463
4480
|
|
4464
4481
|
/**
|
4465
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4482
|
+
* Update hash {@link https ://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4466
4483
|
*/
|
4467
4484
|
update(data: string | Buffer, inputEncoding?: string): Hash;
|
4468
4485
|
|
4469
4486
|
/**
|
4470
|
-
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4487
|
+
* Calculates the digest {@link https ://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4471
4488
|
*/
|
4472
4489
|
digest(encoding?: string): string | Buffer;
|
4473
4490
|
}
|
@@ -4488,7 +4505,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4488
4505
|
/**
|
4489
4506
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4490
4507
|
*/
|
4491
|
-
hashDigest?: "
|
4508
|
+
hashDigest?: "latin1" | "hex" | "base64";
|
4492
4509
|
|
4493
4510
|
/**
|
4494
4511
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4546,6 +4563,11 @@ declare interface HttpUriOptions {
|
|
4546
4563
|
*/
|
4547
4564
|
lockfileLocation?: string;
|
4548
4565
|
|
4566
|
+
/**
|
4567
|
+
* Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
|
4568
|
+
*/
|
4569
|
+
proxy?: string;
|
4570
|
+
|
4549
4571
|
/**
|
4550
4572
|
* When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
|
4551
4573
|
*/
|
@@ -4638,6 +4660,11 @@ declare interface ImportModuleOptions {
|
|
4638
4660
|
* the target public path
|
4639
4661
|
*/
|
4640
4662
|
publicPath?: string;
|
4663
|
+
|
4664
|
+
/**
|
4665
|
+
* target base uri
|
4666
|
+
*/
|
4667
|
+
baseUri?: string;
|
4641
4668
|
}
|
4642
4669
|
type ImportSource =
|
4643
4670
|
| undefined
|
@@ -4902,6 +4929,7 @@ declare class JavascriptParser extends Parser {
|
|
4902
4929
|
| ClassDeclaration
|
4903
4930
|
| ExpressionStatement
|
4904
4931
|
| BlockStatement
|
4932
|
+
| StaticBlock
|
4905
4933
|
| EmptyStatement
|
4906
4934
|
| DebuggerStatement
|
4907
4935
|
| WithStatement
|
@@ -4932,6 +4960,7 @@ declare class JavascriptParser extends Parser {
|
|
4932
4960
|
| ClassDeclaration
|
4933
4961
|
| ExpressionStatement
|
4934
4962
|
| BlockStatement
|
4963
|
+
| StaticBlock
|
4935
4964
|
| EmptyStatement
|
4936
4965
|
| DebuggerStatement
|
4937
4966
|
| WithStatement
|
@@ -4962,6 +4991,7 @@ declare class JavascriptParser extends Parser {
|
|
4962
4991
|
| ClassDeclaration
|
4963
4992
|
| ExpressionStatement
|
4964
4993
|
| BlockStatement
|
4994
|
+
| StaticBlock
|
4965
4995
|
| EmptyStatement
|
4966
4996
|
| DebuggerStatement
|
4967
4997
|
| WithStatement
|
@@ -5133,6 +5163,7 @@ declare class JavascriptParser extends Parser {
|
|
5133
5163
|
| ClassDeclaration
|
5134
5164
|
| ExpressionStatement
|
5135
5165
|
| BlockStatement
|
5166
|
+
| StaticBlock
|
5136
5167
|
| EmptyStatement
|
5137
5168
|
| DebuggerStatement
|
5138
5169
|
| WithStatement
|
@@ -5355,7 +5386,7 @@ declare class JavascriptParser extends Parser {
|
|
5355
5386
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
5356
5387
|
parseCommentOptions(
|
5357
5388
|
range?: any
|
5358
|
-
): { options: null; errors: null } | { options: object; errors:
|
5389
|
+
): { options: null; errors: null } | { options: object; errors: unknown[] };
|
5359
5390
|
extractMemberExpressionChain(expression: MemberExpression): {
|
5360
5391
|
members: string[];
|
5361
5392
|
object:
|
@@ -5477,6 +5508,11 @@ declare interface JavascriptParserOptions {
|
|
5477
5508
|
*/
|
5478
5509
|
importMeta?: boolean;
|
5479
5510
|
|
5511
|
+
/**
|
5512
|
+
* Enable/disable evaluating import.meta.webpackContext.
|
5513
|
+
*/
|
5514
|
+
importMetaContext?: boolean;
|
5515
|
+
|
5480
5516
|
/**
|
5481
5517
|
* Include polyfills or mocks for various node stuff.
|
5482
5518
|
*/
|
@@ -6034,9 +6070,8 @@ declare class LazySet<T> {
|
|
6034
6070
|
has(item: T): boolean;
|
6035
6071
|
keys(): IterableIterator<T>;
|
6036
6072
|
values(): IterableIterator<T>;
|
6037
|
-
[Symbol.iterator](): IterableIterator<T>;
|
6038
|
-
readonly [Symbol.toStringTag]: string;
|
6039
6073
|
serialize(__0: { write: any }): void;
|
6074
|
+
[Symbol.iterator](): IterableIterator<T>;
|
6040
6075
|
static deserialize(__0: { read: any }): LazySet<any>;
|
6041
6076
|
}
|
6042
6077
|
declare interface LibIdentOptions {
|
@@ -6827,6 +6862,7 @@ declare interface ModuleFederationPluginOptions {
|
|
6827
6862
|
* The external type of the remote containers.
|
6828
6863
|
*/
|
6829
6864
|
remoteType?:
|
6865
|
+
| "import"
|
6830
6866
|
| "var"
|
6831
6867
|
| "module"
|
6832
6868
|
| "assign"
|
@@ -6845,7 +6881,6 @@ declare interface ModuleFederationPluginOptions {
|
|
6845
6881
|
| "jsonp"
|
6846
6882
|
| "system"
|
6847
6883
|
| "promise"
|
6848
|
-
| "import"
|
6849
6884
|
| "script"
|
6850
6885
|
| "node-commonjs";
|
6851
6886
|
|
@@ -7226,6 +7261,37 @@ declare interface ModuleReferenceOptions {
|
|
7226
7261
|
*/
|
7227
7262
|
asiSafe?: boolean;
|
7228
7263
|
}
|
7264
|
+
declare interface ModuleSettings {
|
7265
|
+
/**
|
7266
|
+
* Specifies the layer in which the module should be placed in.
|
7267
|
+
*/
|
7268
|
+
layer?: string;
|
7269
|
+
|
7270
|
+
/**
|
7271
|
+
* Module type to use for the module.
|
7272
|
+
*/
|
7273
|
+
type?: string;
|
7274
|
+
|
7275
|
+
/**
|
7276
|
+
* Options for the resolver.
|
7277
|
+
*/
|
7278
|
+
resolve?: ResolveOptionsWebpackOptions;
|
7279
|
+
|
7280
|
+
/**
|
7281
|
+
* Options for parsing.
|
7282
|
+
*/
|
7283
|
+
parser?: { [index: string]: any };
|
7284
|
+
|
7285
|
+
/**
|
7286
|
+
* The options for the module generator.
|
7287
|
+
*/
|
7288
|
+
generator?: { [index: string]: any };
|
7289
|
+
|
7290
|
+
/**
|
7291
|
+
* Flags a module as with or without side effects.
|
7292
|
+
*/
|
7293
|
+
sideEffects?: boolean;
|
7294
|
+
}
|
7229
7295
|
declare abstract class ModuleTemplate {
|
7230
7296
|
type: string;
|
7231
7297
|
hooks: Readonly<{
|
@@ -7390,6 +7456,7 @@ type NodeEstreeIndex =
|
|
7390
7456
|
| PrivateIdentifier
|
7391
7457
|
| ExpressionStatement
|
7392
7458
|
| BlockStatement
|
7459
|
+
| StaticBlock
|
7393
7460
|
| EmptyStatement
|
7394
7461
|
| DebuggerStatement
|
7395
7462
|
| WithStatement
|
@@ -7476,76 +7543,15 @@ declare class NodeTemplatePlugin {
|
|
7476
7543
|
}
|
7477
7544
|
type NodeWebpackOptions = false | NodeOptions;
|
7478
7545
|
declare class NormalModule extends Module {
|
7479
|
-
constructor(__0:
|
7480
|
-
/**
|
7481
|
-
* an optional layer in which the module is
|
7482
|
-
*/
|
7483
|
-
layer?: string;
|
7484
|
-
/**
|
7485
|
-
* module type
|
7486
|
-
*/
|
7487
|
-
type: string;
|
7488
|
-
/**
|
7489
|
-
* request string
|
7490
|
-
*/
|
7491
|
-
request: string;
|
7492
|
-
/**
|
7493
|
-
* request intended by user (without loaders from config)
|
7494
|
-
*/
|
7495
|
-
userRequest: string;
|
7496
|
-
/**
|
7497
|
-
* request without resolving
|
7498
|
-
*/
|
7499
|
-
rawRequest: string;
|
7500
|
-
/**
|
7501
|
-
* list of loaders
|
7502
|
-
*/
|
7503
|
-
loaders: LoaderItem[];
|
7504
|
-
/**
|
7505
|
-
* path + query of the real resource
|
7506
|
-
*/
|
7507
|
-
resource: string;
|
7508
|
-
/**
|
7509
|
-
* resource resolve data
|
7510
|
-
*/
|
7511
|
-
resourceResolveData?: Record<string, any>;
|
7512
|
-
/**
|
7513
|
-
* context directory for resolving
|
7514
|
-
*/
|
7515
|
-
context: string;
|
7516
|
-
/**
|
7517
|
-
* path + query of the matched resource (virtual)
|
7518
|
-
*/
|
7519
|
-
matchResource?: string;
|
7520
|
-
/**
|
7521
|
-
* the parser used
|
7522
|
-
*/
|
7523
|
-
parser: Parser;
|
7524
|
-
/**
|
7525
|
-
* the options of the parser used
|
7526
|
-
*/
|
7527
|
-
parserOptions: object;
|
7528
|
-
/**
|
7529
|
-
* the generator used
|
7530
|
-
*/
|
7531
|
-
generator: Generator;
|
7532
|
-
/**
|
7533
|
-
* the options of the generator used
|
7534
|
-
*/
|
7535
|
-
generatorOptions: object;
|
7536
|
-
/**
|
7537
|
-
* options used for resolving requests from this module
|
7538
|
-
*/
|
7539
|
-
resolveOptions: Object;
|
7540
|
-
});
|
7546
|
+
constructor(__0: NormalModuleCreateData);
|
7541
7547
|
request: string;
|
7542
7548
|
userRequest: string;
|
7543
7549
|
rawRequest: string;
|
7544
7550
|
binary: boolean;
|
7545
7551
|
parser: Parser;
|
7546
|
-
parserOptions
|
7552
|
+
parserOptions?: Record<string, any>;
|
7547
7553
|
generator: Generator;
|
7548
|
-
generatorOptions
|
7554
|
+
generatorOptions?: Record<string, any>;
|
7549
7555
|
resource: string;
|
7550
7556
|
resourceResolveData?: Record<string, any>;
|
7551
7557
|
matchResource?: string;
|
@@ -7588,20 +7594,109 @@ declare interface NormalModuleCompilationHooks {
|
|
7588
7594
|
readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
|
7589
7595
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
7590
7596
|
}
|
7597
|
+
declare interface NormalModuleCreateData {
|
7598
|
+
/**
|
7599
|
+
* an optional layer in which the module is
|
7600
|
+
*/
|
7601
|
+
layer?: string;
|
7602
|
+
|
7603
|
+
/**
|
7604
|
+
* module type
|
7605
|
+
*/
|
7606
|
+
type: string;
|
7607
|
+
|
7608
|
+
/**
|
7609
|
+
* request string
|
7610
|
+
*/
|
7611
|
+
request: string;
|
7612
|
+
|
7613
|
+
/**
|
7614
|
+
* request intended by user (without loaders from config)
|
7615
|
+
*/
|
7616
|
+
userRequest: string;
|
7617
|
+
|
7618
|
+
/**
|
7619
|
+
* request without resolving
|
7620
|
+
*/
|
7621
|
+
rawRequest: string;
|
7622
|
+
|
7623
|
+
/**
|
7624
|
+
* list of loaders
|
7625
|
+
*/
|
7626
|
+
loaders: LoaderItem[];
|
7627
|
+
|
7628
|
+
/**
|
7629
|
+
* path + query of the real resource
|
7630
|
+
*/
|
7631
|
+
resource: string;
|
7632
|
+
|
7633
|
+
/**
|
7634
|
+
* resource resolve data
|
7635
|
+
*/
|
7636
|
+
resourceResolveData?: Record<string, any>;
|
7637
|
+
|
7638
|
+
/**
|
7639
|
+
* context directory for resolving
|
7640
|
+
*/
|
7641
|
+
context: string;
|
7642
|
+
|
7643
|
+
/**
|
7644
|
+
* path + query of the matched resource (virtual)
|
7645
|
+
*/
|
7646
|
+
matchResource?: string;
|
7647
|
+
|
7648
|
+
/**
|
7649
|
+
* the parser used
|
7650
|
+
*/
|
7651
|
+
parser: Parser;
|
7652
|
+
|
7653
|
+
/**
|
7654
|
+
* the options of the parser used
|
7655
|
+
*/
|
7656
|
+
parserOptions?: Record<string, any>;
|
7657
|
+
|
7658
|
+
/**
|
7659
|
+
* the generator used
|
7660
|
+
*/
|
7661
|
+
generator: Generator;
|
7662
|
+
|
7663
|
+
/**
|
7664
|
+
* the options of the generator used
|
7665
|
+
*/
|
7666
|
+
generatorOptions?: Record<string, any>;
|
7667
|
+
|
7668
|
+
/**
|
7669
|
+
* options used for resolving requests from this module
|
7670
|
+
*/
|
7671
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
7672
|
+
}
|
7591
7673
|
declare abstract class NormalModuleFactory extends ModuleFactory {
|
7592
7674
|
hooks: Readonly<{
|
7593
|
-
resolve: AsyncSeriesBailHook<[ResolveData],
|
7675
|
+
resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
|
7594
7676
|
resolveForScheme: HookMap<
|
7595
7677
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7596
7678
|
>;
|
7597
7679
|
resolveInScheme: HookMap<
|
7598
7680
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7599
7681
|
>;
|
7600
|
-
factorize: AsyncSeriesBailHook<[ResolveData],
|
7601
|
-
beforeResolve: AsyncSeriesBailHook<[ResolveData],
|
7602
|
-
afterResolve: AsyncSeriesBailHook<[ResolveData],
|
7603
|
-
createModule: AsyncSeriesBailHook<
|
7604
|
-
|
7682
|
+
factorize: AsyncSeriesBailHook<[ResolveData], Module>;
|
7683
|
+
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7684
|
+
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7685
|
+
createModule: AsyncSeriesBailHook<
|
7686
|
+
[
|
7687
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7688
|
+
ResolveData
|
7689
|
+
],
|
7690
|
+
void | Module
|
7691
|
+
>;
|
7692
|
+
module: SyncWaterfallHook<
|
7693
|
+
[
|
7694
|
+
Module,
|
7695
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7696
|
+
ResolveData
|
7697
|
+
],
|
7698
|
+
Module
|
7699
|
+
>;
|
7605
7700
|
createParser: HookMap<SyncBailHook<any, any>>;
|
7606
7701
|
parser: HookMap<SyncHook<any>>;
|
7607
7702
|
createGenerator: HookMap<SyncBailHook<any, any>>;
|
@@ -7709,8 +7804,8 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|
7709
7804
|
Omit<
|
7710
7805
|
StatsOptions,
|
7711
7806
|
| "context"
|
7712
|
-
| "requestShortener"
|
7713
7807
|
| "chunkGroups"
|
7808
|
+
| "requestShortener"
|
7714
7809
|
| "chunksSort"
|
7715
7810
|
| "modulesSort"
|
7716
7811
|
| "chunkModulesSort"
|
@@ -8987,7 +9082,7 @@ declare class ProgressPlugin {
|
|
8987
9082
|
showModules?: boolean;
|
8988
9083
|
showDependencies?: boolean;
|
8989
9084
|
showActiveModules?: boolean;
|
8990
|
-
percentBy?: null | "
|
9085
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
8991
9086
|
apply(compiler: Compiler | MultiCompiler): void;
|
8992
9087
|
static getReporter(
|
8993
9088
|
compiler: Compiler
|
@@ -9048,7 +9143,7 @@ declare interface ProgressPluginOptions {
|
|
9048
9143
|
/**
|
9049
9144
|
* Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
|
9050
9145
|
*/
|
9051
|
-
percentBy?: null | "
|
9146
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
9052
9147
|
|
9053
9148
|
/**
|
9054
9149
|
* Collect profile data for progress steps. Default: false.
|
@@ -9215,6 +9310,11 @@ declare interface RenderBootstrapContext {
|
|
9215
9310
|
*/
|
9216
9311
|
chunk: Chunk;
|
9217
9312
|
|
9313
|
+
/**
|
9314
|
+
* results of code generation
|
9315
|
+
*/
|
9316
|
+
codeGenerationResults: CodeGenerationResults;
|
9317
|
+
|
9218
9318
|
/**
|
9219
9319
|
* the runtime template
|
9220
9320
|
*/
|
@@ -9389,6 +9489,11 @@ declare interface ResolveContext {
|
|
9389
9489
|
* log function
|
9390
9490
|
*/
|
9391
9491
|
log?: (arg0: string) => void;
|
9492
|
+
|
9493
|
+
/**
|
9494
|
+
* yield result, if provided plugins can return several results
|
9495
|
+
*/
|
9496
|
+
yield?: (arg0: ResolveRequest) => void;
|
9392
9497
|
}
|
9393
9498
|
declare interface ResolveData {
|
9394
9499
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
@@ -9398,7 +9503,7 @@ declare interface ResolveData {
|
|
9398
9503
|
assertions?: Record<string, any>;
|
9399
9504
|
dependencies: ModuleDependency[];
|
9400
9505
|
dependencyType: string;
|
9401
|
-
createData:
|
9506
|
+
createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
|
9402
9507
|
fileDependencies: LazySet<string>;
|
9403
9508
|
missingDependencies: LazySet<string>;
|
9404
9509
|
contextDependencies: LazySet<string>;
|
@@ -10173,14 +10278,15 @@ declare class RuntimeSpecSet {
|
|
10173
10278
|
constructor(iterable?: any);
|
10174
10279
|
add(runtime?: any): void;
|
10175
10280
|
has(runtime?: any): boolean;
|
10176
|
-
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
10177
10281
|
readonly size: number;
|
10282
|
+
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
10178
10283
|
}
|
10179
10284
|
declare abstract class RuntimeTemplate {
|
10180
10285
|
compilation: Compilation;
|
10181
10286
|
outputOptions: OutputNormalized;
|
10182
10287
|
requestShortener: RequestShortener;
|
10183
10288
|
globalObject: string;
|
10289
|
+
contentHashReplacement: string;
|
10184
10290
|
isIIFE(): undefined | boolean;
|
10185
10291
|
isModule(): undefined | boolean;
|
10186
10292
|
supportsConst(): undefined | boolean;
|
@@ -10871,7 +10977,6 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
10871
10977
|
* Iterates over values in the set.
|
10872
10978
|
*/
|
10873
10979
|
[Symbol.iterator](): IterableIterator<T>;
|
10874
|
-
readonly [Symbol.toStringTag]: string;
|
10875
10980
|
}
|
10876
10981
|
declare class Source {
|
10877
10982
|
constructor();
|
@@ -11061,6 +11166,7 @@ type Statement =
|
|
11061
11166
|
| ClassDeclaration
|
11062
11167
|
| ExpressionStatement
|
11063
11168
|
| BlockStatement
|
11169
|
+
| StaticBlock
|
11064
11170
|
| EmptyStatement
|
11065
11171
|
| DebuggerStatement
|
11066
11172
|
| WithStatement
|
@@ -11707,6 +11813,7 @@ declare interface UpdateHashContextGenerator {
|
|
11707
11813
|
module: NormalModule;
|
11708
11814
|
chunkGraph: ChunkGraph;
|
11709
11815
|
runtime: RuntimeSpec;
|
11816
|
+
runtimeTemplate?: RuntimeTemplate;
|
11710
11817
|
}
|
11711
11818
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
11712
11819
|
declare interface UserResolveOptions {
|
@@ -11835,7 +11942,7 @@ declare interface UserResolveOptions {
|
|
11835
11942
|
restrictions?: (string | RegExp)[];
|
11836
11943
|
|
11837
11944
|
/**
|
11838
|
-
* Use only the sync
|
11945
|
+
* Use only the sync constraints of the file system calls
|
11839
11946
|
*/
|
11840
11947
|
useSyncFileSystemCalls?: boolean;
|
11841
11948
|
|
@@ -12198,6 +12305,7 @@ declare interface WebpackOptionsNormalized {
|
|
12198
12305
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
12199
12306
|
*/
|
12200
12307
|
externalsType?:
|
12308
|
+
| "import"
|
12201
12309
|
| "var"
|
12202
12310
|
| "module"
|
12203
12311
|
| "assign"
|
@@ -12216,7 +12324,6 @@ declare interface WebpackOptionsNormalized {
|
|
12216
12324
|
| "jsonp"
|
12217
12325
|
| "system"
|
12218
12326
|
| "promise"
|
12219
|
-
| "import"
|
12220
12327
|
| "script"
|
12221
12328
|
| "node-commonjs";
|
12222
12329
|
|
@@ -12913,6 +13020,7 @@ declare namespace exports {
|
|
12913
13020
|
Entry,
|
12914
13021
|
EntryNormalized,
|
12915
13022
|
EntryObject,
|
13023
|
+
FileCacheOptions,
|
12916
13024
|
LibraryOptions,
|
12917
13025
|
ModuleOptions,
|
12918
13026
|
ResolveOptionsWebpackOptions as ResolveOptions,
|
@@ -12927,11 +13035,15 @@ declare namespace exports {
|
|
12927
13035
|
WebpackPluginInstance,
|
12928
13036
|
Asset,
|
12929
13037
|
AssetInfo,
|
13038
|
+
EntryOptions,
|
13039
|
+
AssetEmittedInfo,
|
12930
13040
|
MultiStats,
|
12931
13041
|
ParserState,
|
12932
13042
|
ResolvePluginInstance,
|
12933
13043
|
Resolver,
|
12934
13044
|
Watching,
|
13045
|
+
Argument,
|
13046
|
+
Problem,
|
12935
13047
|
StatsAsset,
|
12936
13048
|
StatsChunk,
|
12937
13049
|
StatsChunkGroup,
|