webpack 5.36.0 → 5.37.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/ChunkGraph.js +58 -35
- package/lib/Compilation.js +116 -98
- package/lib/Compiler.js +31 -17
- 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 +1 -1
- package/lib/EvalSourceMapDevToolPlugin.js +3 -1
- package/lib/FileSystemInfo.js +25 -31
- package/lib/FlagDependencyExportsPlugin.js +8 -7
- package/lib/FlagDependencyUsagePlugin.js +2 -4
- package/lib/HotModuleReplacementPlugin.js +20 -30
- package/lib/InitFragment.js +21 -6
- package/lib/JavascriptMetaInfoPlugin.js +2 -1
- package/lib/MainTemplate.js +2 -3
- package/lib/ModuleFilenameHelpers.js +4 -2
- package/lib/ModuleGraph.js +2 -2
- package/lib/ModuleGraphConnection.js +6 -2
- package/lib/ModuleInfoHeaderPlugin.js +2 -3
- package/lib/MultiCompiler.js +31 -27
- package/lib/NormalModule.js +38 -7
- package/lib/NormalModuleFactory.js +27 -23
- 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 +83 -46
- package/lib/WebpackOptionsApply.js +1 -0
- package/lib/asset/AssetGenerator.js +19 -23
- package/lib/buildChunkGraph.js +28 -23
- package/lib/cache/PackFileCacheStrategy.js +77 -13
- package/lib/config/defaults.js +24 -10
- package/lib/config/normalization.js +17 -7
- 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/HarmonyExportInitFragment.js +47 -0
- 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 +47 -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/NodeWatchFileSystem.js +19 -4
- package/lib/optimize/AggressiveSplittingPlugin.js +5 -4
- package/lib/optimize/ConcatenatedModule.js +22 -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/serialization/BinaryMiddleware.js +2 -3
- package/lib/serialization/FileMiddleware.js +3 -1
- package/lib/serialization/ObjectMiddleware.js +11 -7
- package/lib/stats/DefaultStatsFactoryPlugin.js +2 -3
- 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/fs.js +8 -8
- package/lib/util/identifier.js +2 -1
- package/lib/util/internalSerializables.js +2 -0
- 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 +9 -6
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +103 -60
- package/types.d.ts +463 -280
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
|
)[]
|
@@ -1855,8 +1855,8 @@ declare class Compiler {
|
|
1855
1855
|
compilation: Compilation,
|
1856
1856
|
compilerName: string,
|
1857
1857
|
compilerIndex: number,
|
1858
|
-
outputOptions
|
1859
|
-
plugins
|
1858
|
+
outputOptions?: OutputNormalized,
|
1859
|
+
plugins?: WebpackPluginInstance[]
|
1860
1860
|
): Compiler;
|
1861
1861
|
isChild(): boolean;
|
1862
1862
|
createCompilation(): Compilation;
|
@@ -3035,7 +3035,7 @@ declare class EntryPlugin {
|
|
3035
3035
|
* An entry plugin which will handle
|
3036
3036
|
* creation of the EntryDependency
|
3037
3037
|
*/
|
3038
|
-
constructor(context: string, entry: string, options
|
3038
|
+
constructor(context: string, entry: string, options?: string | EntryOptions);
|
3039
3039
|
context: string;
|
3040
3040
|
entry: string;
|
3041
3041
|
options: string | EntryOptions;
|
@@ -3360,17 +3360,7 @@ declare abstract class ExportInfo {
|
|
3360
3360
|
| "maybe provided (runtime-defined)"
|
3361
3361
|
| "provided"
|
3362
3362
|
| "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";
|
3363
|
+
getRenameInfo(): string;
|
3374
3364
|
}
|
3375
3365
|
declare interface ExportSpec {
|
3376
3366
|
/**
|
@@ -3825,6 +3815,11 @@ declare interface FileCacheOptions {
|
|
3825
3815
|
*/
|
3826
3816
|
name?: string;
|
3827
3817
|
|
3818
|
+
/**
|
3819
|
+
* Track and log detailed timing information for individual cache items.
|
3820
|
+
*/
|
3821
|
+
profile?: boolean;
|
3822
|
+
|
3828
3823
|
/**
|
3829
3824
|
* When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
|
3830
3825
|
*/
|
@@ -4189,7 +4184,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4189
4184
|
/**
|
4190
4185
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4191
4186
|
*/
|
4192
|
-
hashDigest?: "
|
4187
|
+
hashDigest?: "base64" | "latin1" | "hex";
|
4193
4188
|
|
4194
4189
|
/**
|
4195
4190
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4212,6 +4207,13 @@ declare class HotModuleReplacementPlugin {
|
|
4212
4207
|
apply(compiler: Compiler): void;
|
4213
4208
|
static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
|
4214
4209
|
}
|
4210
|
+
|
4211
|
+
/**
|
4212
|
+
* These properties are added by the HotModuleReplacementPlugin
|
4213
|
+
*/
|
4214
|
+
declare interface HotModuleReplacementPluginLoaderContext {
|
4215
|
+
hot?: boolean;
|
4216
|
+
}
|
4215
4217
|
declare class HotUpdateChunk extends Chunk {
|
4216
4218
|
constructor();
|
4217
4219
|
}
|
@@ -4300,6 +4302,17 @@ type IgnorePluginOptions =
|
|
4300
4302
|
*/
|
4301
4303
|
checkResource?: (resource: string, context: string) => boolean;
|
4302
4304
|
};
|
4305
|
+
declare interface ImportModuleOptions {
|
4306
|
+
/**
|
4307
|
+
* the target layer
|
4308
|
+
*/
|
4309
|
+
layer?: string;
|
4310
|
+
|
4311
|
+
/**
|
4312
|
+
* the target public path
|
4313
|
+
*/
|
4314
|
+
publicPath?: string;
|
4315
|
+
}
|
4303
4316
|
type ImportSource =
|
4304
4317
|
| undefined
|
4305
4318
|
| null
|
@@ -4360,30 +4373,30 @@ declare abstract class InitFragment {
|
|
4360
4373
|
declare interface InputFileSystem {
|
4361
4374
|
readFile: (
|
4362
4375
|
arg0: string,
|
4363
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4376
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4364
4377
|
) => void;
|
4365
4378
|
readJson?: (
|
4366
4379
|
arg0: string,
|
4367
|
-
arg1: (arg0?: Error | NodeJS.ErrnoException, arg1?: any) => void
|
4380
|
+
arg1: (arg0?: null | Error | NodeJS.ErrnoException, arg1?: any) => void
|
4368
4381
|
) => void;
|
4369
4382
|
readlink: (
|
4370
4383
|
arg0: string,
|
4371
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4384
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4372
4385
|
) => void;
|
4373
4386
|
readdir: (
|
4374
4387
|
arg0: string,
|
4375
4388
|
arg1: (
|
4376
|
-
arg0?: NodeJS.ErrnoException,
|
4389
|
+
arg0?: null | NodeJS.ErrnoException,
|
4377
4390
|
arg1?: (string | Buffer)[] | IDirent[]
|
4378
4391
|
) => void
|
4379
4392
|
) => void;
|
4380
4393
|
stat: (
|
4381
4394
|
arg0: string,
|
4382
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
|
4395
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
4383
4396
|
) => void;
|
4384
4397
|
realpath?: (
|
4385
4398
|
arg0: string,
|
4386
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4399
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
4387
4400
|
) => void;
|
4388
4401
|
purge?: (arg0?: string) => void;
|
4389
4402
|
join?: (arg0: string, arg1: string) => string;
|
@@ -4399,7 +4412,7 @@ declare interface IntermediateFileSystemExtras {
|
|
4399
4412
|
open: (
|
4400
4413
|
arg0: string,
|
4401
4414
|
arg1: string,
|
4402
|
-
arg2: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
|
4415
|
+
arg2: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
|
4403
4416
|
) => void;
|
4404
4417
|
read: (
|
4405
4418
|
arg0: number,
|
@@ -4407,13 +4420,16 @@ declare interface IntermediateFileSystemExtras {
|
|
4407
4420
|
arg2: number,
|
4408
4421
|
arg3: number,
|
4409
4422
|
arg4: number,
|
4410
|
-
arg5: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
|
4423
|
+
arg5: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
|
4424
|
+
) => void;
|
4425
|
+
close: (
|
4426
|
+
arg0: number,
|
4427
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
4411
4428
|
) => void;
|
4412
|
-
close: (arg0: number, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
|
4413
4429
|
rename: (
|
4414
4430
|
arg0: string,
|
4415
4431
|
arg1: string,
|
4416
|
-
arg2: (arg0?: NodeJS.ErrnoException) => void
|
4432
|
+
arg2: (arg0?: null | NodeJS.ErrnoException) => void
|
4417
4433
|
) => void;
|
4418
4434
|
}
|
4419
4435
|
type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
|
@@ -4985,9 +5001,7 @@ declare class JavascriptParser extends Parser {
|
|
4985
5001
|
parseCommentOptions(
|
4986
5002
|
range?: any
|
4987
5003
|
): { options: null; errors: null } | { options: object; errors: any[] };
|
4988
|
-
extractMemberExpressionChain(
|
4989
|
-
expression: MemberExpression
|
4990
|
-
): {
|
5004
|
+
extractMemberExpressionChain(expression: MemberExpression): {
|
4991
5005
|
members: string[];
|
4992
5006
|
object:
|
4993
5007
|
| UnaryExpression
|
@@ -5019,16 +5033,15 @@ declare class JavascriptParser extends Parser {
|
|
5019
5033
|
| ChainExpression
|
5020
5034
|
| Super;
|
5021
5035
|
};
|
5022
|
-
getFreeInfoFromVariable(
|
5023
|
-
|
5024
|
-
|
5036
|
+
getFreeInfoFromVariable(varName: string): {
|
5037
|
+
name: string;
|
5038
|
+
info: string | VariableInfo;
|
5039
|
+
};
|
5025
5040
|
getMemberExpressionInfo(
|
5026
5041
|
expression: MemberExpression,
|
5027
5042
|
allowedTypes: number
|
5028
5043
|
): undefined | CallExpressionInfo | ExpressionExpressionInfo;
|
5029
|
-
getNameForExpression(
|
5030
|
-
expression: MemberExpression
|
5031
|
-
): {
|
5044
|
+
getNameForExpression(expression: MemberExpression): {
|
5032
5045
|
name: string;
|
5033
5046
|
rootInfo: ExportedVariableInfo;
|
5034
5047
|
getMembers: () => string[];
|
@@ -5743,7 +5756,7 @@ declare interface LoadScriptCompilationHooks {
|
|
5743
5756
|
createScript: SyncWaterfallHook<[string, Chunk]>;
|
5744
5757
|
}
|
5745
5758
|
declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
5746
|
-
constructor();
|
5759
|
+
constructor(withCreateScriptUrl?: boolean);
|
5747
5760
|
static getCompilationHooks(
|
5748
5761
|
compilation: Compilation
|
5749
5762
|
): LoadScriptCompilationHooks;
|
@@ -5775,12 +5788,43 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
5775
5788
|
declare interface Loader {
|
5776
5789
|
[index: string]: any;
|
5777
5790
|
}
|
5791
|
+
type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> &
|
5792
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
5793
|
+
LoaderPluginLoaderContext &
|
5794
|
+
HotModuleReplacementPluginLoaderContext;
|
5795
|
+
type LoaderDefinition<OptionsType = {}, ContextAdditions = {}> =
|
5796
|
+
LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
5797
|
+
raw?: false;
|
5798
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5799
|
+
};
|
5800
|
+
declare interface LoaderDefinitionFunction<
|
5801
|
+
OptionsType = {},
|
5802
|
+
ContextAdditions = {}
|
5803
|
+
> {
|
5804
|
+
(
|
5805
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
5806
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
5807
|
+
LoaderPluginLoaderContext &
|
5808
|
+
HotModuleReplacementPluginLoaderContext &
|
5809
|
+
ContextAdditions,
|
5810
|
+
content: string,
|
5811
|
+
sourceMap?: string | SourceMap,
|
5812
|
+
additionalData?: AdditionalData
|
5813
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
5814
|
+
}
|
5778
5815
|
declare interface LoaderItem {
|
5779
5816
|
loader: string;
|
5780
5817
|
options: any;
|
5781
5818
|
ident: null | string;
|
5782
5819
|
type: null | string;
|
5783
5820
|
}
|
5821
|
+
declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
5822
|
+
default?:
|
5823
|
+
| RawLoaderDefinitionFunction<OptionsType, ContextAdditions>
|
5824
|
+
| LoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5825
|
+
raw?: false;
|
5826
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
5827
|
+
}
|
5784
5828
|
declare class LoaderOptionsPlugin {
|
5785
5829
|
constructor(options?: LoaderOptionsPluginOptions);
|
5786
5830
|
options: LoaderOptionsPluginOptions;
|
@@ -5814,6 +5858,165 @@ declare interface LoaderOptionsPluginOptions {
|
|
5814
5858
|
context?: string;
|
5815
5859
|
};
|
5816
5860
|
}
|
5861
|
+
|
5862
|
+
/**
|
5863
|
+
* These properties are added by the LoaderPlugin
|
5864
|
+
*/
|
5865
|
+
declare interface LoaderPluginLoaderContext {
|
5866
|
+
/**
|
5867
|
+
* Resolves the given request to a module, applies all configured loaders and calls
|
5868
|
+
* back with the generated source, the sourceMap and the module instance (usually an
|
5869
|
+
* instance of NormalModule). Use this function if you need to know the source code
|
5870
|
+
* of another module to generate the result.
|
5871
|
+
*/
|
5872
|
+
loadModule(
|
5873
|
+
request: string,
|
5874
|
+
callback: (
|
5875
|
+
err: null | Error,
|
5876
|
+
source: string,
|
5877
|
+
sourceMap: any,
|
5878
|
+
module: NormalModule
|
5879
|
+
) => void
|
5880
|
+
): void;
|
5881
|
+
importModule(
|
5882
|
+
request: string,
|
5883
|
+
options: ImportModuleOptions,
|
5884
|
+
callback: (err?: Error, exports?: any) => any
|
5885
|
+
): void;
|
5886
|
+
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
5887
|
+
}
|
5888
|
+
|
5889
|
+
/**
|
5890
|
+
* The properties are added by https://github.com/webpack/loader-runner
|
5891
|
+
*/
|
5892
|
+
declare interface LoaderRunnerLoaderContext<OptionsType> {
|
5893
|
+
/**
|
5894
|
+
* Add a directory as dependency of the loader result.
|
5895
|
+
*/
|
5896
|
+
addContextDependency(context: string): void;
|
5897
|
+
|
5898
|
+
/**
|
5899
|
+
* Adds a file as dependency of the loader result in order to make them watchable.
|
5900
|
+
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
5901
|
+
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
5902
|
+
*/
|
5903
|
+
addDependency(file: string): void;
|
5904
|
+
addMissingDependency(context: string): void;
|
5905
|
+
|
5906
|
+
/**
|
5907
|
+
* Make this loader async.
|
5908
|
+
*/
|
5909
|
+
async(): (
|
5910
|
+
err?: null | Error,
|
5911
|
+
content?: string | Buffer,
|
5912
|
+
sourceMap?: string | SourceMap,
|
5913
|
+
additionalData?: AdditionalData
|
5914
|
+
) => void;
|
5915
|
+
|
5916
|
+
/**
|
5917
|
+
* Make this loader result cacheable. By default it's cacheable.
|
5918
|
+
* A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed.
|
5919
|
+
* This means the loader shouldn't have other dependencies than specified with this.addDependency.
|
5920
|
+
* Most loaders are deterministic and cacheable.
|
5921
|
+
*/
|
5922
|
+
cacheable(flag?: boolean): void;
|
5923
|
+
callback: (
|
5924
|
+
err?: null | Error,
|
5925
|
+
content?: string | Buffer,
|
5926
|
+
sourceMap?: string | SourceMap,
|
5927
|
+
additionalData?: AdditionalData
|
5928
|
+
) => void;
|
5929
|
+
|
5930
|
+
/**
|
5931
|
+
* Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
|
5932
|
+
*/
|
5933
|
+
clearDependencies(): void;
|
5934
|
+
|
5935
|
+
/**
|
5936
|
+
* The directory of the module. Can be used as context for resolving other stuff.
|
5937
|
+
* eg '/workspaces/ts-loader/examples/vanilla/src'
|
5938
|
+
*/
|
5939
|
+
context: string;
|
5940
|
+
readonly currentRequest: string;
|
5941
|
+
readonly data: any;
|
5942
|
+
|
5943
|
+
/**
|
5944
|
+
* alias of addDependency
|
5945
|
+
* Adds a file as dependency of the loader result in order to make them watchable.
|
5946
|
+
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
5947
|
+
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
5948
|
+
*/
|
5949
|
+
dependency(file: string): void;
|
5950
|
+
getContextDependencies(): string[];
|
5951
|
+
getDependencies(): string[];
|
5952
|
+
getMissingDependencies(): string[];
|
5953
|
+
|
5954
|
+
/**
|
5955
|
+
* The index in the loaders array of the current loader.
|
5956
|
+
* In the example: in loader1: 0, in loader2: 1
|
5957
|
+
*/
|
5958
|
+
loaderIndex: number;
|
5959
|
+
readonly previousRequest: string;
|
5960
|
+
readonly query: string | OptionsType;
|
5961
|
+
readonly remainingRequest: string;
|
5962
|
+
readonly request: string;
|
5963
|
+
|
5964
|
+
/**
|
5965
|
+
* An array of all the loaders. It is writeable in the pitch phase.
|
5966
|
+
* loaders = [{request: string, path: string, query: string, module: function}]
|
5967
|
+
* In the example:
|
5968
|
+
* [
|
5969
|
+
* { request: "/abc/loader1.js?xyz",
|
5970
|
+
* path: "/abc/loader1.js",
|
5971
|
+
* query: "?xyz",
|
5972
|
+
* module: [Function]
|
5973
|
+
* },
|
5974
|
+
* { request: "/abc/node_modules/loader2/index.js",
|
5975
|
+
* path: "/abc/node_modules/loader2/index.js",
|
5976
|
+
* query: "",
|
5977
|
+
* module: [Function]
|
5978
|
+
* }
|
5979
|
+
* ]
|
5980
|
+
*/
|
5981
|
+
loaders: {
|
5982
|
+
request: string;
|
5983
|
+
path: string;
|
5984
|
+
query: string;
|
5985
|
+
fragment: string;
|
5986
|
+
options?: string | object;
|
5987
|
+
ident: string;
|
5988
|
+
normal?: Function;
|
5989
|
+
pitch?: Function;
|
5990
|
+
raw?: boolean;
|
5991
|
+
data?: object;
|
5992
|
+
pitchExecuted: boolean;
|
5993
|
+
normalExecuted: boolean;
|
5994
|
+
}[];
|
5995
|
+
|
5996
|
+
/**
|
5997
|
+
* The resource path.
|
5998
|
+
* In the example: "/abc/resource.js"
|
5999
|
+
*/
|
6000
|
+
resourcePath: string;
|
6001
|
+
|
6002
|
+
/**
|
6003
|
+
* The resource query string.
|
6004
|
+
* Example: "?query"
|
6005
|
+
*/
|
6006
|
+
resourceQuery: string;
|
6007
|
+
|
6008
|
+
/**
|
6009
|
+
* The resource fragment.
|
6010
|
+
* Example: "#frag"
|
6011
|
+
*/
|
6012
|
+
resourceFragment: string;
|
6013
|
+
|
6014
|
+
/**
|
6015
|
+
* The resource inclusive query and fragment.
|
6016
|
+
* Example: "/abc/resource.js?query#frag"
|
6017
|
+
*/
|
6018
|
+
resource: string;
|
6019
|
+
}
|
5817
6020
|
declare class LoaderTargetPlugin {
|
5818
6021
|
constructor(target: string);
|
5819
6022
|
target: string;
|
@@ -6883,7 +7086,7 @@ declare class NormalModule extends Module {
|
|
6883
7086
|
options: WebpackOptionsNormalized,
|
6884
7087
|
compilation: Compilation,
|
6885
7088
|
fs: InputFileSystem
|
6886
|
-
): any
|
7089
|
+
): NormalModuleLoaderContext<any>;
|
6887
7090
|
getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
|
6888
7091
|
createSource(
|
6889
7092
|
context: string,
|
@@ -6959,6 +7162,58 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
6959
7162
|
createGenerator(type?: any, generatorOptions?: object): any;
|
6960
7163
|
getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
|
6961
7164
|
}
|
7165
|
+
|
7166
|
+
/**
|
7167
|
+
* These properties are added by the NormalModule
|
7168
|
+
*/
|
7169
|
+
declare interface NormalModuleLoaderContext<OptionsType> {
|
7170
|
+
version: number;
|
7171
|
+
getOptions(): OptionsType;
|
7172
|
+
getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
|
7173
|
+
emitWarning(warning: Error): void;
|
7174
|
+
emitError(error: Error): void;
|
7175
|
+
getLogger(name?: string): WebpackLogger;
|
7176
|
+
resolve(
|
7177
|
+
context: string,
|
7178
|
+
request: string,
|
7179
|
+
callback: (
|
7180
|
+
arg0: null | Error,
|
7181
|
+
arg1?: string | false,
|
7182
|
+
arg2?: ResolveRequest
|
7183
|
+
) => void
|
7184
|
+
): any;
|
7185
|
+
getResolve(options?: ResolveOptionsWithDependencyType): {
|
7186
|
+
(
|
7187
|
+
context: string,
|
7188
|
+
request: string,
|
7189
|
+
callback: (
|
7190
|
+
arg0: null | Error,
|
7191
|
+
arg1?: string | false,
|
7192
|
+
arg2?: ResolveRequest
|
7193
|
+
) => void
|
7194
|
+
): void;
|
7195
|
+
(context: string, request: string): Promise<string>;
|
7196
|
+
};
|
7197
|
+
emitFile(
|
7198
|
+
name: string,
|
7199
|
+
content: string,
|
7200
|
+
sourceMap?: string,
|
7201
|
+
assetInfo?: AssetInfo
|
7202
|
+
): void;
|
7203
|
+
addBuildDependency(dep: string): void;
|
7204
|
+
utils: {
|
7205
|
+
absolutify: (context: string, request: string) => string;
|
7206
|
+
contextify: (context: string, request: string) => string;
|
7207
|
+
};
|
7208
|
+
rootContext: string;
|
7209
|
+
fs: InputFileSystem;
|
7210
|
+
sourceMap?: boolean;
|
7211
|
+
mode: "development" | "production" | "none";
|
7212
|
+
webpack?: boolean;
|
7213
|
+
_module?: NormalModule;
|
7214
|
+
_compilation?: Compilation;
|
7215
|
+
_compiler?: Compiler;
|
7216
|
+
}
|
6962
7217
|
declare class NormalModuleReplacementPlugin {
|
6963
7218
|
/**
|
6964
7219
|
* Create an instance of the plugin
|
@@ -7670,6 +7925,11 @@ declare interface Output {
|
|
7670
7925
|
*/
|
7671
7926
|
strictModuleExceptionHandling?: boolean;
|
7672
7927
|
|
7928
|
+
/**
|
7929
|
+
* 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.
|
7930
|
+
*/
|
7931
|
+
trustedTypes?: string | true | TrustedTypes;
|
7932
|
+
|
7673
7933
|
/**
|
7674
7934
|
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
7675
7935
|
*/
|
@@ -7704,25 +7964,34 @@ declare interface OutputFileSystem {
|
|
7704
7964
|
writeFile: (
|
7705
7965
|
arg0: string,
|
7706
7966
|
arg1: string | Buffer,
|
7707
|
-
arg2: (arg0?: NodeJS.ErrnoException) => void
|
7967
|
+
arg2: (arg0?: null | NodeJS.ErrnoException) => void
|
7968
|
+
) => void;
|
7969
|
+
mkdir: (
|
7970
|
+
arg0: string,
|
7971
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7708
7972
|
) => void;
|
7709
|
-
mkdir: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
|
7710
7973
|
readdir?: (
|
7711
7974
|
arg0: string,
|
7712
7975
|
arg1: (
|
7713
|
-
arg0?: NodeJS.ErrnoException,
|
7976
|
+
arg0?: null | NodeJS.ErrnoException,
|
7714
7977
|
arg1?: (string | Buffer)[] | IDirent[]
|
7715
7978
|
) => void
|
7716
7979
|
) => void;
|
7717
|
-
rmdir?: (
|
7718
|
-
|
7980
|
+
rmdir?: (
|
7981
|
+
arg0: string,
|
7982
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7983
|
+
) => void;
|
7984
|
+
unlink?: (
|
7985
|
+
arg0: string,
|
7986
|
+
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
7987
|
+
) => void;
|
7719
7988
|
stat: (
|
7720
7989
|
arg0: string,
|
7721
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
|
7990
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7722
7991
|
) => void;
|
7723
7992
|
readFile: (
|
7724
7993
|
arg0: string,
|
7725
|
-
arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
7994
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
7726
7995
|
) => void;
|
7727
7996
|
join?: (arg0: string, arg1: string) => string;
|
7728
7997
|
relative?: (arg0: string, arg1: string) => string;
|
@@ -7932,6 +8201,11 @@ declare interface OutputNormalized {
|
|
7932
8201
|
*/
|
7933
8202
|
strictModuleExceptionHandling?: boolean;
|
7934
8203
|
|
8204
|
+
/**
|
8205
|
+
* Use a Trusted Types policy to create urls for chunks.
|
8206
|
+
*/
|
8207
|
+
trustedTypes?: TrustedTypes;
|
8208
|
+
|
7935
8209
|
/**
|
7936
8210
|
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
|
7937
8211
|
*/
|
@@ -8078,6 +8352,21 @@ declare interface PerformanceOptions {
|
|
8078
8352
|
*/
|
8079
8353
|
maxEntrypointSize?: number;
|
8080
8354
|
}
|
8355
|
+
declare interface PitchLoaderDefinitionFunction<
|
8356
|
+
OptionsType = {},
|
8357
|
+
ContextAdditions = {}
|
8358
|
+
> {
|
8359
|
+
(
|
8360
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
8361
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
8362
|
+
LoaderPluginLoaderContext &
|
8363
|
+
HotModuleReplacementPluginLoaderContext &
|
8364
|
+
ContextAdditions,
|
8365
|
+
remainingRequest: string,
|
8366
|
+
previousRequest: string,
|
8367
|
+
data: object
|
8368
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
8369
|
+
}
|
8081
8370
|
type Plugin =
|
8082
8371
|
| { apply: (arg0: Resolver) => void }
|
8083
8372
|
| ((this: Resolver, arg1: Resolver) => void);
|
@@ -8365,6 +8654,26 @@ declare interface RawChunkGroupOptions {
|
|
8365
8654
|
preloadOrder?: number;
|
8366
8655
|
prefetchOrder?: number;
|
8367
8656
|
}
|
8657
|
+
type RawLoaderDefinition<OptionsType = {}, ContextAdditions = {}> =
|
8658
|
+
RawLoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
8659
|
+
raw: true;
|
8660
|
+
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
8661
|
+
};
|
8662
|
+
declare interface RawLoaderDefinitionFunction<
|
8663
|
+
OptionsType = {},
|
8664
|
+
ContextAdditions = {}
|
8665
|
+
> {
|
8666
|
+
(
|
8667
|
+
this: NormalModuleLoaderContext<OptionsType> &
|
8668
|
+
LoaderRunnerLoaderContext<OptionsType> &
|
8669
|
+
LoaderPluginLoaderContext &
|
8670
|
+
HotModuleReplacementPluginLoaderContext &
|
8671
|
+
ContextAdditions,
|
8672
|
+
content: Buffer,
|
8673
|
+
sourceMap?: string | SourceMap,
|
8674
|
+
additionalData?: AdditionalData
|
8675
|
+
): string | void | Buffer | Promise<string | Buffer>;
|
8676
|
+
}
|
8368
8677
|
declare class RawSource extends Source {
|
8369
8678
|
constructor(source: string | Buffer, convertToString?: boolean);
|
8370
8679
|
isBuffer(): boolean;
|
@@ -8980,61 +9289,72 @@ declare interface RuleSet {
|
|
8980
9289
|
type RuleSetCondition =
|
8981
9290
|
| string
|
8982
9291
|
| RegExp
|
8983
|
-
| {
|
8984
|
-
/**
|
8985
|
-
* Logical AND.
|
8986
|
-
*/
|
8987
|
-
and?: RuleSetCondition[];
|
8988
|
-
/**
|
8989
|
-
* Logical NOT.
|
8990
|
-
*/
|
8991
|
-
not?: RuleSetCondition[];
|
8992
|
-
/**
|
8993
|
-
* Logical OR.
|
8994
|
-
*/
|
8995
|
-
or?: RuleSetCondition[];
|
8996
|
-
}
|
8997
9292
|
| ((value: string) => boolean)
|
9293
|
+
| RuleSetLogicalConditions
|
8998
9294
|
| RuleSetCondition[];
|
8999
9295
|
type RuleSetConditionAbsolute =
|
9000
9296
|
| string
|
9001
9297
|
| RegExp
|
9002
|
-
| {
|
9003
|
-
/**
|
9004
|
-
* Logical AND.
|
9005
|
-
*/
|
9006
|
-
and?: RuleSetConditionAbsolute[];
|
9007
|
-
/**
|
9008
|
-
* Logical NOT.
|
9009
|
-
*/
|
9010
|
-
not?: RuleSetConditionAbsolute[];
|
9011
|
-
/**
|
9012
|
-
* Logical OR.
|
9013
|
-
*/
|
9014
|
-
or?: RuleSetConditionAbsolute[];
|
9015
|
-
}
|
9016
9298
|
| ((value: string) => boolean)
|
9299
|
+
| RuleSetLogicalConditionsAbsolute
|
9017
9300
|
| RuleSetConditionAbsolute[];
|
9018
9301
|
type RuleSetConditionOrConditions =
|
9019
9302
|
| string
|
9020
9303
|
| RegExp
|
9021
|
-
| {
|
9022
|
-
/**
|
9023
|
-
* Logical AND.
|
9024
|
-
*/
|
9025
|
-
and?: RuleSetCondition[];
|
9026
|
-
/**
|
9027
|
-
* Logical NOT.
|
9028
|
-
*/
|
9029
|
-
not?: RuleSetCondition[];
|
9030
|
-
/**
|
9031
|
-
* Logical OR.
|
9032
|
-
*/
|
9033
|
-
or?: RuleSetCondition[];
|
9034
|
-
}
|
9035
9304
|
| ((value: string) => boolean)
|
9305
|
+
| RuleSetLogicalConditions
|
9036
9306
|
| RuleSetCondition[];
|
9037
9307
|
|
9308
|
+
/**
|
9309
|
+
* Logic operators used in a condition matcher.
|
9310
|
+
*/
|
9311
|
+
declare interface RuleSetLogicalConditions {
|
9312
|
+
/**
|
9313
|
+
* Logical AND.
|
9314
|
+
*/
|
9315
|
+
and?: RuleSetCondition[];
|
9316
|
+
|
9317
|
+
/**
|
9318
|
+
* Logical NOT.
|
9319
|
+
*/
|
9320
|
+
not?:
|
9321
|
+
| string
|
9322
|
+
| RegExp
|
9323
|
+
| ((value: string) => boolean)
|
9324
|
+
| RuleSetLogicalConditions
|
9325
|
+
| RuleSetCondition[];
|
9326
|
+
|
9327
|
+
/**
|
9328
|
+
* Logical OR.
|
9329
|
+
*/
|
9330
|
+
or?: RuleSetCondition[];
|
9331
|
+
}
|
9332
|
+
|
9333
|
+
/**
|
9334
|
+
* Logic operators used in a condition matcher.
|
9335
|
+
*/
|
9336
|
+
declare interface RuleSetLogicalConditionsAbsolute {
|
9337
|
+
/**
|
9338
|
+
* Logical AND.
|
9339
|
+
*/
|
9340
|
+
and?: RuleSetConditionAbsolute[];
|
9341
|
+
|
9342
|
+
/**
|
9343
|
+
* Logical NOT.
|
9344
|
+
*/
|
9345
|
+
not?:
|
9346
|
+
| string
|
9347
|
+
| RegExp
|
9348
|
+
| ((value: string) => boolean)
|
9349
|
+
| RuleSetLogicalConditionsAbsolute
|
9350
|
+
| RuleSetConditionAbsolute[];
|
9351
|
+
|
9352
|
+
/**
|
9353
|
+
* Logical OR.
|
9354
|
+
*/
|
9355
|
+
or?: RuleSetConditionAbsolute[];
|
9356
|
+
}
|
9357
|
+
|
9038
9358
|
/**
|
9039
9359
|
* A rule description with conditions and effects for modules.
|
9040
9360
|
*/
|
@@ -9045,21 +9365,8 @@ declare interface RuleSetRule {
|
|
9045
9365
|
compiler?:
|
9046
9366
|
| string
|
9047
9367
|
| RegExp
|
9048
|
-
| {
|
9049
|
-
/**
|
9050
|
-
* Logical AND.
|
9051
|
-
*/
|
9052
|
-
and?: RuleSetCondition[];
|
9053
|
-
/**
|
9054
|
-
* Logical NOT.
|
9055
|
-
*/
|
9056
|
-
not?: RuleSetCondition[];
|
9057
|
-
/**
|
9058
|
-
* Logical OR.
|
9059
|
-
*/
|
9060
|
-
or?: RuleSetCondition[];
|
9061
|
-
}
|
9062
9368
|
| ((value: string) => boolean)
|
9369
|
+
| RuleSetLogicalConditions
|
9063
9370
|
| RuleSetCondition[];
|
9064
9371
|
|
9065
9372
|
/**
|
@@ -9068,21 +9375,8 @@ declare interface RuleSetRule {
|
|
9068
9375
|
dependency?:
|
9069
9376
|
| string
|
9070
9377
|
| RegExp
|
9071
|
-
| {
|
9072
|
-
/**
|
9073
|
-
* Logical AND.
|
9074
|
-
*/
|
9075
|
-
and?: RuleSetCondition[];
|
9076
|
-
/**
|
9077
|
-
* Logical NOT.
|
9078
|
-
*/
|
9079
|
-
not?: RuleSetCondition[];
|
9080
|
-
/**
|
9081
|
-
* Logical OR.
|
9082
|
-
*/
|
9083
|
-
or?: RuleSetCondition[];
|
9084
|
-
}
|
9085
9378
|
| ((value: string) => boolean)
|
9379
|
+
| RuleSetLogicalConditions
|
9086
9380
|
| RuleSetCondition[];
|
9087
9381
|
|
9088
9382
|
/**
|
@@ -9101,21 +9395,8 @@ declare interface RuleSetRule {
|
|
9101
9395
|
exclude?:
|
9102
9396
|
| string
|
9103
9397
|
| RegExp
|
9104
|
-
| {
|
9105
|
-
/**
|
9106
|
-
* Logical AND.
|
9107
|
-
*/
|
9108
|
-
and?: RuleSetConditionAbsolute[];
|
9109
|
-
/**
|
9110
|
-
* Logical NOT.
|
9111
|
-
*/
|
9112
|
-
not?: RuleSetConditionAbsolute[];
|
9113
|
-
/**
|
9114
|
-
* Logical OR.
|
9115
|
-
*/
|
9116
|
-
or?: RuleSetConditionAbsolute[];
|
9117
|
-
}
|
9118
9398
|
| ((value: string) => boolean)
|
9399
|
+
| RuleSetLogicalConditionsAbsolute
|
9119
9400
|
| RuleSetConditionAbsolute[];
|
9120
9401
|
|
9121
9402
|
/**
|
@@ -9129,21 +9410,8 @@ declare interface RuleSetRule {
|
|
9129
9410
|
include?:
|
9130
9411
|
| string
|
9131
9412
|
| RegExp
|
9132
|
-
| {
|
9133
|
-
/**
|
9134
|
-
* Logical AND.
|
9135
|
-
*/
|
9136
|
-
and?: RuleSetConditionAbsolute[];
|
9137
|
-
/**
|
9138
|
-
* Logical NOT.
|
9139
|
-
*/
|
9140
|
-
not?: RuleSetConditionAbsolute[];
|
9141
|
-
/**
|
9142
|
-
* Logical OR.
|
9143
|
-
*/
|
9144
|
-
or?: RuleSetConditionAbsolute[];
|
9145
|
-
}
|
9146
9413
|
| ((value: string) => boolean)
|
9414
|
+
| RuleSetLogicalConditionsAbsolute
|
9147
9415
|
| RuleSetConditionAbsolute[];
|
9148
9416
|
|
9149
9417
|
/**
|
@@ -9152,21 +9420,8 @@ declare interface RuleSetRule {
|
|
9152
9420
|
issuer?:
|
9153
9421
|
| string
|
9154
9422
|
| RegExp
|
9155
|
-
| {
|
9156
|
-
/**
|
9157
|
-
* Logical AND.
|
9158
|
-
*/
|
9159
|
-
and?: RuleSetConditionAbsolute[];
|
9160
|
-
/**
|
9161
|
-
* Logical NOT.
|
9162
|
-
*/
|
9163
|
-
not?: RuleSetConditionAbsolute[];
|
9164
|
-
/**
|
9165
|
-
* Logical OR.
|
9166
|
-
*/
|
9167
|
-
or?: RuleSetConditionAbsolute[];
|
9168
|
-
}
|
9169
9423
|
| ((value: string) => boolean)
|
9424
|
+
| RuleSetLogicalConditionsAbsolute
|
9170
9425
|
| RuleSetConditionAbsolute[];
|
9171
9426
|
|
9172
9427
|
/**
|
@@ -9175,21 +9430,8 @@ declare interface RuleSetRule {
|
|
9175
9430
|
issuerLayer?:
|
9176
9431
|
| string
|
9177
9432
|
| RegExp
|
9178
|
-
| {
|
9179
|
-
/**
|
9180
|
-
* Logical AND.
|
9181
|
-
*/
|
9182
|
-
and?: RuleSetCondition[];
|
9183
|
-
/**
|
9184
|
-
* Logical NOT.
|
9185
|
-
*/
|
9186
|
-
not?: RuleSetCondition[];
|
9187
|
-
/**
|
9188
|
-
* Logical OR.
|
9189
|
-
*/
|
9190
|
-
or?: RuleSetCondition[];
|
9191
|
-
}
|
9192
9433
|
| ((value: string) => boolean)
|
9434
|
+
| RuleSetLogicalConditions
|
9193
9435
|
| RuleSetCondition[];
|
9194
9436
|
|
9195
9437
|
/**
|
@@ -9208,21 +9450,8 @@ declare interface RuleSetRule {
|
|
9208
9450
|
mimetype?:
|
9209
9451
|
| string
|
9210
9452
|
| RegExp
|
9211
|
-
| {
|
9212
|
-
/**
|
9213
|
-
* Logical AND.
|
9214
|
-
*/
|
9215
|
-
and?: RuleSetCondition[];
|
9216
|
-
/**
|
9217
|
-
* Logical NOT.
|
9218
|
-
*/
|
9219
|
-
not?: RuleSetCondition[];
|
9220
|
-
/**
|
9221
|
-
* Logical OR.
|
9222
|
-
*/
|
9223
|
-
or?: RuleSetCondition[];
|
9224
|
-
}
|
9225
9453
|
| ((value: string) => boolean)
|
9454
|
+
| RuleSetLogicalConditions
|
9226
9455
|
| RuleSetCondition[];
|
9227
9456
|
|
9228
9457
|
/**
|
@@ -9246,21 +9475,8 @@ declare interface RuleSetRule {
|
|
9246
9475
|
realResource?:
|
9247
9476
|
| string
|
9248
9477
|
| RegExp
|
9249
|
-
| {
|
9250
|
-
/**
|
9251
|
-
* Logical AND.
|
9252
|
-
*/
|
9253
|
-
and?: RuleSetConditionAbsolute[];
|
9254
|
-
/**
|
9255
|
-
* Logical NOT.
|
9256
|
-
*/
|
9257
|
-
not?: RuleSetConditionAbsolute[];
|
9258
|
-
/**
|
9259
|
-
* Logical OR.
|
9260
|
-
*/
|
9261
|
-
or?: RuleSetConditionAbsolute[];
|
9262
|
-
}
|
9263
9478
|
| ((value: string) => boolean)
|
9479
|
+
| RuleSetLogicalConditionsAbsolute
|
9264
9480
|
| RuleSetConditionAbsolute[];
|
9265
9481
|
|
9266
9482
|
/**
|
@@ -9274,21 +9490,8 @@ declare interface RuleSetRule {
|
|
9274
9490
|
resource?:
|
9275
9491
|
| string
|
9276
9492
|
| RegExp
|
9277
|
-
| {
|
9278
|
-
/**
|
9279
|
-
* Logical AND.
|
9280
|
-
*/
|
9281
|
-
and?: RuleSetConditionAbsolute[];
|
9282
|
-
/**
|
9283
|
-
* Logical NOT.
|
9284
|
-
*/
|
9285
|
-
not?: RuleSetConditionAbsolute[];
|
9286
|
-
/**
|
9287
|
-
* Logical OR.
|
9288
|
-
*/
|
9289
|
-
or?: RuleSetConditionAbsolute[];
|
9290
|
-
}
|
9291
9493
|
| ((value: string) => boolean)
|
9494
|
+
| RuleSetLogicalConditionsAbsolute
|
9292
9495
|
| RuleSetConditionAbsolute[];
|
9293
9496
|
|
9294
9497
|
/**
|
@@ -9297,21 +9500,8 @@ declare interface RuleSetRule {
|
|
9297
9500
|
resourceFragment?:
|
9298
9501
|
| string
|
9299
9502
|
| RegExp
|
9300
|
-
| {
|
9301
|
-
/**
|
9302
|
-
* Logical AND.
|
9303
|
-
*/
|
9304
|
-
and?: RuleSetCondition[];
|
9305
|
-
/**
|
9306
|
-
* Logical NOT.
|
9307
|
-
*/
|
9308
|
-
not?: RuleSetCondition[];
|
9309
|
-
/**
|
9310
|
-
* Logical OR.
|
9311
|
-
*/
|
9312
|
-
or?: RuleSetCondition[];
|
9313
|
-
}
|
9314
9503
|
| ((value: string) => boolean)
|
9504
|
+
| RuleSetLogicalConditions
|
9315
9505
|
| RuleSetCondition[];
|
9316
9506
|
|
9317
9507
|
/**
|
@@ -9320,21 +9510,8 @@ declare interface RuleSetRule {
|
|
9320
9510
|
resourceQuery?:
|
9321
9511
|
| string
|
9322
9512
|
| RegExp
|
9323
|
-
| {
|
9324
|
-
/**
|
9325
|
-
* Logical AND.
|
9326
|
-
*/
|
9327
|
-
and?: RuleSetCondition[];
|
9328
|
-
/**
|
9329
|
-
* Logical NOT.
|
9330
|
-
*/
|
9331
|
-
not?: RuleSetCondition[];
|
9332
|
-
/**
|
9333
|
-
* Logical OR.
|
9334
|
-
*/
|
9335
|
-
or?: RuleSetCondition[];
|
9336
|
-
}
|
9337
9513
|
| ((value: string) => boolean)
|
9514
|
+
| RuleSetLogicalConditions
|
9338
9515
|
| RuleSetCondition[];
|
9339
9516
|
|
9340
9517
|
/**
|
@@ -9353,21 +9530,8 @@ declare interface RuleSetRule {
|
|
9353
9530
|
test?:
|
9354
9531
|
| string
|
9355
9532
|
| RegExp
|
9356
|
-
| {
|
9357
|
-
/**
|
9358
|
-
* Logical AND.
|
9359
|
-
*/
|
9360
|
-
and?: RuleSetConditionAbsolute[];
|
9361
|
-
/**
|
9362
|
-
* Logical NOT.
|
9363
|
-
*/
|
9364
|
-
not?: RuleSetConditionAbsolute[];
|
9365
|
-
/**
|
9366
|
-
* Logical OR.
|
9367
|
-
*/
|
9368
|
-
or?: RuleSetConditionAbsolute[];
|
9369
|
-
}
|
9370
9533
|
| ((value: string) => boolean)
|
9534
|
+
| RuleSetLogicalConditionsAbsolute
|
9371
9535
|
| RuleSetConditionAbsolute[];
|
9372
9536
|
|
9373
9537
|
/**
|
@@ -9402,9 +9566,7 @@ declare interface RuleSetRule {
|
|
9402
9566
|
*/
|
9403
9567
|
options?: string | { [index: string]: any };
|
9404
9568
|
}
|
9405
|
-
| ((
|
9406
|
-
data: object
|
9407
|
-
) =>
|
9569
|
+
| ((data: object) =>
|
9408
9570
|
| string
|
9409
9571
|
| {
|
9410
9572
|
/**
|
@@ -9950,10 +10112,6 @@ declare interface RuntimeValueOptions {
|
|
9950
10112
|
buildDependencies?: string[];
|
9951
10113
|
version?: string | (() => string);
|
9952
10114
|
}
|
9953
|
-
type Schema =
|
9954
|
-
| (JSONSchema4 & Extend)
|
9955
|
-
| (JSONSchema6 & Extend)
|
9956
|
-
| (JSONSchema7 & Extend);
|
9957
10115
|
declare interface ScopeInfo {
|
9958
10116
|
definitions: StackedMap<string, ScopeInfo | VariableInfo>;
|
9959
10117
|
topLevelScope: boolean | "arrow";
|
@@ -10229,6 +10387,15 @@ declare interface SourceData {
|
|
10229
10387
|
declare interface SourceLike {
|
10230
10388
|
source(): string | Buffer;
|
10231
10389
|
}
|
10390
|
+
declare interface SourceMap {
|
10391
|
+
version: number;
|
10392
|
+
sources: string[];
|
10393
|
+
mappings: string;
|
10394
|
+
file?: string;
|
10395
|
+
sourceRoot?: string;
|
10396
|
+
sourcesContent?: string[];
|
10397
|
+
names?: string[];
|
10398
|
+
}
|
10232
10399
|
declare class SourceMapDevToolPlugin {
|
10233
10400
|
constructor(options?: SourceMapDevToolPluginOptions);
|
10234
10401
|
sourceMapFilename: string | false;
|
@@ -10980,6 +11147,16 @@ declare interface TimestampAndHash {
|
|
10980
11147
|
timestampHash?: string;
|
10981
11148
|
hash: string;
|
10982
11149
|
}
|
11150
|
+
|
11151
|
+
/**
|
11152
|
+
* Use a Trusted Types policy to create urls for chunks.
|
11153
|
+
*/
|
11154
|
+
declare interface TrustedTypes {
|
11155
|
+
/**
|
11156
|
+
* The name of the Trusted Types policy created by webpack to serve bundle chunks.
|
11157
|
+
*/
|
11158
|
+
policyName?: string;
|
11159
|
+
}
|
10983
11160
|
declare const UNDEFINED_MARKER: unique symbol;
|
10984
11161
|
declare interface UpdateHashContextDependency {
|
10985
11162
|
chunkGraph: ChunkGraph;
|
@@ -11274,8 +11451,8 @@ declare abstract class Watching {
|
|
11274
11451
|
};
|
11275
11452
|
compiler: Compiler;
|
11276
11453
|
running: boolean;
|
11277
|
-
watcher
|
11278
|
-
pausedWatcher
|
11454
|
+
watcher?: null | Watcher;
|
11455
|
+
pausedWatcher?: null | Watcher;
|
11279
11456
|
watch(
|
11280
11457
|
files: Iterable<string>,
|
11281
11458
|
dirs: Iterable<string>,
|
@@ -11580,9 +11757,7 @@ declare interface WithOptions {
|
|
11580
11757
|
declare interface WriteOnlySet<T> {
|
11581
11758
|
add: (T?: any) => void;
|
11582
11759
|
}
|
11583
|
-
type __TypeWebpackOptions = (
|
11584
|
-
data: object
|
11585
|
-
) =>
|
11760
|
+
type __TypeWebpackOptions = (data: object) =>
|
11586
11761
|
| string
|
11587
11762
|
| {
|
11588
11763
|
/**
|
@@ -11605,21 +11780,21 @@ declare function exports(
|
|
11605
11780
|
callback?: CallbackWebpack<Stats>
|
11606
11781
|
): Compiler;
|
11607
11782
|
declare function exports(
|
11608
|
-
options: Configuration
|
11783
|
+
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
11609
11784
|
callback?: CallbackWebpack<MultiStats>
|
11610
11785
|
): MultiCompiler;
|
11611
11786
|
declare namespace exports {
|
11612
11787
|
export const webpack: {
|
11613
11788
|
(options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
|
11614
11789
|
(
|
11615
|
-
options: Configuration
|
11790
|
+
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
11616
11791
|
callback?: CallbackWebpack<MultiStats>
|
11617
11792
|
): MultiCompiler;
|
11618
11793
|
};
|
11619
11794
|
export const validate: (options?: any) => void;
|
11620
11795
|
export const validateSchema: (
|
11621
|
-
schema:
|
11622
|
-
options:
|
11796
|
+
schema: Parameters<typeof validateFunction>[0],
|
11797
|
+
options: Parameters<typeof validateFunction>[1],
|
11623
11798
|
validationConfiguration?: ValidationErrorConfiguration
|
11624
11799
|
) => void;
|
11625
11800
|
export const version: string;
|
@@ -11707,6 +11882,7 @@ declare namespace exports {
|
|
11707
11882
|
export let uncaughtErrorHandler: string;
|
11708
11883
|
export let scriptNonce: string;
|
11709
11884
|
export let loadScript: string;
|
11885
|
+
export let createScriptUrl: string;
|
11710
11886
|
export let chunkName: string;
|
11711
11887
|
export let runtimeId: string;
|
11712
11888
|
export let getChunkScriptFilename: string;
|
@@ -11745,8 +11921,6 @@ declare namespace exports {
|
|
11745
11921
|
Unknown: 3;
|
11746
11922
|
Used: 4;
|
11747
11923
|
}>;
|
11748
|
-
export const WebpackOptionsValidationError: ValidationError;
|
11749
|
-
export const ValidationError: ValidationError;
|
11750
11924
|
export namespace cache {
|
11751
11925
|
export { MemoryCachePlugin };
|
11752
11926
|
}
|
@@ -12005,6 +12179,8 @@ declare namespace exports {
|
|
12005
12179
|
WebpackError,
|
12006
12180
|
WebpackOptionsApply,
|
12007
12181
|
WebpackOptionsDefaulter,
|
12182
|
+
ValidationError as WebpackOptionsValidationError,
|
12183
|
+
ValidationError,
|
12008
12184
|
Entry,
|
12009
12185
|
EntryNormalized,
|
12010
12186
|
EntryObject,
|
@@ -12037,7 +12213,14 @@ declare namespace exports {
|
|
12037
12213
|
StatsModuleReason,
|
12038
12214
|
StatsModuleTraceDependency,
|
12039
12215
|
StatsModuleTraceItem,
|
12040
|
-
StatsProfile
|
12216
|
+
StatsProfile,
|
12217
|
+
LoaderModule,
|
12218
|
+
RawLoaderDefinition,
|
12219
|
+
LoaderDefinition,
|
12220
|
+
LoaderDefinitionFunction,
|
12221
|
+
PitchLoaderDefinitionFunction,
|
12222
|
+
RawLoaderDefinitionFunction,
|
12223
|
+
LoaderContext
|
12041
12224
|
};
|
12042
12225
|
}
|
12043
12226
|
|