webpack 5.36.2 → 5.38.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/README.md +5 -8
- package/bin/webpack.js +0 -0
- package/lib/CacheFacade.js +3 -3
- package/lib/Chunk.js +10 -5
- package/lib/Compilation.js +45 -57
- package/lib/Compiler.js +9 -6
- package/lib/ConcatenationScope.js +2 -1
- package/lib/ContextModule.js +3 -3
- package/lib/ContextReplacementPlugin.js +4 -3
- package/lib/DefinePlugin.js +16 -12
- package/lib/EntryPlugin.js +4 -4
- package/lib/EvalSourceMapDevToolPlugin.js +3 -1
- package/lib/ExportsInfo.js +20 -13
- package/lib/FileSystemInfo.js +25 -31
- package/lib/FlagDependencyExportsPlugin.js +8 -7
- package/lib/FlagDependencyUsagePlugin.js +2 -4
- package/lib/HotModuleReplacementPlugin.js +27 -32
- package/lib/JavascriptMetaInfoPlugin.js +2 -1
- package/lib/MainTemplate.js +2 -3
- package/lib/ModuleFilenameHelpers.js +4 -2
- package/lib/ModuleGraphConnection.js +6 -2
- package/lib/ModuleInfoHeaderPlugin.js +2 -3
- package/lib/MultiCompiler.js +31 -27
- package/lib/NormalModule.js +42 -8
- package/lib/NormalModuleFactory.js +2 -0
- package/lib/RecordIdsPlugin.js +5 -4
- package/lib/ResolverFactory.js +10 -7
- package/lib/RuntimeGlobals.js +7 -0
- package/lib/RuntimePlugin.js +19 -1
- package/lib/SourceMapDevToolPlugin.js +14 -15
- package/lib/Template.js +4 -2
- package/lib/Watching.js +91 -47
- package/lib/asset/AssetGenerator.js +46 -29
- package/lib/asset/AssetModulesPlugin.js +1 -1
- package/lib/buildChunkGraph.js +21 -21
- package/lib/cache/PackFileCacheStrategy.js +12 -9
- package/lib/config/defaults.js +31 -10
- package/lib/config/normalization.js +16 -7
- package/lib/config/target.js +7 -2
- package/lib/debug/ProfilingPlugin.js +4 -3
- package/lib/dependencies/AMDRequireDependency.js +3 -3
- package/lib/dependencies/CommonJsExportRequireDependency.js +2 -3
- package/lib/dependencies/CommonJsExportsParserPlugin.js +3 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +2 -4
- package/lib/dependencies/CommonJsPlugin.js +8 -7
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -1
- package/lib/dependencies/ContextDependencyHelpers.js +10 -8
- package/lib/dependencies/CreateScriptUrlDependency.js +54 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +11 -13
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +2 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +4 -11
- package/lib/dependencies/ImportDependency.js +3 -3
- package/lib/dependencies/ImportParserPlugin.js +2 -4
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +2 -3
- package/lib/dependencies/RequireEnsureDependency.js +3 -3
- package/lib/dependencies/WorkerDependency.js +6 -6
- package/lib/dependencies/WorkerPlugin.js +32 -20
- package/lib/hmr/LazyCompilationPlugin.js +6 -4
- package/lib/ids/HashedModuleIdsPlugin.js +3 -3
- package/lib/ids/OccurrenceModuleIdsPlugin.js +2 -3
- package/lib/index.js +5 -3
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +4 -6
- package/lib/javascript/CommonJsChunkFormatPlugin.js +2 -3
- package/lib/javascript/JavascriptGenerator.js +3 -1
- package/lib/javascript/JavascriptModulesPlugin.js +15 -23
- package/lib/javascript/JavascriptParser.js +10 -8
- package/lib/library/AssignLibraryPlugin.js +4 -2
- package/lib/node/NodeEnvironmentPlugin.js +1 -0
- package/lib/node/NodeWatchFileSystem.js +19 -4
- package/lib/optimize/AggressiveSplittingPlugin.js +5 -4
- package/lib/optimize/ConcatenatedModule.js +31 -27
- package/lib/optimize/FlagIncludedChunksPlugin.js +4 -6
- package/lib/optimize/InnerGraph.js +9 -11
- package/lib/optimize/InnerGraphPlugin.js +3 -1
- package/lib/optimize/ModuleConcatenationPlugin.js +7 -10
- package/lib/optimize/RealContentHashPlugin.js +14 -16
- package/lib/optimize/SideEffectsFlagPlugin.js +6 -5
- package/lib/optimize/SplitChunksPlugin.js +13 -15
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +61 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +9 -8
- package/lib/runtime/LoadScriptRuntimeModule.js +12 -5
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +38 -37
- package/lib/schemes/DataUriPlugin.js +21 -2
- package/lib/serialization/BinaryMiddleware.js +5 -3
- package/lib/serialization/FileMiddleware.js +3 -1
- package/lib/serialization/ObjectMiddleware.js +11 -7
- package/lib/stats/DefaultStatsFactoryPlugin.js +7 -7
- package/lib/stats/DefaultStatsPrinterPlugin.js +11 -9
- package/lib/stats/StatsFactory.js +2 -1
- package/lib/stats/StatsPrinter.js +3 -3
- package/lib/util/LazyBucketSortedSet.js +3 -3
- package/lib/util/cleverMerge.js +3 -1
- package/lib/util/comparators.js +13 -13
- package/lib/util/createHash.js +5 -4
- package/lib/util/fs.js +8 -8
- package/lib/util/identifier.js +2 -1
- package/lib/util/internalSerializables.js +2 -0
- package/lib/util/serialization.js +108 -59
- package/lib/validateSchema.js +5 -3
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +4 -4
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +5 -4
- package/lib/wasm-sync/WebAssemblyGenerator.js +89 -83
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -1
- package/lib/wasm-sync/WebAssemblyParser.js +6 -5
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -4
- package/lib/webpack.js +11 -7
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +13 -1
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +14 -4
- package/package.json +10 -7
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +107 -60
- package/types.d.ts +480 -285
- package/lib/util/DataURI.js +0 -32
package/types.d.ts
CHANGED
@@ -79,12 +79,8 @@ import {
|
|
79
79
|
WithStatement,
|
80
80
|
YieldExpression
|
81
81
|
} from "estree";
|
82
|
-
import {
|
83
|
-
import {
|
84
|
-
import {
|
85
|
-
Extend,
|
86
|
-
ValidationErrorConfiguration
|
87
|
-
} from "schema-utils/declarations/validate";
|
82
|
+
import { ValidationError, validate as validateFunction } from "schema-utils";
|
83
|
+
import { ValidationErrorConfiguration } from "schema-utils/declarations/validate";
|
88
84
|
import {
|
89
85
|
AsArray,
|
90
86
|
AsyncParallelHook,
|
@@ -153,6 +149,10 @@ declare class AbstractLibraryPlugin<T> {
|
|
153
149
|
): void;
|
154
150
|
static COMMON_LIBRARY_NAME_MESSAGE: string;
|
155
151
|
}
|
152
|
+
declare interface AdditionalData {
|
153
|
+
[index: string]: any;
|
154
|
+
webpackAST: object;
|
155
|
+
}
|
156
156
|
declare class AggressiveMergingPlugin {
|
157
157
|
constructor(options?: any);
|
158
158
|
options: any;
|
@@ -1650,8 +1650,8 @@ declare class Compilation {
|
|
1650
1650
|
*/
|
1651
1651
|
createChildCompiler(
|
1652
1652
|
name: string,
|
1653
|
-
outputOptions
|
1654
|
-
plugins
|
1653
|
+
outputOptions?: OutputNormalized,
|
1654
|
+
plugins?: (
|
1655
1655
|
| ((this: Compiler, compiler: Compiler) => void)
|
1656
1656
|
| WebpackPluginInstance
|
1657
1657
|
)[]
|
@@ -1830,6 +1830,7 @@ declare class Compiler {
|
|
1830
1830
|
removedFiles: Set<string>;
|
1831
1831
|
fileTimestamps: Map<string, null | FileSystemInfoEntry | "ignore">;
|
1832
1832
|
contextTimestamps: Map<string, null | FileSystemInfoEntry | "ignore">;
|
1833
|
+
fsStartTime: number;
|
1833
1834
|
resolverFactory: ResolverFactory;
|
1834
1835
|
infrastructureLogger: any;
|
1835
1836
|
options: WebpackOptionsNormalized;
|
@@ -1855,8 +1856,8 @@ declare class Compiler {
|
|
1855
1856
|
compilation: Compilation,
|
1856
1857
|
compilerName: string,
|
1857
1858
|
compilerIndex: number,
|
1858
|
-
outputOptions
|
1859
|
-
plugins
|
1859
|
+
outputOptions?: OutputNormalized,
|
1860
|
+
plugins?: WebpackPluginInstance[]
|
1860
1861
|
): Compiler;
|
1861
1862
|
isChild(): boolean;
|
1862
1863
|
createCompilation(): Compilation;
|
@@ -3035,7 +3036,7 @@ declare class EntryPlugin {
|
|
3035
3036
|
* An entry plugin which will handle
|
3036
3037
|
* creation of the EntryDependency
|
3037
3038
|
*/
|
3038
|
-
constructor(context: string, entry: string, options
|
3039
|
+
constructor(context: string, entry: string, options?: string | EntryOptions);
|
3039
3040
|
context: string;
|
3040
3041
|
entry: string;
|
3041
3042
|
options: string | EntryOptions;
|
@@ -3360,17 +3361,7 @@ declare abstract class ExportInfo {
|
|
3360
3361
|
| "maybe provided (runtime-defined)"
|
3361
3362
|
| "provided"
|
3362
3363
|
| "not provided";
|
3363
|
-
getRenameInfo():
|
3364
|
-
| string
|
3365
|
-
| "missing provision and use info prevents renaming"
|
3366
|
-
| "usage prevents renaming (no provision info)"
|
3367
|
-
| "missing provision info prevents renaming"
|
3368
|
-
| "missing usage info prevents renaming"
|
3369
|
-
| "usage prevents renaming"
|
3370
|
-
| "could be renamed"
|
3371
|
-
| "provision prevents renaming (no use info)"
|
3372
|
-
| "usage and provision prevents renaming"
|
3373
|
-
| "provision prevents renaming";
|
3364
|
+
getRenameInfo(): string;
|
3374
3365
|
}
|
3375
3366
|
declare interface ExportSpec {
|
3376
3367
|
/**
|
@@ -4194,7 +4185,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4194
4185
|
/**
|
4195
4186
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4196
4187
|
*/
|
4197
|
-
hashDigest?: "
|
4188
|
+
hashDigest?: "base64" | "latin1" | "hex";
|
4198
4189
|
|
4199
4190
|
/**
|
4200
4191
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4217,6 +4208,13 @@ declare class HotModuleReplacementPlugin {
|
|
4217
4208
|
apply(compiler: Compiler): void;
|
4218
4209
|
static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
|
4219
4210
|
}
|
4211
|
+
|
4212
|
+
/**
|
4213
|
+
* These properties are added by the HotModuleReplacementPlugin
|
4214
|
+
*/
|
4215
|
+
declare interface HotModuleReplacementPluginLoaderContext {
|
4216
|
+
hot?: boolean;
|
4217
|
+
}
|
4220
4218
|
declare class HotUpdateChunk extends Chunk {
|
4221
4219
|
constructor();
|
4222
4220
|
}
|
@@ -4305,6 +4303,17 @@ type IgnorePluginOptions =
|
|
4305
4303
|
*/
|
4306
4304
|
checkResource?: (resource: string, context: string) => boolean;
|
4307
4305
|
};
|
4306
|
+
declare interface ImportModuleOptions {
|
4307
|
+
/**
|
4308
|
+
* the target layer
|
4309
|
+
*/
|
4310
|
+
layer?: string;
|
4311
|
+
|
4312
|
+
/**
|
4313
|
+
* the target public path
|
4314
|
+
*/
|
4315
|
+
publicPath?: string;
|
4316
|
+
}
|
4308
4317
|
type ImportSource =
|
4309
4318
|
| undefined
|
4310
4319
|
| null
|
@@ -4365,30 +4374,30 @@ declare abstract class InitFragment {
|
|
4365
4374
|
declare interface InputFileSystem {
|
4366
4375
|
readFile: (
|
4367
4376
|
arg0: string,
|
4368
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4377
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4369
4378
|
) => void;
|
4370
4379
|
readJson?: (
|
4371
4380
|
arg0: string,
|
4372
|
-
arg1: (arg0?: Error | NodeJS.ErrnoException, arg1?: any) => void
|
4381
|
+
arg1: (arg0?: null | Error | NodeJS.ErrnoException, arg1?: any) => void
|
4373
4382
|
) => void;
|
4374
4383
|
readlink: (
|
4375
4384
|
arg0: string,
|
4376
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4385
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4377
4386
|
) => void;
|
4378
4387
|
readdir: (
|
4379
4388
|
arg0: string,
|
4380
4389
|
arg1: (
|
4381
|
-
arg0?: NodeJS.ErrnoException,
|
4390
|
+
arg0?: null | NodeJS.ErrnoException,
|
4382
4391
|
arg1?: (string | Buffer)[] | IDirent[]
|
4383
4392
|
) => void
|
4384
4393
|
) => void;
|
4385
4394
|
stat: (
|
4386
4395
|
arg0: string,
|
4387
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
|
4396
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
4388
4397
|
) => void;
|
4389
4398
|
realpath?: (
|
4390
4399
|
arg0: string,
|
4391
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4400
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4392
4401
|
) => void;
|
4393
4402
|
purge?: (arg0?: string) => void;
|
4394
4403
|
join?: (arg0: string, arg1: string) => string;
|
@@ -4404,7 +4413,7 @@ declare interface IntermediateFileSystemExtras {
|
|
4404
4413
|
open: (
|
4405
4414
|
arg0: string,
|
4406
4415
|
arg1: string,
|
4407
|
-
arg2: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
|
4416
|
+
arg2: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
|
4408
4417
|
) => void;
|
4409
4418
|
read: (
|
4410
4419
|
arg0: number,
|
@@ -4412,13 +4421,16 @@ declare interface IntermediateFileSystemExtras {
|
|
4412
4421
|
arg2: number,
|
4413
4422
|
arg3: number,
|
4414
4423
|
arg4: number,
|
4415
|
-
arg5: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
|
4424
|
+
arg5: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
|
4425
|
+
) => void;
|
4426
|
+
close: (
|
4427
|
+
arg0: number,
|
4428
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
4416
4429
|
) => void;
|
4417
|
-
close: (arg0: number, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
|
4418
4430
|
rename: (
|
4419
4431
|
arg0: string,
|
4420
4432
|
arg1: string,
|
4421
|
-
arg2: (arg0?: NodeJS.ErrnoException) => void
|
4433
|
+
arg2: (arg0?: null | NodeJS.ErrnoException) => void
|
4422
4434
|
) => void;
|
4423
4435
|
}
|
4424
4436
|
type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
|
@@ -4990,9 +5002,7 @@ declare class JavascriptParser extends Parser {
|
|
4990
5002
|
parseCommentOptions(
|
4991
5003
|
range?: any
|
4992
5004
|
): { options: null; errors: null } | { options: object; errors: any[] };
|
4993
|
-
extractMemberExpressionChain(
|
4994
|
-
expression: MemberExpression
|
4995
|
-
): {
|
5005
|
+
extractMemberExpressionChain(expression: MemberExpression): {
|
4996
5006
|
members: string[];
|
4997
5007
|
object:
|
4998
5008
|
| UnaryExpression
|
@@ -5024,16 +5034,15 @@ declare class JavascriptParser extends Parser {
|
|
5024
5034
|
| ChainExpression
|
5025
5035
|
| Super;
|
5026
5036
|
};
|
5027
|
-
getFreeInfoFromVariable(
|
5028
|
-
|
5029
|
-
|
5037
|
+
getFreeInfoFromVariable(varName: string): {
|
5038
|
+
name: string;
|
5039
|
+
info: string | VariableInfo;
|
5040
|
+
};
|
5030
5041
|
getMemberExpressionInfo(
|
5031
5042
|
expression: MemberExpression,
|
5032
5043
|
allowedTypes: number
|
5033
5044
|
): undefined | CallExpressionInfo | ExpressionExpressionInfo;
|
5034
|
-
getNameForExpression(
|
5035
|
-
expression: MemberExpression
|
5036
|
-
): {
|
5045
|
+
getNameForExpression(expression: MemberExpression): {
|
5037
5046
|
name: string;
|
5038
5047
|
rootInfo: ExportedVariableInfo;
|
5039
5048
|
getMembers: () => string[];
|
@@ -5748,7 +5757,7 @@ declare interface LoadScriptCompilationHooks {
|
|
5748
5757
|
createScript: SyncWaterfallHook<[string, Chunk]>;
|
5749
5758
|
}
|
5750
5759
|
declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
5751
|
-
constructor();
|
5760
|
+
constructor(withCreateScriptUrl?: boolean);
|
5752
5761
|
static getCompilationHooks(
|
5753
5762
|
compilation: Compilation
|
5754
5763
|
): LoadScriptCompilationHooks;
|
@@ -5780,12 +5789,43 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
5780
5789
|
declare interface Loader {
|
5781
5790
|
[index: string]: any;
|
5782
5791
|
}
|
5792
|
+
type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> &
|
5793
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
5794
|
+
LoaderPluginLoaderContext &
|
5795
|
+
HotModuleReplacementPluginLoaderContext;
|
5796
|
+
type LoaderDefinition<OptionsType = {}, ContextAdditions = {}> =
|
5797
|
+
LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
5798
|
+
raw?: false;
|
5799
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5800
|
+
};
|
5801
|
+
declare interface LoaderDefinitionFunction<
|
5802
|
+
OptionsType = {},
|
5803
|
+
ContextAdditions = {}
|
5804
|
+
> {
|
5805
|
+
(
|
5806
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
5807
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
5808
|
+
LoaderPluginLoaderContext &
|
5809
|
+
HotModuleReplacementPluginLoaderContext &
|
5810
|
+
ContextAdditions,
|
5811
|
+
content: string,
|
5812
|
+
sourceMap?: string | SourceMap,
|
5813
|
+
additionalData?: AdditionalData
|
5814
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
5815
|
+
}
|
5783
5816
|
declare interface LoaderItem {
|
5784
5817
|
loader: string;
|
5785
5818
|
options: any;
|
5786
5819
|
ident: null | string;
|
5787
5820
|
type: null | string;
|
5788
5821
|
}
|
5822
|
+
declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
5823
|
+
default?:
|
5824
|
+
| RawLoaderDefinitionFunction<OptionsType, ContextAdditions>
|
5825
|
+
| LoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5826
|
+
raw?: false;
|
5827
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5828
|
+
}
|
5789
5829
|
declare class LoaderOptionsPlugin {
|
5790
5830
|
constructor(options?: LoaderOptionsPluginOptions);
|
5791
5831
|
options: LoaderOptionsPluginOptions;
|
@@ -5819,6 +5859,165 @@ declare interface LoaderOptionsPluginOptions {
|
|
5819
5859
|
context?: string;
|
5820
5860
|
};
|
5821
5861
|
}
|
5862
|
+
|
5863
|
+
/**
|
5864
|
+
* These properties are added by the LoaderPlugin
|
5865
|
+
*/
|
5866
|
+
declare interface LoaderPluginLoaderContext {
|
5867
|
+
/**
|
5868
|
+
* Resolves the given request to a module, applies all configured loaders and calls
|
5869
|
+
* back with the generated source, the sourceMap and the module instance (usually an
|
5870
|
+
* instance of NormalModule). Use this function if you need to know the source code
|
5871
|
+
* of another module to generate the result.
|
5872
|
+
*/
|
5873
|
+
loadModule(
|
5874
|
+
request: string,
|
5875
|
+
callback: (
|
5876
|
+
err: null | Error,
|
5877
|
+
source: string,
|
5878
|
+
sourceMap: any,
|
5879
|
+
module: NormalModule
|
5880
|
+
) => void
|
5881
|
+
): void;
|
5882
|
+
importModule(
|
5883
|
+
request: string,
|
5884
|
+
options: ImportModuleOptions,
|
5885
|
+
callback: (err?: Error, exports?: any) => any
|
5886
|
+
): void;
|
5887
|
+
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
5888
|
+
}
|
5889
|
+
|
5890
|
+
/**
|
5891
|
+
* The properties are added by https://github.com/webpack/loader-runner
|
5892
|
+
*/
|
5893
|
+
declare interface LoaderRunnerLoaderContext<OptionsType> {
|
5894
|
+
/**
|
5895
|
+
* Add a directory as dependency of the loader result.
|
5896
|
+
*/
|
5897
|
+
addContextDependency(context: string): void;
|
5898
|
+
|
5899
|
+
/**
|
5900
|
+
* Adds a file as dependency of the loader result in order to make them watchable.
|
5901
|
+
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
5902
|
+
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
5903
|
+
*/
|
5904
|
+
addDependency(file: string): void;
|
5905
|
+
addMissingDependency(context: string): void;
|
5906
|
+
|
5907
|
+
/**
|
5908
|
+
* Make this loader async.
|
5909
|
+
*/
|
5910
|
+
async(): (
|
5911
|
+
err?: null | Error,
|
5912
|
+
content?: string | Buffer,
|
5913
|
+
sourceMap?: string | SourceMap,
|
5914
|
+
additionalData?: AdditionalData
|
5915
|
+
) => void;
|
5916
|
+
|
5917
|
+
/**
|
5918
|
+
* Make this loader result cacheable. By default it's cacheable.
|
5919
|
+
* A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed.
|
5920
|
+
* This means the loader shouldn't have other dependencies than specified with this.addDependency.
|
5921
|
+
* Most loaders are deterministic and cacheable.
|
5922
|
+
*/
|
5923
|
+
cacheable(flag?: boolean): void;
|
5924
|
+
callback: (
|
5925
|
+
err?: null | Error,
|
5926
|
+
content?: string | Buffer,
|
5927
|
+
sourceMap?: string | SourceMap,
|
5928
|
+
additionalData?: AdditionalData
|
5929
|
+
) => void;
|
5930
|
+
|
5931
|
+
/**
|
5932
|
+
* Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
|
5933
|
+
*/
|
5934
|
+
clearDependencies(): void;
|
5935
|
+
|
5936
|
+
/**
|
5937
|
+
* The directory of the module. Can be used as context for resolving other stuff.
|
5938
|
+
* eg '/workspaces/ts-loader/examples/vanilla/src'
|
5939
|
+
*/
|
5940
|
+
context: string;
|
5941
|
+
readonly currentRequest: string;
|
5942
|
+
readonly data: any;
|
5943
|
+
|
5944
|
+
/**
|
5945
|
+
* alias of addDependency
|
5946
|
+
* Adds a file as dependency of the loader result in order to make them watchable.
|
5947
|
+
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
5948
|
+
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
5949
|
+
*/
|
5950
|
+
dependency(file: string): void;
|
5951
|
+
getContextDependencies(): string[];
|
5952
|
+
getDependencies(): string[];
|
5953
|
+
getMissingDependencies(): string[];
|
5954
|
+
|
5955
|
+
/**
|
5956
|
+
* The index in the loaders array of the current loader.
|
5957
|
+
* In the example: in loader1: 0, in loader2: 1
|
5958
|
+
*/
|
5959
|
+
loaderIndex: number;
|
5960
|
+
readonly previousRequest: string;
|
5961
|
+
readonly query: string | OptionsType;
|
5962
|
+
readonly remainingRequest: string;
|
5963
|
+
readonly request: string;
|
5964
|
+
|
5965
|
+
/**
|
5966
|
+
* An array of all the loaders. It is writeable in the pitch phase.
|
5967
|
+
* loaders = [{request: string, path: string, query: string, module: function}]
|
5968
|
+
* In the example:
|
5969
|
+
* [
|
5970
|
+
* { request: "/abc/loader1.js?xyz",
|
5971
|
+
* path: "/abc/loader1.js",
|
5972
|
+
* query: "?xyz",
|
5973
|
+
* module: [Function]
|
5974
|
+
* },
|
5975
|
+
* { request: "/abc/node_modules/loader2/index.js",
|
5976
|
+
* path: "/abc/node_modules/loader2/index.js",
|
5977
|
+
* query: "",
|
5978
|
+
* module: [Function]
|
5979
|
+
* }
|
5980
|
+
* ]
|
5981
|
+
*/
|
5982
|
+
loaders: {
|
5983
|
+
request: string;
|
5984
|
+
path: string;
|
5985
|
+
query: string;
|
5986
|
+
fragment: string;
|
5987
|
+
options?: string | object;
|
5988
|
+
ident: string;
|
5989
|
+
normal?: Function;
|
5990
|
+
pitch?: Function;
|
5991
|
+
raw?: boolean;
|
5992
|
+
data?: object;
|
5993
|
+
pitchExecuted: boolean;
|
5994
|
+
normalExecuted: boolean;
|
5995
|
+
}[];
|
5996
|
+
|
5997
|
+
/**
|
5998
|
+
* The resource path.
|
5999
|
+
* In the example: "/abc/resource.js"
|
6000
|
+
*/
|
6001
|
+
resourcePath: string;
|
6002
|
+
|
6003
|
+
/**
|
6004
|
+
* The resource query string.
|
6005
|
+
* Example: "?query"
|
6006
|
+
*/
|
6007
|
+
resourceQuery: string;
|
6008
|
+
|
6009
|
+
/**
|
6010
|
+
* The resource fragment.
|
6011
|
+
* Example: "#frag"
|
6012
|
+
*/
|
6013
|
+
resourceFragment: string;
|
6014
|
+
|
6015
|
+
/**
|
6016
|
+
* The resource inclusive query and fragment.
|
6017
|
+
* Example: "/abc/resource.js?query#frag"
|
6018
|
+
*/
|
6019
|
+
resource: string;
|
6020
|
+
}
|
5822
6021
|
declare class LoaderTargetPlugin {
|
5823
6022
|
constructor(target: string);
|
5824
6023
|
target: string;
|
@@ -6835,6 +7034,10 @@ declare class NormalModule extends Module {
|
|
6835
7034
|
* path + query of the real resource
|
6836
7035
|
*/
|
6837
7036
|
resource: string;
|
7037
|
+
/**
|
7038
|
+
* resource resolve data
|
7039
|
+
*/
|
7040
|
+
resourceResolveData?: Record<string, any>;
|
6838
7041
|
/**
|
6839
7042
|
* path + query of the matched resource (virtual)
|
6840
7043
|
*/
|
@@ -6869,6 +7072,7 @@ declare class NormalModule extends Module {
|
|
6869
7072
|
generator: Generator;
|
6870
7073
|
generatorOptions: object;
|
6871
7074
|
resource: string;
|
7075
|
+
resourceResolveData?: Record<string, any>;
|
6872
7076
|
matchResource?: string;
|
6873
7077
|
loaders: LoaderItem[];
|
6874
7078
|
error?: WebpackError;
|
@@ -6888,7 +7092,7 @@ declare class NormalModule extends Module {
|
|
6888
7092
|
options: WebpackOptionsNormalized,
|
6889
7093
|
compilation: Compilation,
|
6890
7094
|
fs: InputFileSystem
|
6891
|
-
): any
|
7095
|
+
): NormalModuleLoaderContext<any>;
|
6892
7096
|
getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
|
6893
7097
|
createSource(
|
6894
7098
|
context: string,
|
@@ -6964,6 +7168,58 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
6964
7168
|
createGenerator(type?: any, generatorOptions?: object): any;
|
6965
7169
|
getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
|
6966
7170
|
}
|
7171
|
+
|
7172
|
+
/**
|
7173
|
+
* These properties are added by the NormalModule
|
7174
|
+
*/
|
7175
|
+
declare interface NormalModuleLoaderContext<OptionsType> {
|
7176
|
+
version: number;
|
7177
|
+
getOptions(): OptionsType;
|
7178
|
+
getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
|
7179
|
+
emitWarning(warning: Error): void;
|
7180
|
+
emitError(error: Error): void;
|
7181
|
+
getLogger(name?: string): WebpackLogger;
|
7182
|
+
resolve(
|
7183
|
+
context: string,
|
7184
|
+
request: string,
|
7185
|
+
callback: (
|
7186
|
+
arg0: null | Error,
|
7187
|
+
arg1?: string | false,
|
7188
|
+
arg2?: ResolveRequest
|
7189
|
+
) => void
|
7190
|
+
): any;
|
7191
|
+
getResolve(options?: ResolveOptionsWithDependencyType): {
|
7192
|
+
(
|
7193
|
+
context: string,
|
7194
|
+
request: string,
|
7195
|
+
callback: (
|
7196
|
+
arg0: null | Error,
|
7197
|
+
arg1?: string | false,
|
7198
|
+
arg2?: ResolveRequest
|
7199
|
+
) => void
|
7200
|
+
): void;
|
7201
|
+
(context: string, request: string): Promise<string>;
|
7202
|
+
};
|
7203
|
+
emitFile(
|
7204
|
+
name: string,
|
7205
|
+
content: string,
|
7206
|
+
sourceMap?: string,
|
7207
|
+
assetInfo?: AssetInfo
|
7208
|
+
): void;
|
7209
|
+
addBuildDependency(dep: string): void;
|
7210
|
+
utils: {
|
7211
|
+
absolutify: (context: string, request: string) => string;
|
7212
|
+
contextify: (context: string, request: string) => string;
|
7213
|
+
};
|
7214
|
+
rootContext: string;
|
7215
|
+
fs: InputFileSystem;
|
7216
|
+
sourceMap?: boolean;
|
7217
|
+
mode: "development" | "production" | "none";
|
7218
|
+
webpack?: boolean;
|
7219
|
+
_module?: NormalModule;
|
7220
|
+
_compilation?: Compilation;
|
7221
|
+
_compiler?: Compiler;
|
7222
|
+
}
|
6967
7223
|
declare class NormalModuleReplacementPlugin {
|
6968
7224
|
/**
|
6969
7225
|
* Create an instance of the plugin
|
@@ -7675,6 +7931,11 @@ declare interface Output {
|
|
7675
7931
|
*/
|
7676
7932
|
strictModuleExceptionHandling?: boolean;
|
7677
7933
|
|
7934
|
+
/**
|
7935
|
+
* Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.
|
7936
|
+
*/
|
7937
|
+
trustedTypes?: string | true | TrustedTypes;
|
7938
|
+
|
7678
7939
|
/**
|
7679
7940
|
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
7680
7941
|
*/
|
@@ -7709,25 +7970,34 @@ declare interface OutputFileSystem {
|
|
7709
7970
|
writeFile: (
|
7710
7971
|
arg0: string,
|
7711
7972
|
arg1: string | Buffer,
|
7712
|
-
arg2: (arg0?: NodeJS.ErrnoException) => void
|
7973
|
+
arg2: (arg0?: null | NodeJS.ErrnoException) => void
|
7974
|
+
) => void;
|
7975
|
+
mkdir: (
|
7976
|
+
arg0: string,
|
7977
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7713
7978
|
) => void;
|
7714
|
-
mkdir: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
|
7715
7979
|
readdir?: (
|
7716
7980
|
arg0: string,
|
7717
7981
|
arg1: (
|
7718
|
-
arg0?: NodeJS.ErrnoException,
|
7982
|
+
arg0?: null | NodeJS.ErrnoException,
|
7719
7983
|
arg1?: (string | Buffer)[] | IDirent[]
|
7720
7984
|
) => void
|
7721
7985
|
) => void;
|
7722
|
-
rmdir?: (
|
7723
|
-
|
7986
|
+
rmdir?: (
|
7987
|
+
arg0: string,
|
7988
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7989
|
+
) => void;
|
7990
|
+
unlink?: (
|
7991
|
+
arg0: string,
|
7992
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7993
|
+
) => void;
|
7724
7994
|
stat: (
|
7725
7995
|
arg0: string,
|
7726
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
|
7996
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7727
7997
|
) => void;
|
7728
7998
|
readFile: (
|
7729
7999
|
arg0: string,
|
7730
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
8000
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
7731
8001
|
) => void;
|
7732
8002
|
join?: (arg0: string, arg1: string) => string;
|
7733
8003
|
relative?: (arg0: string, arg1: string) => string;
|
@@ -7937,6 +8207,11 @@ declare interface OutputNormalized {
|
|
7937
8207
|
*/
|
7938
8208
|
strictModuleExceptionHandling?: boolean;
|
7939
8209
|
|
8210
|
+
/**
|
8211
|
+
* Use a Trusted Types policy to create urls for chunks.
|
8212
|
+
*/
|
8213
|
+
trustedTypes?: TrustedTypes;
|
8214
|
+
|
7940
8215
|
/**
|
7941
8216
|
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
|
7942
8217
|
*/
|
@@ -8083,6 +8358,21 @@ declare interface PerformanceOptions {
|
|
8083
8358
|
*/
|
8084
8359
|
maxEntrypointSize?: number;
|
8085
8360
|
}
|
8361
|
+
declare interface PitchLoaderDefinitionFunction<
|
8362
|
+
OptionsType = {},
|
8363
|
+
ContextAdditions = {}
|
8364
|
+
> {
|
8365
|
+
(
|
8366
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
8367
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
8368
|
+
LoaderPluginLoaderContext &
|
8369
|
+
HotModuleReplacementPluginLoaderContext &
|
8370
|
+
ContextAdditions,
|
8371
|
+
remainingRequest: string,
|
8372
|
+
previousRequest: string,
|
8373
|
+
data: object
|
8374
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
8375
|
+
}
|
8086
8376
|
type Plugin =
|
8087
8377
|
| { apply: (arg0: Resolver) => void }
|
8088
8378
|
| ((this: Resolver, arg1: Resolver) => void);
|
@@ -8370,6 +8660,26 @@ declare interface RawChunkGroupOptions {
|
|
8370
8660
|
preloadOrder?: number;
|
8371
8661
|
prefetchOrder?: number;
|
8372
8662
|
}
|
8663
|
+
type RawLoaderDefinition<OptionsType = {}, ContextAdditions = {}> =
|
8664
|
+
RawLoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
8665
|
+
raw: true;
|
8666
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
8667
|
+
};
|
8668
|
+
declare interface RawLoaderDefinitionFunction<
|
8669
|
+
OptionsType = {},
|
8670
|
+
ContextAdditions = {}
|
8671
|
+
> {
|
8672
|
+
(
|
8673
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
8674
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
8675
|
+
LoaderPluginLoaderContext &
|
8676
|
+
HotModuleReplacementPluginLoaderContext &
|
8677
|
+
ContextAdditions,
|
8678
|
+
content: Buffer,
|
8679
|
+
sourceMap?: string | SourceMap,
|
8680
|
+
additionalData?: AdditionalData
|
8681
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
8682
|
+
}
|
8373
8683
|
declare class RawSource extends Source {
|
8374
8684
|
constructor(source: string | Buffer, convertToString?: boolean);
|
8375
8685
|
isBuffer(): boolean;
|
@@ -8985,61 +9295,72 @@ declare interface RuleSet {
|
|
8985
9295
|
type RuleSetCondition =
|
8986
9296
|
| string
|
8987
9297
|
| RegExp
|
8988
|
-
| {
|
8989
|
-
/**
|
8990
|
-
* Logical AND.
|
8991
|
-
*/
|
8992
|
-
and?: RuleSetCondition[];
|
8993
|
-
/**
|
8994
|
-
* Logical NOT.
|
8995
|
-
*/
|
8996
|
-
not?: RuleSetCondition[];
|
8997
|
-
/**
|
8998
|
-
* Logical OR.
|
8999
|
-
*/
|
9000
|
-
or?: RuleSetCondition[];
|
9001
|
-
}
|
9002
9298
|
| ((value: string) => boolean)
|
9299
|
+
| RuleSetLogicalConditions
|
9003
9300
|
| RuleSetCondition[];
|
9004
9301
|
type RuleSetConditionAbsolute =
|
9005
9302
|
| string
|
9006
9303
|
| RegExp
|
9007
|
-
| {
|
9008
|
-
/**
|
9009
|
-
* Logical AND.
|
9010
|
-
*/
|
9011
|
-
and?: RuleSetConditionAbsolute[];
|
9012
|
-
/**
|
9013
|
-
* Logical NOT.
|
9014
|
-
*/
|
9015
|
-
not?: RuleSetConditionAbsolute[];
|
9016
|
-
/**
|
9017
|
-
* Logical OR.
|
9018
|
-
*/
|
9019
|
-
or?: RuleSetConditionAbsolute[];
|
9020
|
-
}
|
9021
9304
|
| ((value: string) => boolean)
|
9305
|
+
| RuleSetLogicalConditionsAbsolute
|
9022
9306
|
| RuleSetConditionAbsolute[];
|
9023
9307
|
type RuleSetConditionOrConditions =
|
9024
9308
|
| string
|
9025
9309
|
| RegExp
|
9026
|
-
| {
|
9027
|
-
/**
|
9028
|
-
* Logical AND.
|
9029
|
-
*/
|
9030
|
-
and?: RuleSetCondition[];
|
9031
|
-
/**
|
9032
|
-
* Logical NOT.
|
9033
|
-
*/
|
9034
|
-
not?: RuleSetCondition[];
|
9035
|
-
/**
|
9036
|
-
* Logical OR.
|
9037
|
-
*/
|
9038
|
-
or?: RuleSetCondition[];
|
9039
|
-
}
|
9040
9310
|
| ((value: string) => boolean)
|
9311
|
+
| RuleSetLogicalConditions
|
9041
9312
|
| RuleSetCondition[];
|
9042
9313
|
|
9314
|
+
/**
|
9315
|
+
* Logic operators used in a condition matcher.
|
9316
|
+
*/
|
9317
|
+
declare interface RuleSetLogicalConditions {
|
9318
|
+
/**
|
9319
|
+
* Logical AND.
|
9320
|
+
*/
|
9321
|
+
and?: RuleSetCondition[];
|
9322
|
+
|
9323
|
+
/**
|
9324
|
+
* Logical NOT.
|
9325
|
+
*/
|
9326
|
+
not?:
|
9327
|
+
| string
|
9328
|
+
| RegExp
|
9329
|
+
| ((value: string) => boolean)
|
9330
|
+
| RuleSetLogicalConditions
|
9331
|
+
| RuleSetCondition[];
|
9332
|
+
|
9333
|
+
/**
|
9334
|
+
* Logical OR.
|
9335
|
+
*/
|
9336
|
+
or?: RuleSetCondition[];
|
9337
|
+
}
|
9338
|
+
|
9339
|
+
/**
|
9340
|
+
* Logic operators used in a condition matcher.
|
9341
|
+
*/
|
9342
|
+
declare interface RuleSetLogicalConditionsAbsolute {
|
9343
|
+
/**
|
9344
|
+
* Logical AND.
|
9345
|
+
*/
|
9346
|
+
and?: RuleSetConditionAbsolute[];
|
9347
|
+
|
9348
|
+
/**
|
9349
|
+
* Logical NOT.
|
9350
|
+
*/
|
9351
|
+
not?:
|
9352
|
+
| string
|
9353
|
+
| RegExp
|
9354
|
+
| ((value: string) => boolean)
|
9355
|
+
| RuleSetLogicalConditionsAbsolute
|
9356
|
+
| RuleSetConditionAbsolute[];
|
9357
|
+
|
9358
|
+
/**
|
9359
|
+
* Logical OR.
|
9360
|
+
*/
|
9361
|
+
or?: RuleSetConditionAbsolute[];
|
9362
|
+
}
|
9363
|
+
|
9043
9364
|
/**
|
9044
9365
|
* A rule description with conditions and effects for modules.
|
9045
9366
|
*/
|
@@ -9050,21 +9371,8 @@ declare interface RuleSetRule {
|
|
9050
9371
|
compiler?:
|
9051
9372
|
| string
|
9052
9373
|
| RegExp
|
9053
|
-
| {
|
9054
|
-
/**
|
9055
|
-
* Logical AND.
|
9056
|
-
*/
|
9057
|
-
and?: RuleSetCondition[];
|
9058
|
-
/**
|
9059
|
-
* Logical NOT.
|
9060
|
-
*/
|
9061
|
-
not?: RuleSetCondition[];
|
9062
|
-
/**
|
9063
|
-
* Logical OR.
|
9064
|
-
*/
|
9065
|
-
or?: RuleSetCondition[];
|
9066
|
-
}
|
9067
9374
|
| ((value: string) => boolean)
|
9375
|
+
| RuleSetLogicalConditions
|
9068
9376
|
| RuleSetCondition[];
|
9069
9377
|
|
9070
9378
|
/**
|
@@ -9073,21 +9381,8 @@ declare interface RuleSetRule {
|
|
9073
9381
|
dependency?:
|
9074
9382
|
| string
|
9075
9383
|
| RegExp
|
9076
|
-
| {
|
9077
|
-
/**
|
9078
|
-
* Logical AND.
|
9079
|
-
*/
|
9080
|
-
and?: RuleSetCondition[];
|
9081
|
-
/**
|
9082
|
-
* Logical NOT.
|
9083
|
-
*/
|
9084
|
-
not?: RuleSetCondition[];
|
9085
|
-
/**
|
9086
|
-
* Logical OR.
|
9087
|
-
*/
|
9088
|
-
or?: RuleSetCondition[];
|
9089
|
-
}
|
9090
9384
|
| ((value: string) => boolean)
|
9385
|
+
| RuleSetLogicalConditions
|
9091
9386
|
| RuleSetCondition[];
|
9092
9387
|
|
9093
9388
|
/**
|
@@ -9106,21 +9401,8 @@ declare interface RuleSetRule {
|
|
9106
9401
|
exclude?:
|
9107
9402
|
| string
|
9108
9403
|
| RegExp
|
9109
|
-
| {
|
9110
|
-
/**
|
9111
|
-
* Logical AND.
|
9112
|
-
*/
|
9113
|
-
and?: RuleSetConditionAbsolute[];
|
9114
|
-
/**
|
9115
|
-
* Logical NOT.
|
9116
|
-
*/
|
9117
|
-
not?: RuleSetConditionAbsolute[];
|
9118
|
-
/**
|
9119
|
-
* Logical OR.
|
9120
|
-
*/
|
9121
|
-
or?: RuleSetConditionAbsolute[];
|
9122
|
-
}
|
9123
9404
|
| ((value: string) => boolean)
|
9405
|
+
| RuleSetLogicalConditionsAbsolute
|
9124
9406
|
| RuleSetConditionAbsolute[];
|
9125
9407
|
|
9126
9408
|
/**
|
@@ -9134,21 +9416,8 @@ declare interface RuleSetRule {
|
|
9134
9416
|
include?:
|
9135
9417
|
| string
|
9136
9418
|
| RegExp
|
9137
|
-
| {
|
9138
|
-
/**
|
9139
|
-
* Logical AND.
|
9140
|
-
*/
|
9141
|
-
and?: RuleSetConditionAbsolute[];
|
9142
|
-
/**
|
9143
|
-
* Logical NOT.
|
9144
|
-
*/
|
9145
|
-
not?: RuleSetConditionAbsolute[];
|
9146
|
-
/**
|
9147
|
-
* Logical OR.
|
9148
|
-
*/
|
9149
|
-
or?: RuleSetConditionAbsolute[];
|
9150
|
-
}
|
9151
9419
|
| ((value: string) => boolean)
|
9420
|
+
| RuleSetLogicalConditionsAbsolute
|
9152
9421
|
| RuleSetConditionAbsolute[];
|
9153
9422
|
|
9154
9423
|
/**
|
@@ -9157,21 +9426,8 @@ declare interface RuleSetRule {
|
|
9157
9426
|
issuer?:
|
9158
9427
|
| string
|
9159
9428
|
| RegExp
|
9160
|
-
| {
|
9161
|
-
/**
|
9162
|
-
* Logical AND.
|
9163
|
-
*/
|
9164
|
-
and?: RuleSetConditionAbsolute[];
|
9165
|
-
/**
|
9166
|
-
* Logical NOT.
|
9167
|
-
*/
|
9168
|
-
not?: RuleSetConditionAbsolute[];
|
9169
|
-
/**
|
9170
|
-
* Logical OR.
|
9171
|
-
*/
|
9172
|
-
or?: RuleSetConditionAbsolute[];
|
9173
|
-
}
|
9174
9429
|
| ((value: string) => boolean)
|
9430
|
+
| RuleSetLogicalConditionsAbsolute
|
9175
9431
|
| RuleSetConditionAbsolute[];
|
9176
9432
|
|
9177
9433
|
/**
|
@@ -9180,21 +9436,8 @@ declare interface RuleSetRule {
|
|
9180
9436
|
issuerLayer?:
|
9181
9437
|
| string
|
9182
9438
|
| RegExp
|
9183
|
-
| {
|
9184
|
-
/**
|
9185
|
-
* Logical AND.
|
9186
|
-
*/
|
9187
|
-
and?: RuleSetCondition[];
|
9188
|
-
/**
|
9189
|
-
* Logical NOT.
|
9190
|
-
*/
|
9191
|
-
not?: RuleSetCondition[];
|
9192
|
-
/**
|
9193
|
-
* Logical OR.
|
9194
|
-
*/
|
9195
|
-
or?: RuleSetCondition[];
|
9196
|
-
}
|
9197
9439
|
| ((value: string) => boolean)
|
9440
|
+
| RuleSetLogicalConditions
|
9198
9441
|
| RuleSetCondition[];
|
9199
9442
|
|
9200
9443
|
/**
|
@@ -9213,21 +9456,8 @@ declare interface RuleSetRule {
|
|
9213
9456
|
mimetype?:
|
9214
9457
|
| string
|
9215
9458
|
| RegExp
|
9216
|
-
| {
|
9217
|
-
/**
|
9218
|
-
* Logical AND.
|
9219
|
-
*/
|
9220
|
-
and?: RuleSetCondition[];
|
9221
|
-
/**
|
9222
|
-
* Logical NOT.
|
9223
|
-
*/
|
9224
|
-
not?: RuleSetCondition[];
|
9225
|
-
/**
|
9226
|
-
* Logical OR.
|
9227
|
-
*/
|
9228
|
-
or?: RuleSetCondition[];
|
9229
|
-
}
|
9230
9459
|
| ((value: string) => boolean)
|
9460
|
+
| RuleSetLogicalConditions
|
9231
9461
|
| RuleSetCondition[];
|
9232
9462
|
|
9233
9463
|
/**
|
@@ -9251,21 +9481,8 @@ declare interface RuleSetRule {
|
|
9251
9481
|
realResource?:
|
9252
9482
|
| string
|
9253
9483
|
| RegExp
|
9254
|
-
| {
|
9255
|
-
/**
|
9256
|
-
* Logical AND.
|
9257
|
-
*/
|
9258
|
-
and?: RuleSetConditionAbsolute[];
|
9259
|
-
/**
|
9260
|
-
* Logical NOT.
|
9261
|
-
*/
|
9262
|
-
not?: RuleSetConditionAbsolute[];
|
9263
|
-
/**
|
9264
|
-
* Logical OR.
|
9265
|
-
*/
|
9266
|
-
or?: RuleSetConditionAbsolute[];
|
9267
|
-
}
|
9268
9484
|
| ((value: string) => boolean)
|
9485
|
+
| RuleSetLogicalConditionsAbsolute
|
9269
9486
|
| RuleSetConditionAbsolute[];
|
9270
9487
|
|
9271
9488
|
/**
|
@@ -9279,21 +9496,8 @@ declare interface RuleSetRule {
|
|
9279
9496
|
resource?:
|
9280
9497
|
| string
|
9281
9498
|
| RegExp
|
9282
|
-
| {
|
9283
|
-
/**
|
9284
|
-
* Logical AND.
|
9285
|
-
*/
|
9286
|
-
and?: RuleSetConditionAbsolute[];
|
9287
|
-
/**
|
9288
|
-
* Logical NOT.
|
9289
|
-
*/
|
9290
|
-
not?: RuleSetConditionAbsolute[];
|
9291
|
-
/**
|
9292
|
-
* Logical OR.
|
9293
|
-
*/
|
9294
|
-
or?: RuleSetConditionAbsolute[];
|
9295
|
-
}
|
9296
9499
|
| ((value: string) => boolean)
|
9500
|
+
| RuleSetLogicalConditionsAbsolute
|
9297
9501
|
| RuleSetConditionAbsolute[];
|
9298
9502
|
|
9299
9503
|
/**
|
@@ -9302,21 +9506,8 @@ declare interface RuleSetRule {
|
|
9302
9506
|
resourceFragment?:
|
9303
9507
|
| string
|
9304
9508
|
| RegExp
|
9305
|
-
| {
|
9306
|
-
/**
|
9307
|
-
* Logical AND.
|
9308
|
-
*/
|
9309
|
-
and?: RuleSetCondition[];
|
9310
|
-
/**
|
9311
|
-
* Logical NOT.
|
9312
|
-
*/
|
9313
|
-
not?: RuleSetCondition[];
|
9314
|
-
/**
|
9315
|
-
* Logical OR.
|
9316
|
-
*/
|
9317
|
-
or?: RuleSetCondition[];
|
9318
|
-
}
|
9319
9509
|
| ((value: string) => boolean)
|
9510
|
+
| RuleSetLogicalConditions
|
9320
9511
|
| RuleSetCondition[];
|
9321
9512
|
|
9322
9513
|
/**
|
@@ -9325,21 +9516,8 @@ declare interface RuleSetRule {
|
|
9325
9516
|
resourceQuery?:
|
9326
9517
|
| string
|
9327
9518
|
| RegExp
|
9328
|
-
| {
|
9329
|
-
/**
|
9330
|
-
* Logical AND.
|
9331
|
-
*/
|
9332
|
-
and?: RuleSetCondition[];
|
9333
|
-
/**
|
9334
|
-
* Logical NOT.
|
9335
|
-
*/
|
9336
|
-
not?: RuleSetCondition[];
|
9337
|
-
/**
|
9338
|
-
* Logical OR.
|
9339
|
-
*/
|
9340
|
-
or?: RuleSetCondition[];
|
9341
|
-
}
|
9342
9519
|
| ((value: string) => boolean)
|
9520
|
+
| RuleSetLogicalConditions
|
9343
9521
|
| RuleSetCondition[];
|
9344
9522
|
|
9345
9523
|
/**
|
@@ -9347,6 +9525,16 @@ declare interface RuleSetRule {
|
|
9347
9525
|
*/
|
9348
9526
|
rules?: RuleSetRule[];
|
9349
9527
|
|
9528
|
+
/**
|
9529
|
+
* Match module scheme.
|
9530
|
+
*/
|
9531
|
+
scheme?:
|
9532
|
+
| string
|
9533
|
+
| RegExp
|
9534
|
+
| ((value: string) => boolean)
|
9535
|
+
| RuleSetLogicalConditions
|
9536
|
+
| RuleSetCondition[];
|
9537
|
+
|
9350
9538
|
/**
|
9351
9539
|
* Flags a module as with or without side effects.
|
9352
9540
|
*/
|
@@ -9358,21 +9546,8 @@ declare interface RuleSetRule {
|
|
9358
9546
|
test?:
|
9359
9547
|
| string
|
9360
9548
|
| RegExp
|
9361
|
-
| {
|
9362
|
-
/**
|
9363
|
-
* Logical AND.
|
9364
|
-
*/
|
9365
|
-
and?: RuleSetConditionAbsolute[];
|
9366
|
-
/**
|
9367
|
-
* Logical NOT.
|
9368
|
-
*/
|
9369
|
-
not?: RuleSetConditionAbsolute[];
|
9370
|
-
/**
|
9371
|
-
* Logical OR.
|
9372
|
-
*/
|
9373
|
-
or?: RuleSetConditionAbsolute[];
|
9374
|
-
}
|
9375
9549
|
| ((value: string) => boolean)
|
9550
|
+
| RuleSetLogicalConditionsAbsolute
|
9376
9551
|
| RuleSetConditionAbsolute[];
|
9377
9552
|
|
9378
9553
|
/**
|
@@ -9407,9 +9582,7 @@ declare interface RuleSetRule {
|
|
9407
9582
|
*/
|
9408
9583
|
options?: string | { [index: string]: any };
|
9409
9584
|
}
|
9410
|
-
| ((
|
9411
|
-
data: object
|
9412
|
-
) =>
|
9585
|
+
| ((data: object) =>
|
9413
9586
|
| string
|
9414
9587
|
| {
|
9415
9588
|
/**
|
@@ -9955,10 +10128,6 @@ declare interface RuntimeValueOptions {
|
|
9955
10128
|
buildDependencies?: string[];
|
9956
10129
|
version?: string | (() => string);
|
9957
10130
|
}
|
9958
|
-
type Schema =
|
9959
|
-
| (JSONSchema4 & Extend)
|
9960
|
-
| (JSONSchema6 & Extend)
|
9961
|
-
| (JSONSchema7 & Extend);
|
9962
10131
|
declare interface ScopeInfo {
|
9963
10132
|
definitions: StackedMap<string, ScopeInfo | VariableInfo>;
|
9964
10133
|
topLevelScope: boolean | "arrow";
|
@@ -10234,6 +10403,15 @@ declare interface SourceData {
|
|
10234
10403
|
declare interface SourceLike {
|
10235
10404
|
source(): string | Buffer;
|
10236
10405
|
}
|
10406
|
+
declare interface SourceMap {
|
10407
|
+
version: number;
|
10408
|
+
sources: string[];
|
10409
|
+
mappings: string;
|
10410
|
+
file?: string;
|
10411
|
+
sourceRoot?: string;
|
10412
|
+
sourcesContent?: string[];
|
10413
|
+
names?: string[];
|
10414
|
+
}
|
10237
10415
|
declare class SourceMapDevToolPlugin {
|
10238
10416
|
constructor(options?: SourceMapDevToolPluginOptions);
|
10239
10417
|
sourceMapFilename: string | false;
|
@@ -10985,6 +11163,16 @@ declare interface TimestampAndHash {
|
|
10985
11163
|
timestampHash?: string;
|
10986
11164
|
hash: string;
|
10987
11165
|
}
|
11166
|
+
|
11167
|
+
/**
|
11168
|
+
* Use a Trusted Types policy to create urls for chunks.
|
11169
|
+
*/
|
11170
|
+
declare interface TrustedTypes {
|
11171
|
+
/**
|
11172
|
+
* The name of the Trusted Types policy created by webpack to serve bundle chunks.
|
11173
|
+
*/
|
11174
|
+
policyName?: string;
|
11175
|
+
}
|
10988
11176
|
declare const UNDEFINED_MARKER: unique symbol;
|
10989
11177
|
declare interface UpdateHashContextDependency {
|
10990
11178
|
chunkGraph: ChunkGraph;
|
@@ -11279,8 +11467,9 @@ declare abstract class Watching {
|
|
11279
11467
|
};
|
11280
11468
|
compiler: Compiler;
|
11281
11469
|
running: boolean;
|
11282
|
-
watcher
|
11283
|
-
pausedWatcher
|
11470
|
+
watcher?: null | Watcher;
|
11471
|
+
pausedWatcher?: null | Watcher;
|
11472
|
+
lastWatcherStartTime?: number;
|
11284
11473
|
watch(
|
11285
11474
|
files: Iterable<string>,
|
11286
11475
|
dirs: Iterable<string>,
|
@@ -11585,9 +11774,7 @@ declare interface WithOptions {
|
|
11585
11774
|
declare interface WriteOnlySet<T> {
|
11586
11775
|
add: (T?: any) => void;
|
11587
11776
|
}
|
11588
|
-
type __TypeWebpackOptions = (
|
11589
|
-
data: object
|
11590
|
-
) =>
|
11777
|
+
type __TypeWebpackOptions = (data: object) =>
|
11591
11778
|
| string
|
11592
11779
|
| {
|
11593
11780
|
/**
|
@@ -11610,21 +11797,21 @@ declare function exports(
|
|
11610
11797
|
callback?: CallbackWebpack<Stats>
|
11611
11798
|
): Compiler;
|
11612
11799
|
declare function exports(
|
11613
|
-
options: Configuration
|
11800
|
+
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
11614
11801
|
callback?: CallbackWebpack<MultiStats>
|
11615
11802
|
): MultiCompiler;
|
11616
11803
|
declare namespace exports {
|
11617
11804
|
export const webpack: {
|
11618
11805
|
(options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
|
11619
11806
|
(
|
11620
|
-
options: Configuration
|
11807
|
+
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
11621
11808
|
callback?: CallbackWebpack<MultiStats>
|
11622
11809
|
): MultiCompiler;
|
11623
11810
|
};
|
11624
11811
|
export const validate: (options?: any) => void;
|
11625
11812
|
export const validateSchema: (
|
11626
|
-
schema:
|
11627
|
-
options:
|
11813
|
+
schema: Parameters<typeof validateFunction>[0],
|
11814
|
+
options: Parameters<typeof validateFunction>[1],
|
11628
11815
|
validationConfiguration?: ValidationErrorConfiguration
|
11629
11816
|
) => void;
|
11630
11817
|
export const version: string;
|
@@ -11712,6 +11899,7 @@ declare namespace exports {
|
|
11712
11899
|
export let uncaughtErrorHandler: string;
|
11713
11900
|
export let scriptNonce: string;
|
11714
11901
|
export let loadScript: string;
|
11902
|
+
export let createScriptUrl: string;
|
11715
11903
|
export let chunkName: string;
|
11716
11904
|
export let runtimeId: string;
|
11717
11905
|
export let getChunkScriptFilename: string;
|
@@ -11750,8 +11938,6 @@ declare namespace exports {
|
|
11750
11938
|
Unknown: 3;
|
11751
11939
|
Used: 4;
|
11752
11940
|
}>;
|
11753
|
-
export const WebpackOptionsValidationError: ValidationError;
|
11754
|
-
export const ValidationError: ValidationError;
|
11755
11941
|
export namespace cache {
|
11756
11942
|
export { MemoryCachePlugin };
|
11757
11943
|
}
|
@@ -11913,19 +12099,19 @@ declare namespace exports {
|
|
11913
12099
|
) => 0 | 1 | -1;
|
11914
12100
|
}
|
11915
12101
|
export namespace serialization {
|
11916
|
-
export
|
12102
|
+
export const register: (
|
11917
12103
|
Constructor: Constructor,
|
11918
12104
|
request: string,
|
11919
12105
|
name: string,
|
11920
12106
|
serializer: ObjectSerializer
|
11921
12107
|
) => void;
|
11922
|
-
export
|
12108
|
+
export const registerLoader: (
|
11923
12109
|
regExp: RegExp,
|
11924
12110
|
loader: (arg0: string) => boolean
|
11925
12111
|
) => void;
|
11926
|
-
export
|
11927
|
-
export
|
11928
|
-
export
|
12112
|
+
export const registerNotSerializable: (Constructor: Constructor) => void;
|
12113
|
+
export const NOT_SERIALIZABLE: object;
|
12114
|
+
export const buffersSerializer: Serializer;
|
11929
12115
|
export let createFileSerializer: (fs?: any) => Serializer;
|
11930
12116
|
export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
|
11931
12117
|
}
|
@@ -12010,6 +12196,8 @@ declare namespace exports {
|
|
12010
12196
|
WebpackError,
|
12011
12197
|
WebpackOptionsApply,
|
12012
12198
|
WebpackOptionsDefaulter,
|
12199
|
+
ValidationError as WebpackOptionsValidationError,
|
12200
|
+
ValidationError,
|
12013
12201
|
Entry,
|
12014
12202
|
EntryNormalized,
|
12015
12203
|
EntryObject,
|
@@ -12042,7 +12230,14 @@ declare namespace exports {
|
|
12042
12230
|
StatsModuleReason,
|
12043
12231
|
StatsModuleTraceDependency,
|
12044
12232
|
StatsModuleTraceItem,
|
12045
|
-
StatsProfile
|
12233
|
+
StatsProfile,
|
12234
|
+
LoaderModule,
|
12235
|
+
RawLoaderDefinition,
|
12236
|
+
LoaderDefinition,
|
12237
|
+
LoaderDefinitionFunction,
|
12238
|
+
PitchLoaderDefinitionFunction,
|
12239
|
+
RawLoaderDefinitionFunction,
|
12240
|
+
LoaderContext
|
12046
12241
|
};
|
12047
12242
|
}
|
12048
12243
|
|