webpack 5.84.1 → 5.85.1
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/AsyncDependenciesBlock.js +2 -2
- package/lib/AutomaticPrefetchPlugin.js +1 -0
- package/lib/BannerPlugin.js +4 -0
- package/lib/CacheFacade.js +4 -0
- package/lib/ChunkGroup.js +5 -1
- package/lib/CleanPlugin.js +30 -7
- package/lib/CompatibilityPlugin.js +1 -1
- package/lib/Compilation.js +1 -1
- package/lib/Compiler.js +1 -1
- package/lib/ContextModuleFactory.js +1 -1
- package/lib/DllModuleFactory.js +1 -1
- package/lib/HookWebpackError.js +1 -1
- package/lib/IgnoreErrorModuleFactory.js +1 -1
- package/lib/Module.js +21 -9
- package/lib/ModuleFactory.js +1 -1
- package/lib/ModuleTypeConstants.js +2 -1
- package/lib/NormalModuleFactory.js +1 -1
- package/lib/NormalModuleReplacementPlugin.js +4 -2
- package/lib/NullFactory.js +1 -1
- package/lib/RecordIdsPlugin.js +4 -4
- package/lib/RuntimeModule.js +5 -5
- package/lib/RuntimePlugin.js +4 -0
- package/lib/RuntimeTemplate.js +2 -2
- package/lib/SelfModuleFactory.js +1 -1
- package/lib/Template.js +1 -1
- package/lib/UseStrictPlugin.js +4 -0
- package/lib/WarnDeprecatedOptionPlugin.js +7 -0
- package/lib/WatchIgnorePlugin.js +4 -0
- package/lib/WebpackOptionsApply.js +2 -1
- package/lib/asset/AssetGenerator.js +7 -2
- package/lib/asset/AssetModulesPlugin.js +7 -1
- package/lib/asset/AssetParser.js +4 -1
- package/lib/asset/RawDataUrlModule.js +5 -3
- package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
- package/lib/cache/PackFileCacheStrategy.js +7 -1
- package/lib/config/defaults.js +38 -10
- package/lib/config/normalization.js +2 -1
- package/lib/container/ContainerEntryModule.js +4 -0
- package/lib/container/ContainerEntryModuleFactory.js +1 -1
- package/lib/container/FallbackDependency.js +7 -0
- package/lib/container/FallbackItemDependency.js +3 -0
- package/lib/container/FallbackModule.js +4 -0
- package/lib/container/FallbackModuleFactory.js +1 -1
- package/lib/container/RemoteModule.js +4 -0
- package/lib/container/RemoteRuntimeModule.js +1 -0
- package/lib/container/RemoteToExternalDependency.js +3 -0
- package/lib/dependencies/CommonJsPlugin.js +14 -12
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +1 -1
- package/lib/dependencies/HarmonyExports.js +3 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +16 -5
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +75 -6
- package/lib/dependencies/WorkerPlugin.js +25 -1
- package/lib/esm/ModuleChunkFormatPlugin.js +13 -5
- package/lib/esm/ModuleChunkLoadingPlugin.js +9 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +10 -8
- package/lib/hmr/LazyCompilationPlugin.js +1 -1
- package/lib/ids/ChunkModuleIdRangePlugin.js +11 -0
- package/lib/ids/DeterministicChunkIdsPlugin.js +11 -2
- package/lib/ids/DeterministicModuleIdsPlugin.js +11 -7
- package/lib/ids/HashedModuleIdsPlugin.js +8 -1
- package/lib/ids/IdHelpers.js +6 -0
- package/lib/ids/NamedChunkIdsPlugin.js +13 -1
- package/lib/ids/NamedModuleIdsPlugin.js +14 -3
- package/lib/ids/OccurrenceChunkIdsPlugin.js +6 -2
- package/lib/ids/SyncModuleIdsPlugin.js +2 -2
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -1
- package/lib/javascript/BasicEvaluatedExpression.js +12 -1
- package/lib/javascript/ChunkHelpers.js +2 -2
- package/lib/javascript/EnableChunkLoadingPlugin.js +4 -0
- package/lib/javascript/JavascriptModulesPlugin.js +24 -19
- package/lib/javascript/JavascriptParser.js +42 -18
- package/lib/javascript/StartupHelpers.js +1 -1
- package/lib/json/JsonGenerator.js +7 -5
- package/lib/json/JsonParser.js +1 -1
- package/lib/library/AbstractLibraryPlugin.js +4 -0
- package/lib/library/AssignLibraryPlugin.js +6 -4
- package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
- package/lib/library/ModuleLibraryPlugin.js +6 -3
- package/lib/library/SystemLibraryPlugin.js +1 -0
- package/lib/library/UmdLibraryPlugin.js +4 -0
- package/lib/node/CommonJsChunkLoadingPlugin.js +17 -2
- package/lib/node/NodeTemplatePlugin.js +10 -2
- package/lib/node/NodeWatchFileSystem.js +1 -1
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +4 -1
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +8 -0
- package/lib/node/ReadFileCompileWasmPlugin.js +19 -2
- package/lib/node/RequireChunkLoadingRuntimeModule.js +4 -1
- package/lib/runtime/AsyncModuleRuntimeModule.js +1 -1
- package/lib/runtime/AutoPublicPathRuntimeModule.js +5 -1
- package/lib/runtime/BaseUriRuntimeModule.js +5 -1
- package/lib/runtime/EnsureChunkRuntimeModule.js +3 -0
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +35 -16
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
- package/lib/runtime/LoadScriptRuntimeModule.js +1 -1
- package/lib/runtime/PublicPathRuntimeModule.js +5 -0
- package/lib/runtime/StartupChunkDependenciesPlugin.js +15 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -0
- package/lib/runtime/StartupEntrypointRuntimeModule.js +3 -0
- package/lib/sharing/ProvideSharedModuleFactory.js +1 -1
- package/lib/util/createHash.js +1 -1
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +9 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +13 -3
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +19 -2
- package/lib/wasm-async/AsyncWebAssemblyParser.js +3 -0
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +25 -1
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +14 -5
- package/lib/wasm-sync/WebAssemblyGenerator.js +18 -5
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +1 -1
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +12 -1
- package/lib/wasm-sync/WebAssemblyParser.js +9 -2
- package/lib/wasm-sync/WebAssemblyUtils.js +1 -1
- package/lib/web/FetchCompileAsyncWasmPlugin.js +9 -0
- package/lib/web/FetchCompileWasmPlugin.js +19 -2
- package/lib/web/JsonpChunkLoadingPlugin.js +9 -0
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +9 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
- package/package.json +1 -1
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +12 -0
- package/types.d.ts +189 -141
@@ -744,10 +744,18 @@
|
|
744
744
|
"description": "The environment supports an async import() function to import EcmaScript modules.",
|
745
745
|
"type": "boolean"
|
746
746
|
},
|
747
|
+
"dynamicImportInWorker": {
|
748
|
+
"description": "The environment supports an async import() is available when creating a worker.",
|
749
|
+
"type": "boolean"
|
750
|
+
},
|
747
751
|
"forOf": {
|
748
752
|
"description": "The environment supports 'for of' iteration ('for (const x of array) { ... }').",
|
749
753
|
"type": "boolean"
|
750
754
|
},
|
755
|
+
"globalThis": {
|
756
|
+
"description": "The environment supports 'globalThis'.",
|
757
|
+
"type": "boolean"
|
758
|
+
},
|
751
759
|
"module": {
|
752
760
|
"description": "The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').",
|
753
761
|
"type": "boolean"
|
@@ -1254,6 +1262,10 @@
|
|
1254
1262
|
"description": "Track and log detailed timing information for individual cache items.",
|
1255
1263
|
"type": "boolean"
|
1256
1264
|
},
|
1265
|
+
"readonly": {
|
1266
|
+
"description": "Enable/disable readonly mode.",
|
1267
|
+
"type": "boolean"
|
1268
|
+
},
|
1257
1269
|
"store": {
|
1258
1270
|
"description": "When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).",
|
1259
1271
|
"enum": ["pack"]
|
package/types.d.ts
CHANGED
@@ -356,7 +356,7 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
356
356
|
};
|
357
357
|
loc?: SyntheticDependencyLocation | RealDependencyLocation;
|
358
358
|
request?: string;
|
359
|
-
chunkName
|
359
|
+
chunkName?: string;
|
360
360
|
module: any;
|
361
361
|
}
|
362
362
|
declare abstract class AsyncQueue<T, K, R> {
|
@@ -383,18 +383,28 @@ declare abstract class AsyncQueue<T, K, R> {
|
|
383
383
|
clear(): void;
|
384
384
|
}
|
385
385
|
declare class AsyncWebAssemblyModulesPlugin {
|
386
|
-
constructor(options
|
387
|
-
options:
|
386
|
+
constructor(options: AsyncWebAssemblyModulesPluginOptions);
|
387
|
+
options: AsyncWebAssemblyModulesPluginOptions;
|
388
388
|
|
389
389
|
/**
|
390
390
|
* Apply the plugin
|
391
391
|
*/
|
392
392
|
apply(compiler: Compiler): void;
|
393
|
-
renderModule(
|
393
|
+
renderModule(
|
394
|
+
module: Module,
|
395
|
+
renderContext: WebAssemblyRenderContext,
|
396
|
+
hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
|
397
|
+
): Source;
|
394
398
|
static getCompilationHooks(
|
395
399
|
compilation: Compilation
|
396
400
|
): CompilationHooksAsyncWebAssemblyModulesPlugin;
|
397
401
|
}
|
402
|
+
declare interface AsyncWebAssemblyModulesPluginOptions {
|
403
|
+
/**
|
404
|
+
* mangle imports
|
405
|
+
*/
|
406
|
+
mangleImports?: boolean;
|
407
|
+
}
|
398
408
|
declare class AutomaticPrefetchPlugin {
|
399
409
|
constructor();
|
400
410
|
|
@@ -497,6 +507,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
497
507
|
rootInfo: string | VariableInfoInterface;
|
498
508
|
getMembers: () => string[];
|
499
509
|
getMembersOptionals: () => boolean[];
|
510
|
+
getMemberRanges: () => [number, number][];
|
500
511
|
expression: NodeEstreeIndex;
|
501
512
|
isUnknown(): boolean;
|
502
513
|
isNull(): boolean;
|
@@ -581,7 +592,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
581
592
|
identifier: string | VariableInfoInterface,
|
582
593
|
rootInfo: string | VariableInfoInterface,
|
583
594
|
getMembers: () => string[],
|
584
|
-
getMembersOptionals?: () => boolean[]
|
595
|
+
getMembersOptionals?: () => boolean[],
|
596
|
+
getMemberRanges?: () => [number, number][]
|
585
597
|
): BasicEvaluatedExpression;
|
586
598
|
|
587
599
|
/**
|
@@ -776,6 +788,7 @@ declare interface CallExpressionInfo {
|
|
776
788
|
name: string;
|
777
789
|
getMembers: () => string[];
|
778
790
|
getMembersOptionals: () => boolean[];
|
791
|
+
getMemberRanges: () => [number, number][];
|
779
792
|
}
|
780
793
|
declare interface CallbackAsyncQueue<T> {
|
781
794
|
(err?: null | WebpackError, result?: T): any;
|
@@ -1106,9 +1119,9 @@ declare abstract class ChunkGroup {
|
|
1106
1119
|
removeParent(chunkGroup: ChunkGroup): boolean;
|
1107
1120
|
addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
|
1108
1121
|
get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
|
1109
|
-
getBlocks():
|
1122
|
+
getBlocks(): AsyncDependenciesBlock[];
|
1110
1123
|
getNumberOfBlocks(): number;
|
1111
|
-
hasBlock(block
|
1124
|
+
hasBlock(block: AsyncDependenciesBlock): boolean;
|
1112
1125
|
get blocksIterable(): Iterable<AsyncDependenciesBlock>;
|
1113
1126
|
addBlock(block: AsyncDependenciesBlock): boolean;
|
1114
1127
|
addOrigin(module: Module, loc: DependencyLocation, request: string): void;
|
@@ -1177,14 +1190,35 @@ declare interface ChunkMaps {
|
|
1177
1190
|
name: Record<string | number, string>;
|
1178
1191
|
}
|
1179
1192
|
declare class ChunkModuleIdRangePlugin {
|
1180
|
-
constructor(options
|
1181
|
-
options:
|
1193
|
+
constructor(options: ChunkModuleIdRangePluginOptions);
|
1194
|
+
options: ChunkModuleIdRangePluginOptions;
|
1182
1195
|
|
1183
1196
|
/**
|
1184
1197
|
* Apply the plugin
|
1185
1198
|
*/
|
1186
1199
|
apply(compiler: Compiler): void;
|
1187
1200
|
}
|
1201
|
+
declare interface ChunkModuleIdRangePluginOptions {
|
1202
|
+
/**
|
1203
|
+
* the chunk name
|
1204
|
+
*/
|
1205
|
+
name: string;
|
1206
|
+
|
1207
|
+
/**
|
1208
|
+
* order
|
1209
|
+
*/
|
1210
|
+
order?: "index" | "index2" | "preOrderIndex" | "postOrderIndex";
|
1211
|
+
|
1212
|
+
/**
|
1213
|
+
* start id
|
1214
|
+
*/
|
1215
|
+
start?: number;
|
1216
|
+
|
1217
|
+
/**
|
1218
|
+
* end id
|
1219
|
+
*/
|
1220
|
+
end?: number;
|
1221
|
+
}
|
1188
1222
|
declare interface ChunkModuleMaps {
|
1189
1223
|
id: Record<string | number, (string | number)[]>;
|
1190
1224
|
hash: Record<string | number, string>;
|
@@ -1482,7 +1516,7 @@ declare class Compilation {
|
|
1482
1516
|
any
|
1483
1517
|
>;
|
1484
1518
|
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1485
|
-
shouldRecord: SyncBailHook<[], boolean>;
|
1519
|
+
shouldRecord: SyncBailHook<[], undefined | boolean>;
|
1486
1520
|
additionalChunkRuntimeRequirements: SyncHook<
|
1487
1521
|
[Chunk, Set<string>, RuntimeRequirementsContext]
|
1488
1522
|
>;
|
@@ -1990,8 +2024,8 @@ declare interface CompilationHooksJavascriptModulesPlugin {
|
|
1990
2024
|
[Module, RenderBootstrapContext],
|
1991
2025
|
string
|
1992
2026
|
>;
|
1993
|
-
embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string>;
|
1994
|
-
strictRuntimeBailout: SyncBailHook<[RenderContext], string>;
|
2027
|
+
embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string | void>;
|
2028
|
+
strictRuntimeBailout: SyncBailHook<[RenderContext], string | void>;
|
1995
2029
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
1996
2030
|
useSourceMap: SyncBailHook<[Chunk, RenderContext], boolean>;
|
1997
2031
|
}
|
@@ -2006,7 +2040,7 @@ declare class Compiler {
|
|
2006
2040
|
constructor(context: string, options?: WebpackOptionsNormalized);
|
2007
2041
|
hooks: Readonly<{
|
2008
2042
|
initialize: SyncHook<[]>;
|
2009
|
-
shouldEmit: SyncBailHook<[Compilation], boolean>;
|
2043
|
+
shouldEmit: SyncBailHook<[Compilation], undefined | boolean>;
|
2010
2044
|
done: AsyncSeriesHook<[Stats]>;
|
2011
2045
|
afterDone: SyncHook<[Stats]>;
|
2012
2046
|
additionalPass: AsyncSeriesHook<[]>;
|
@@ -2892,73 +2926,65 @@ declare abstract class DependencyTemplates {
|
|
2892
2926
|
clone(): DependencyTemplates;
|
2893
2927
|
}
|
2894
2928
|
declare class DeterministicChunkIdsPlugin {
|
2895
|
-
constructor(options?:
|
2896
|
-
options:
|
2929
|
+
constructor(options?: DeterministicChunkIdsPluginOptions);
|
2930
|
+
options: DeterministicChunkIdsPluginOptions;
|
2897
2931
|
|
2898
2932
|
/**
|
2899
2933
|
* Apply the plugin
|
2900
2934
|
*/
|
2901
2935
|
apply(compiler: Compiler): void;
|
2902
2936
|
}
|
2937
|
+
declare interface DeterministicChunkIdsPluginOptions {
|
2938
|
+
/**
|
2939
|
+
* context for ids
|
2940
|
+
*/
|
2941
|
+
context?: string;
|
2942
|
+
|
2943
|
+
/**
|
2944
|
+
* maximum length of ids
|
2945
|
+
*/
|
2946
|
+
maxLength?: number;
|
2947
|
+
}
|
2903
2948
|
declare class DeterministicModuleIdsPlugin {
|
2904
|
-
constructor(options?:
|
2905
|
-
|
2906
|
-
* context relative to which module identifiers are computed
|
2907
|
-
*/
|
2908
|
-
context?: string;
|
2909
|
-
/**
|
2910
|
-
* selector function for modules
|
2911
|
-
*/
|
2912
|
-
test?: (arg0: Module) => boolean;
|
2913
|
-
/**
|
2914
|
-
* maximum id length in digits (used as starting point)
|
2915
|
-
*/
|
2916
|
-
maxLength?: number;
|
2917
|
-
/**
|
2918
|
-
* hash salt for ids
|
2919
|
-
*/
|
2920
|
-
salt?: number;
|
2921
|
-
/**
|
2922
|
-
* do not increase the maxLength to find an optimal id space size
|
2923
|
-
*/
|
2924
|
-
fixedLength?: boolean;
|
2925
|
-
/**
|
2926
|
-
* throw an error when id conflicts occur (instead of rehashing)
|
2927
|
-
*/
|
2928
|
-
failOnConflict?: boolean;
|
2929
|
-
});
|
2930
|
-
options: {
|
2931
|
-
/**
|
2932
|
-
* context relative to which module identifiers are computed
|
2933
|
-
*/
|
2934
|
-
context?: string;
|
2935
|
-
/**
|
2936
|
-
* selector function for modules
|
2937
|
-
*/
|
2938
|
-
test?: (arg0: Module) => boolean;
|
2939
|
-
/**
|
2940
|
-
* maximum id length in digits (used as starting point)
|
2941
|
-
*/
|
2942
|
-
maxLength?: number;
|
2943
|
-
/**
|
2944
|
-
* hash salt for ids
|
2945
|
-
*/
|
2946
|
-
salt?: number;
|
2947
|
-
/**
|
2948
|
-
* do not increase the maxLength to find an optimal id space size
|
2949
|
-
*/
|
2950
|
-
fixedLength?: boolean;
|
2951
|
-
/**
|
2952
|
-
* throw an error when id conflicts occur (instead of rehashing)
|
2953
|
-
*/
|
2954
|
-
failOnConflict?: boolean;
|
2955
|
-
};
|
2949
|
+
constructor(options?: DeterministicModuleIdsPluginOptions);
|
2950
|
+
options: DeterministicModuleIdsPluginOptions;
|
2956
2951
|
|
2957
2952
|
/**
|
2958
2953
|
* Apply the plugin
|
2959
2954
|
*/
|
2960
2955
|
apply(compiler: Compiler): void;
|
2961
2956
|
}
|
2957
|
+
declare interface DeterministicModuleIdsPluginOptions {
|
2958
|
+
/**
|
2959
|
+
* context relative to which module identifiers are computed
|
2960
|
+
*/
|
2961
|
+
context?: string;
|
2962
|
+
|
2963
|
+
/**
|
2964
|
+
* selector function for modules
|
2965
|
+
*/
|
2966
|
+
test?: (arg0: Module) => boolean;
|
2967
|
+
|
2968
|
+
/**
|
2969
|
+
* maximum id length in digits (used as starting point)
|
2970
|
+
*/
|
2971
|
+
maxLength?: number;
|
2972
|
+
|
2973
|
+
/**
|
2974
|
+
* hash salt for ids
|
2975
|
+
*/
|
2976
|
+
salt?: number;
|
2977
|
+
|
2978
|
+
/**
|
2979
|
+
* do not increase the maxLength to find an optimal id space size
|
2980
|
+
*/
|
2981
|
+
fixedLength?: boolean;
|
2982
|
+
|
2983
|
+
/**
|
2984
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
2985
|
+
*/
|
2986
|
+
failOnConflict?: boolean;
|
2987
|
+
}
|
2962
2988
|
|
2963
2989
|
/**
|
2964
2990
|
* Options for the webpack-dev-server.
|
@@ -3491,11 +3517,21 @@ declare interface Environment {
|
|
3491
3517
|
*/
|
3492
3518
|
dynamicImport?: boolean;
|
3493
3519
|
|
3520
|
+
/**
|
3521
|
+
* The environment supports an async import() is available when creating a worker.
|
3522
|
+
*/
|
3523
|
+
dynamicImportInWorker?: boolean;
|
3524
|
+
|
3494
3525
|
/**
|
3495
3526
|
* The environment supports 'for of' iteration ('for (const x of array) { ... }').
|
3496
3527
|
*/
|
3497
3528
|
forOf?: boolean;
|
3498
3529
|
|
3530
|
+
/**
|
3531
|
+
* The environment supports 'globalThis'.
|
3532
|
+
*/
|
3533
|
+
globalThis?: boolean;
|
3534
|
+
|
3499
3535
|
/**
|
3500
3536
|
* The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
|
3501
3537
|
*/
|
@@ -3955,6 +3991,7 @@ declare interface ExpressionExpressionInfo {
|
|
3955
3991
|
name: string;
|
3956
3992
|
getMembers: () => string[];
|
3957
3993
|
getMembersOptionals: () => boolean[];
|
3994
|
+
getMemberRanges: () => [number, number][];
|
3958
3995
|
}
|
3959
3996
|
declare interface ExtensionAliasOption {
|
3960
3997
|
alias: string | string[];
|
@@ -4168,14 +4205,20 @@ declare class FetchCompileAsyncWasmPlugin {
|
|
4168
4205
|
apply(compiler: Compiler): void;
|
4169
4206
|
}
|
4170
4207
|
declare class FetchCompileWasmPlugin {
|
4171
|
-
constructor(options?:
|
4172
|
-
options:
|
4208
|
+
constructor(options?: FetchCompileWasmPluginOptions);
|
4209
|
+
options: FetchCompileWasmPluginOptions;
|
4173
4210
|
|
4174
4211
|
/**
|
4175
4212
|
* Apply the plugin
|
4176
4213
|
*/
|
4177
4214
|
apply(compiler: Compiler): void;
|
4178
4215
|
}
|
4216
|
+
declare interface FetchCompileWasmPluginOptions {
|
4217
|
+
/**
|
4218
|
+
* mangle imports
|
4219
|
+
*/
|
4220
|
+
mangleImports?: boolean;
|
4221
|
+
}
|
4179
4222
|
|
4180
4223
|
/**
|
4181
4224
|
* Options object for persistent file-based caching.
|
@@ -4261,6 +4304,11 @@ declare interface FileCacheOptions {
|
|
4261
4304
|
*/
|
4262
4305
|
profile?: boolean;
|
4263
4306
|
|
4307
|
+
/**
|
4308
|
+
* Enable/disable readonly mode.
|
4309
|
+
*/
|
4310
|
+
readonly?: boolean;
|
4311
|
+
|
4264
4312
|
/**
|
4265
4313
|
* When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
|
4266
4314
|
*/
|
@@ -4679,7 +4727,11 @@ declare interface HashableObject {
|
|
4679
4727
|
declare class HashedModuleIdsPlugin {
|
4680
4728
|
constructor(options?: HashedModuleIdsPluginOptions);
|
4681
4729
|
options: HashedModuleIdsPluginOptions;
|
4682
|
-
|
4730
|
+
|
4731
|
+
/**
|
4732
|
+
* Apply the plugin
|
4733
|
+
*/
|
4734
|
+
apply(compiler: Compiler): void;
|
4683
4735
|
}
|
4684
4736
|
declare interface HashedModuleIdsPluginOptions {
|
4685
4737
|
/**
|
@@ -5291,7 +5343,10 @@ declare class JavascriptParser extends Parser {
|
|
5291
5343
|
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
|
5292
5344
|
call: HookMap<SyncBailHook<[BaseCallExpression], boolean | void>>;
|
5293
5345
|
callMemberChain: HookMap<
|
5294
|
-
SyncBailHook<
|
5346
|
+
SyncBailHook<
|
5347
|
+
[CallExpression, string[], boolean[], [number, number][]],
|
5348
|
+
boolean | void
|
5349
|
+
>
|
5295
5350
|
>;
|
5296
5351
|
memberChainOfCallMemberChain: HookMap<
|
5297
5352
|
SyncBailHook<
|
@@ -5310,7 +5365,10 @@ declare class JavascriptParser extends Parser {
|
|
5310
5365
|
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
5311
5366
|
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
5312
5367
|
expressionMemberChain: HookMap<
|
5313
|
-
SyncBailHook<
|
5368
|
+
SyncBailHook<
|
5369
|
+
[Expression, string[], boolean[], [number, number][]],
|
5370
|
+
boolean | void
|
5371
|
+
>
|
5314
5372
|
>;
|
5315
5373
|
unhandledExpressionMemberChain: HookMap<
|
5316
5374
|
SyncBailHook<[Expression, string[]], boolean | void>
|
@@ -5899,6 +5957,7 @@ declare class JavascriptParser extends Parser {
|
|
5899
5957
|
| YieldExpression
|
5900
5958
|
| Super;
|
5901
5959
|
membersOptionals: boolean[];
|
5960
|
+
memberRanges: [number, number][];
|
5902
5961
|
};
|
5903
5962
|
getFreeInfoFromVariable(varName: string): {
|
5904
5963
|
name: string;
|
@@ -7028,6 +7087,12 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
7028
7087
|
* Example: "web"
|
7029
7088
|
*/
|
7030
7089
|
target: string;
|
7090
|
+
|
7091
|
+
/**
|
7092
|
+
* Tell what kind of ES-features may be used in the generated runtime-code.
|
7093
|
+
* Example: { arrowFunction: true }
|
7094
|
+
*/
|
7095
|
+
environment: Environment;
|
7031
7096
|
}
|
7032
7097
|
declare class LoaderTargetPlugin {
|
7033
7098
|
constructor(target: string);
|
@@ -7191,64 +7256,18 @@ declare interface MinChunkSizePluginOptions {
|
|
7191
7256
|
minChunkSize: number;
|
7192
7257
|
}
|
7193
7258
|
declare class Module extends DependenciesBlock {
|
7194
|
-
constructor(
|
7195
|
-
|
7196
|
-
| ""
|
7197
|
-
| "runtime"
|
7198
|
-
| "javascript/auto"
|
7199
|
-
| "javascript/dynamic"
|
7200
|
-
| "javascript/esm"
|
7201
|
-
| "json"
|
7202
|
-
| "webassembly/async"
|
7203
|
-
| "webassembly/sync"
|
7204
|
-
| "css"
|
7205
|
-
| "css/global"
|
7206
|
-
| "css/module"
|
7207
|
-
| "asset"
|
7208
|
-
| "asset/inline"
|
7209
|
-
| "asset/resource"
|
7210
|
-
| "asset/source"
|
7211
|
-
| "asset/raw-data-url"
|
7212
|
-
| "fallback-module"
|
7213
|
-
| "remote-module"
|
7214
|
-
| "provide-module"
|
7215
|
-
| "consume-shared-module"
|
7216
|
-
| "lazy-compilation-proxy",
|
7217
|
-
context?: string,
|
7218
|
-
layer?: string
|
7219
|
-
);
|
7220
|
-
type:
|
7221
|
-
| ""
|
7222
|
-
| "runtime"
|
7223
|
-
| "javascript/auto"
|
7224
|
-
| "javascript/dynamic"
|
7225
|
-
| "javascript/esm"
|
7226
|
-
| "json"
|
7227
|
-
| "webassembly/async"
|
7228
|
-
| "webassembly/sync"
|
7229
|
-
| "css"
|
7230
|
-
| "css/global"
|
7231
|
-
| "css/module"
|
7232
|
-
| "asset"
|
7233
|
-
| "asset/inline"
|
7234
|
-
| "asset/resource"
|
7235
|
-
| "asset/source"
|
7236
|
-
| "asset/raw-data-url"
|
7237
|
-
| "fallback-module"
|
7238
|
-
| "remote-module"
|
7239
|
-
| "provide-module"
|
7240
|
-
| "consume-shared-module"
|
7241
|
-
| "lazy-compilation-proxy";
|
7259
|
+
constructor(type: string, context?: null | string, layer?: null | string);
|
7260
|
+
type: string;
|
7242
7261
|
context: null | string;
|
7243
7262
|
layer: null | string;
|
7244
7263
|
needId: boolean;
|
7245
7264
|
debugId: number;
|
7246
|
-
resolveOptions
|
7265
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
7247
7266
|
factoryMeta?: object;
|
7248
7267
|
useSourceMap: boolean;
|
7249
7268
|
useSimpleSourceMap: boolean;
|
7250
|
-
buildMeta
|
7251
|
-
buildInfo
|
7269
|
+
buildMeta?: BuildMeta;
|
7270
|
+
buildInfo?: Record<string, any>;
|
7252
7271
|
presentationalDependencies?: Dependency[];
|
7253
7272
|
codeGenerationDependencies?: Dependency[];
|
7254
7273
|
id: string | number;
|
@@ -7265,9 +7284,9 @@ declare class Module extends DependenciesBlock {
|
|
7265
7284
|
| ((requestShortener: RequestShortener) => string)
|
7266
7285
|
)[];
|
7267
7286
|
get optional(): boolean;
|
7268
|
-
addChunk(chunk
|
7269
|
-
removeChunk(chunk
|
7270
|
-
isInChunk(chunk
|
7287
|
+
addChunk(chunk: Chunk): boolean;
|
7288
|
+
removeChunk(chunk: Chunk): void;
|
7289
|
+
isInChunk(chunk: Chunk): boolean;
|
7271
7290
|
isEntryModule(): boolean;
|
7272
7291
|
getChunks(): Chunk[];
|
7273
7292
|
getNumberOfChunks(): number;
|
@@ -7397,7 +7416,7 @@ declare class ModuleDependency extends Dependency {
|
|
7397
7416
|
declare abstract class ModuleFactory {
|
7398
7417
|
create(
|
7399
7418
|
data: ModuleFactoryCreateData,
|
7400
|
-
callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
|
7419
|
+
callback: (arg0?: null | Error, arg1?: ModuleFactoryResult) => void
|
7401
7420
|
): void;
|
7402
7421
|
}
|
7403
7422
|
declare interface ModuleFactoryCreateData {
|
@@ -7960,24 +7979,41 @@ declare abstract class MultiWatching {
|
|
7960
7979
|
close(callback: CallbackFunction<void>): void;
|
7961
7980
|
}
|
7962
7981
|
declare class NamedChunkIdsPlugin {
|
7963
|
-
constructor(options?:
|
7964
|
-
delimiter:
|
7965
|
-
context
|
7982
|
+
constructor(options?: NamedChunkIdsPluginOptions);
|
7983
|
+
delimiter: string;
|
7984
|
+
context?: string;
|
7966
7985
|
|
7967
7986
|
/**
|
7968
7987
|
* Apply the plugin
|
7969
7988
|
*/
|
7970
7989
|
apply(compiler: Compiler): void;
|
7971
7990
|
}
|
7991
|
+
declare interface NamedChunkIdsPluginOptions {
|
7992
|
+
/**
|
7993
|
+
* context
|
7994
|
+
*/
|
7995
|
+
context?: string;
|
7996
|
+
|
7997
|
+
/**
|
7998
|
+
* delimiter
|
7999
|
+
*/
|
8000
|
+
delimiter?: string;
|
8001
|
+
}
|
7972
8002
|
declare class NamedModuleIdsPlugin {
|
7973
|
-
constructor(options?:
|
7974
|
-
options:
|
8003
|
+
constructor(options?: NamedModuleIdsPluginOptions);
|
8004
|
+
options: NamedModuleIdsPluginOptions;
|
7975
8005
|
|
7976
8006
|
/**
|
7977
8007
|
* Apply the plugin
|
7978
8008
|
*/
|
7979
8009
|
apply(compiler: Compiler): void;
|
7980
8010
|
}
|
8011
|
+
declare interface NamedModuleIdsPluginOptions {
|
8012
|
+
/**
|
8013
|
+
* context
|
8014
|
+
*/
|
8015
|
+
context?: string;
|
8016
|
+
}
|
7981
8017
|
declare class NaturalModuleIdsPlugin {
|
7982
8018
|
constructor();
|
7983
8019
|
|
@@ -8130,13 +8166,19 @@ declare class NodeTargetPlugin {
|
|
8130
8166
|
apply(compiler: Compiler): void;
|
8131
8167
|
}
|
8132
8168
|
declare class NodeTemplatePlugin {
|
8133
|
-
constructor(options?:
|
8169
|
+
constructor(options?: NodeTemplatePluginOptions);
|
8134
8170
|
|
8135
8171
|
/**
|
8136
8172
|
* Apply the plugin
|
8137
8173
|
*/
|
8138
8174
|
apply(compiler: Compiler): void;
|
8139
8175
|
}
|
8176
|
+
declare interface NodeTemplatePluginOptions {
|
8177
|
+
/**
|
8178
|
+
* enable async chunk loading
|
8179
|
+
*/
|
8180
|
+
asyncChunkLoading?: boolean;
|
8181
|
+
}
|
8140
8182
|
type NodeWebpackOptions = false | NodeOptions;
|
8141
8183
|
declare class NormalModule extends Module {
|
8142
8184
|
constructor(__0: NormalModuleCreateData);
|
@@ -9886,14 +9928,20 @@ declare interface RawSourceMap {
|
|
9886
9928
|
file: string;
|
9887
9929
|
}
|
9888
9930
|
declare class ReadFileCompileWasmPlugin {
|
9889
|
-
constructor(options?:
|
9890
|
-
options:
|
9931
|
+
constructor(options?: ReadFileCompileWasmPluginOptions);
|
9932
|
+
options: ReadFileCompileWasmPluginOptions;
|
9891
9933
|
|
9892
9934
|
/**
|
9893
9935
|
* Apply the plugin
|
9894
9936
|
*/
|
9895
9937
|
apply(compiler: Compiler): void;
|
9896
9938
|
}
|
9939
|
+
declare interface ReadFileCompileWasmPluginOptions {
|
9940
|
+
/**
|
9941
|
+
* mangle imports
|
9942
|
+
*/
|
9943
|
+
mangleImports?: boolean;
|
9944
|
+
}
|
9897
9945
|
declare interface ReaddirOptions {
|
9898
9946
|
encoding?:
|
9899
9947
|
| null
|
@@ -10883,9 +10931,9 @@ declare class RuntimeModule extends Module {
|
|
10883
10931
|
constructor(name: string, stage?: number);
|
10884
10932
|
name: string;
|
10885
10933
|
stage: number;
|
10886
|
-
compilation
|
10887
|
-
chunk
|
10888
|
-
chunkGraph
|
10934
|
+
compilation?: Compilation;
|
10935
|
+
chunk?: Chunk;
|
10936
|
+
chunkGraph?: ChunkGraph;
|
10889
10937
|
fullHash: boolean;
|
10890
10938
|
dependentHash: boolean;
|
10891
10939
|
attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
|
@@ -11254,7 +11302,7 @@ declare abstract class RuntimeTemplate {
|
|
11254
11302
|
/**
|
11255
11303
|
* when false, call context will not be preserved
|
11256
11304
|
*/
|
11257
|
-
callContext: boolean;
|
11305
|
+
callContext: null | boolean;
|
11258
11306
|
/**
|
11259
11307
|
* when true and accessing the default exports, interop code will be generated
|
11260
11308
|
*/
|
@@ -12460,7 +12508,7 @@ declare class Template {
|
|
12460
12508
|
modules: Module[],
|
12461
12509
|
renderModule: (arg0: Module) => Source,
|
12462
12510
|
prefix?: string
|
12463
|
-
): Source;
|
12511
|
+
): null | Source;
|
12464
12512
|
static renderRuntimeModules(
|
12465
12513
|
runtimeModules: RuntimeModule[],
|
12466
12514
|
renderContext: RenderContext & {
|
@@ -13514,7 +13562,7 @@ declare namespace exports {
|
|
13514
13562
|
export { ProfilingPlugin };
|
13515
13563
|
}
|
13516
13564
|
export namespace util {
|
13517
|
-
export const createHash: (algorithm
|
13565
|
+
export const createHash: (algorithm?: string | typeof Hash) => Hash;
|
13518
13566
|
export namespace comparators {
|
13519
13567
|
export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
|
13520
13568
|
export let compareModulesByIdentifier: (
|