id
int64 0
3.78k
| code
stringlengths 13
37.9k
| declarations
stringlengths 16
64.6k
|
---|---|---|
3,600 | constructor(options?: OccurrenceChunkIdsPluginOptions) | interface OccurrenceChunkIdsPluginOptions {
/**
* Prioritise initial size over total size.
*/
prioritiseInitial?: boolean;
} |
3,601 | constructor(options?: OccurrenceModuleIdsPluginOptions) | interface OccurrenceModuleIdsPluginOptions {
/**
* Prioritise initial size over total size.
*/
prioritiseInitial?: boolean;
} |
3,602 | constructor(options?: OccurrenceModuleIdsPluginOptions) | interface OccurrenceModuleIdsPluginOptions {
/**
* Prioritise initial size over total size.
*/
prioritiseInitial?: boolean;
} |
3,603 | constructor(options?: ProfilingPluginOptions) | interface ProfilingPluginOptions {
/**
* Path to the output file e.g. `path.resolve(__dirname, 'profiling/events.json')`. Defaults to `events.json`.
*/
outputPath?: string;
} |
3,604 | constructor(options?: ProfilingPluginOptions) | interface ProfilingPluginOptions {
/**
* Path to the output file e.g. `path.resolve(__dirname, 'profiling/events.json')`. Defaults to `events.json`.
*/
outputPath?: string;
} |
3,605 | constructor(options?: ProgressPluginArgument) | type ProgressPluginArgument =
| ProgressPluginOptions
| ((percentage: number, msg: string, ...args: string[]) => void); |
3,606 | constructor(options?: ProgressPluginArgument) | type ProgressPluginArgument = ProgressPluginOptions | HandlerFunction; |
3,607 | static getReporter(
compiler: Compiler
): (p: number, ...args: string[]) => void | class Compiler {
constructor(context: string, options?: WebpackOptionsNormalized);
hooks: Readonly<{
initialize: SyncHook<[]>;
shouldEmit: SyncBailHook<[Compilation], boolean>;
done: AsyncSeriesHook<[Stats]>;
afterDone: SyncHook<[Stats]>;
additionalPass: AsyncSeriesHook<[]>;
beforeRun: AsyncSeriesHook<[Compiler]>;
run: AsyncSeriesHook<[Compiler]>;
emit: AsyncSeriesHook<[Compilation]>;
assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
afterEmit: AsyncSeriesHook<[Compilation]>;
thisCompilation: SyncHook<[Compilation, CompilationParams]>;
compilation: SyncHook<[Compilation, CompilationParams]>;
normalModuleFactory: SyncHook<[NormalModuleFactory]>;
contextModuleFactory: SyncHook<[ContextModuleFactory]>;
beforeCompile: AsyncSeriesHook<[CompilationParams]>;
compile: SyncHook<[CompilationParams]>;
make: AsyncParallelHook<[Compilation]>;
finishMake: AsyncParallelHook<[Compilation]>;
afterCompile: AsyncSeriesHook<[Compilation]>;
readRecords: AsyncSeriesHook<[]>;
emitRecords: AsyncSeriesHook<[]>;
watchRun: AsyncSeriesHook<[Compiler]>;
failed: SyncHook<[Error]>;
invalid: SyncHook<[null | string, number]>;
watchClose: SyncHook<[]>;
shutdown: AsyncSeriesHook<[]>;
infrastructureLog: SyncBailHook<[string, string, any[]], true>;
environment: SyncHook<[]>;
afterEnvironment: SyncHook<[]>;
afterPlugins: SyncHook<[Compiler]>;
afterResolvers: SyncHook<[Compiler]>;
entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
}>;
webpack: typeof exports;
name?: string;
parentCompilation?: Compilation;
root: Compiler;
outputPath: string;
watching: Watching;
outputFileSystem: OutputFileSystem;
intermediateFileSystem: IntermediateFileSystem;
inputFileSystem: InputFileSystem;
watchFileSystem: WatchFileSystem;
recordsInputPath: null | string;
recordsOutputPath: null | string;
records: object;
managedPaths: Set<string | RegExp>;
immutablePaths: Set<string | RegExp>;
modifiedFiles: ReadonlySet<string>;
removedFiles: ReadonlySet<string>;
fileTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
contextTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
fsStartTime: number;
resolverFactory: ResolverFactory;
infrastructureLogger: any;
options: WebpackOptionsNormalized;
context: string;
requestShortener: RequestShortener;
cache: Cache;
moduleMemCaches?: Map<
Module,
{
buildInfo: object;
references: WeakMap<Dependency, Module>;
memCache: WeakTupleMap<any, any>;
}
>;
compilerPath: string;
running: boolean;
idle: boolean;
watchMode: boolean;
getCache(name: string): CacheFacade;
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
run(callback: CallbackFunction<Stats>): void;
runAsChild(
callback: (
err?: null | Error,
entries?: Chunk[],
compilation?: Compilation
) => any
): void;
purgeInputFileSystem(): void;
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
emitRecords(callback: CallbackFunction<void>): void;
readRecords(callback: CallbackFunction<void>): void;
createChildCompiler(
compilation: Compilation,
compilerName: string,
compilerIndex: number,
outputOptions?: OutputNormalized,
plugins?: WebpackPluginInstance[]
): Compiler;
isChild(): boolean;
createCompilation(params?: any): Compilation;
newCompilation(params: CompilationParams): Compilation;
createNormalModuleFactory(): NormalModuleFactory;
createContextModuleFactory(): ContextModuleFactory;
newCompilationParams(): {
normalModuleFactory: NormalModuleFactory;
contextModuleFactory: ContextModuleFactory;
};
compile(callback: CallbackFunction<Compilation>): void;
close(callback: CallbackFunction<void>): void;
} |
3,608 | constructor(options: ProvideSharedPluginOptions) | interface ProvideSharedPluginOptions {
/**
* Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
*/
provides: Provides;
/**
* Share scope name used for all provided modules (defaults to 'default').
*/
shareScope?: string;
} |
3,609 | constructor(options: ProvideSharedPluginOptions) | interface ProvideSharedPluginOptions {
/**
* Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
*/
provides: Provides;
/**
* Share scope name used for all provided modules (defaults to 'default').
*/
shareScope?: string;
} |
3,610 | static getCompilationHooks(
compilation: Compilation
): CompilationHooksRealContentHashPlugin | class Compilation {
/**
* Creates an instance of Compilation.
*/
constructor(compiler: Compiler, params: CompilationParams);
hooks: Readonly<{
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<[Dependency, EntryOptions]>;
failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
dependencyReferencedExports: SyncWaterfallHook<
[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
>;
executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
prepareModuleExecution: AsyncParallelHook<
[ExecuteModuleArgument, ExecuteModuleContext]
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInChunk: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
additionalModuleRuntimeRequirements: SyncHook<
[Module, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any>
>;
additionalTreeRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInTree: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
additionalAssets: FakeHook<
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>;
optimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
afterOptimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
optimizeAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterOptimizeAssets: SyncHook<[CompilationAssets]>;
processAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterProcessAssets: SyncHook<[CompilationAssets]>;
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
[RenderManifestEntry[], RenderManifestOptions]
>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
>;
statsNormalize: SyncHook<
[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
>;
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
}>;
name?: string;
startTime: any;
endTime: any;
compiler: Compiler;
resolverFactory: ResolverFactory;
inputFileSystem: InputFileSystem;
fileSystemInfo: FileSystemInfo;
valueCacheVersions: Map<string, string | Set<string>>;
requestShortener: RequestShortener;
compilerPath: string;
logger: WebpackLogger;
options: WebpackOptionsNormalized;
outputOptions: OutputNormalized;
bail: boolean;
profile: boolean;
params: CompilationParams;
mainTemplate: MainTemplate;
chunkTemplate: ChunkTemplate;
runtimeTemplate: RuntimeTemplate;
moduleTemplates: { javascript: ModuleTemplate };
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
codeGenerationResults: CodeGenerationResults;
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
addModuleQueue: AsyncQueue<Module, string, Module>;
factorizeQueue: AsyncQueue<
FactorizeModuleOptions,
string,
Module | ModuleFactoryResult
>;
buildQueue: AsyncQueue<Module, Module, Module>;
rebuildQueue: AsyncQueue<Module, Module, Module>;
/**
* Modules in value are building during the build of Module in key.
* Means value blocking key from finishing.
* Needed to detect build cycles.
*/
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
entries: Map<string, EntryData>;
globalEntry: EntryData;
entrypoints: Map<string, Entrypoint>;
asyncEntrypoints: Entrypoint[];
chunks: Set<Chunk>;
chunkGroups: ChunkGroup[];
namedChunkGroups: Map<string, ChunkGroup>;
namedChunks: Map<string, Chunk>;
modules: Set<Module>;
records: any;
additionalChunkAssets: string[];
assets: CompilationAssets;
assetsInfo: Map<string, AssetInfo>;
errors: WebpackError[];
warnings: WebpackError[];
children: Compilation[];
logging: Map<string, LogEntry[]>;
dependencyFactories: Map<DepConstructor, ModuleFactory>;
dependencyTemplates: DependencyTemplates;
childrenCounters: object;
usedChunkIds: Set<string | number>;
usedModuleIds: Set<number>;
needAdditionalPass: boolean;
builtModules: WeakSet<Module>;
codeGeneratedModules: WeakSet<Module>;
buildTimeExecutedModules: WeakSet<Module>;
emittedAssets: Set<string>;
comparedForEmitAssets: Set<string>;
fileDependencies: LazySet<string>;
contextDependencies: LazySet<string>;
missingDependencies: LazySet<string>;
buildDependencies: LazySet<string>;
compilationDependencies: { add: (item?: any) => LazySet<string> };
getStats(): Stats;
createStatsOptions(
optionsOrPreset: string | StatsOptions,
context?: CreateStatsOptionsContext
): NormalizedStatsOptions;
createStatsFactory(options?: any): StatsFactory;
createStatsPrinter(options?: any): StatsPrinter;
getCache(name: string): CacheFacade;
getLogger(name: string | (() => string)): WebpackLogger;
addModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
/**
* Fetches a module from a compilation by its identifier
*/
getModule(module: Module): Module;
/**
* Attempts to search for a module by its identifier
*/
findModule(identifier: string): undefined | Module;
/**
* Schedules a build of the module object
*/
buildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependencies(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependenciesNonRecursive(module: Module): void;
handleModuleCreation(
__0: HandleModuleCreationOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleChain(
context: string,
dependency: Dependency,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleTree(
__0: {
/**
* context string path
*/
context: string;
/**
* dependency used to create Module chain
*/
dependency: Dependency;
/**
* additional context info for the root module
*/
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
},
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addEntry(
context: string,
entry: Dependency,
optionsOrName: string | EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addInclude(
context: string,
dependency: Dependency,
options: EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
rebuildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
finish(callback?: any): void;
unseal(): void;
seal(callback: (err?: null | WebpackError) => void): void;
reportDependencyErrorsAndWarnings(
module: Module,
blocks: DependenciesBlock[]
): boolean;
codeGeneration(callback?: any): void;
processRuntimeRequirements(__0?: {
/**
* the chunk graph
*/
chunkGraph?: ChunkGraph;
/**
* modules
*/
modules?: Iterable<Module>;
/**
* chunks
*/
chunks?: Iterable<Chunk>;
/**
* codeGenerationResults
*/
codeGenerationResults?: CodeGenerationResults;
/**
* chunkGraphEntries
*/
chunkGraphEntries?: Iterable<Chunk>;
}): void;
addRuntimeModule(
chunk: Chunk,
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,
module: Module,
loc: DependencyLocation,
request: string
): Entrypoint;
/**
* This method first looks to see if a name is provided for a new chunk,
* and first looks to see if any named chunks already exist and reuse that chunk instead.
*/
addChunk(name?: string): Chunk;
assignDepth(module: Module): void;
assignDepths(modules: Set<Module>): void;
getDependencyReferencedExports(
dependency: Dependency,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
removeReasonsOfDependencyBlock(
module: Module,
block: DependenciesBlockLike
): void;
patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
assignRuntimeIds(): void;
sortItemsWithChunkIds(): void;
summarizeDependencies(): void;
createModuleHashes(): void;
createHash(): {
module: Module;
hash: string;
runtime: RuntimeSpec;
runtimes: RuntimeSpec[];
}[];
fullHash?: string;
hash?: string;
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
updateAsset(
file: string,
newSourceOrFunction: Source | ((arg0: Source) => Source),
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
): void;
renameAsset(file?: any, newFile?: any): void;
deleteAsset(file: string): void;
getAssets(): Readonly<Asset>[];
getAsset(name: string): undefined | Readonly<Asset>;
clearAssets(): void;
createModuleAssets(): void;
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
getPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): string;
getPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): { path: string; info: AssetInfo };
getAssetPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): string;
getAssetPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): { path: string; info: AssetInfo };
getWarnings(): WebpackError[];
getErrors(): WebpackError[];
/**
* This function allows you to run another instance of webpack inside of webpack however as
* a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
* from parent (or top level compiler) and creates a child Compilation
*/
createChildCompiler(
name: string,
outputOptions?: OutputNormalized,
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[]
): Compiler;
executeModule(
module: Module,
options: ExecuteModuleOptions,
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
): void;
checkConstraints(): void;
factorizeModule: {
(
options: FactorizeModuleOptions & { factoryResult?: false },
callback: (err?: null | WebpackError, result?: Module) => void
): void;
(
options: FactorizeModuleOptions & { factoryResult: true },
callback: (
err?: null | WebpackError,
result?: ModuleFactoryResult
) => void
): void;
};
/**
* Add additional assets to the compilation.
*/
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
/**
* Basic preprocessing of assets.
*/
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
/**
* Derive new assets from existing assets.
* Existing assets should not be treated as complete.
*/
static PROCESS_ASSETS_STAGE_DERIVED: number;
/**
* Add additional sections to existing assets, like a banner or initialization code.
*/
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
/**
* Optimize existing assets in a general way.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
/**
* Optimize the count of existing assets, e. g. by merging them.
* Only assets of the same type should be merged.
* For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
/**
* Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
/**
* Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
/**
* Add development tooling to assets, e. g. by extracting a SourceMap.
*/
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
/**
* Optimize the count of existing assets, e. g. by inlining assets of into other assets.
* Only assets of different types should be inlined.
* For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
/**
* Summarize the list of existing assets
* e. g. creating an assets manifest of Service Workers.
*/
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
/**
* Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
/**
* Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
/**
* Analyse existing assets.
*/
static PROCESS_ASSETS_STAGE_ANALYSE: number;
/**
* Creating assets for reporting purposes.
*/
static PROCESS_ASSETS_STAGE_REPORT: number;
} |
3,611 | (arg0: ResolveRequest) => void | type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>; |
3,612 | (arg0: ResolveRequest) => boolean | type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>; |
3,613 | (request: ResolveRequest) => boolean | type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>; |
3,614 | attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void | class Compilation {
/**
* Creates an instance of Compilation.
*/
constructor(compiler: Compiler, params: CompilationParams);
hooks: Readonly<{
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<[Dependency, EntryOptions]>;
failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
dependencyReferencedExports: SyncWaterfallHook<
[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
>;
executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
prepareModuleExecution: AsyncParallelHook<
[ExecuteModuleArgument, ExecuteModuleContext]
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInChunk: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
additionalModuleRuntimeRequirements: SyncHook<
[Module, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any>
>;
additionalTreeRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInTree: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
additionalAssets: FakeHook<
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>;
optimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
afterOptimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
optimizeAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterOptimizeAssets: SyncHook<[CompilationAssets]>;
processAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterProcessAssets: SyncHook<[CompilationAssets]>;
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
[RenderManifestEntry[], RenderManifestOptions]
>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
>;
statsNormalize: SyncHook<
[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
>;
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
}>;
name?: string;
startTime: any;
endTime: any;
compiler: Compiler;
resolverFactory: ResolverFactory;
inputFileSystem: InputFileSystem;
fileSystemInfo: FileSystemInfo;
valueCacheVersions: Map<string, string | Set<string>>;
requestShortener: RequestShortener;
compilerPath: string;
logger: WebpackLogger;
options: WebpackOptionsNormalized;
outputOptions: OutputNormalized;
bail: boolean;
profile: boolean;
params: CompilationParams;
mainTemplate: MainTemplate;
chunkTemplate: ChunkTemplate;
runtimeTemplate: RuntimeTemplate;
moduleTemplates: { javascript: ModuleTemplate };
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
codeGenerationResults: CodeGenerationResults;
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
addModuleQueue: AsyncQueue<Module, string, Module>;
factorizeQueue: AsyncQueue<
FactorizeModuleOptions,
string,
Module | ModuleFactoryResult
>;
buildQueue: AsyncQueue<Module, Module, Module>;
rebuildQueue: AsyncQueue<Module, Module, Module>;
/**
* Modules in value are building during the build of Module in key.
* Means value blocking key from finishing.
* Needed to detect build cycles.
*/
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
entries: Map<string, EntryData>;
globalEntry: EntryData;
entrypoints: Map<string, Entrypoint>;
asyncEntrypoints: Entrypoint[];
chunks: Set<Chunk>;
chunkGroups: ChunkGroup[];
namedChunkGroups: Map<string, ChunkGroup>;
namedChunks: Map<string, Chunk>;
modules: Set<Module>;
records: any;
additionalChunkAssets: string[];
assets: CompilationAssets;
assetsInfo: Map<string, AssetInfo>;
errors: WebpackError[];
warnings: WebpackError[];
children: Compilation[];
logging: Map<string, LogEntry[]>;
dependencyFactories: Map<DepConstructor, ModuleFactory>;
dependencyTemplates: DependencyTemplates;
childrenCounters: object;
usedChunkIds: Set<string | number>;
usedModuleIds: Set<number>;
needAdditionalPass: boolean;
builtModules: WeakSet<Module>;
codeGeneratedModules: WeakSet<Module>;
buildTimeExecutedModules: WeakSet<Module>;
emittedAssets: Set<string>;
comparedForEmitAssets: Set<string>;
fileDependencies: LazySet<string>;
contextDependencies: LazySet<string>;
missingDependencies: LazySet<string>;
buildDependencies: LazySet<string>;
compilationDependencies: { add: (item?: any) => LazySet<string> };
getStats(): Stats;
createStatsOptions(
optionsOrPreset: string | StatsOptions,
context?: CreateStatsOptionsContext
): NormalizedStatsOptions;
createStatsFactory(options?: any): StatsFactory;
createStatsPrinter(options?: any): StatsPrinter;
getCache(name: string): CacheFacade;
getLogger(name: string | (() => string)): WebpackLogger;
addModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
/**
* Fetches a module from a compilation by its identifier
*/
getModule(module: Module): Module;
/**
* Attempts to search for a module by its identifier
*/
findModule(identifier: string): undefined | Module;
/**
* Schedules a build of the module object
*/
buildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependencies(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependenciesNonRecursive(module: Module): void;
handleModuleCreation(
__0: HandleModuleCreationOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleChain(
context: string,
dependency: Dependency,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleTree(
__0: {
/**
* context string path
*/
context: string;
/**
* dependency used to create Module chain
*/
dependency: Dependency;
/**
* additional context info for the root module
*/
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
},
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addEntry(
context: string,
entry: Dependency,
optionsOrName: string | EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addInclude(
context: string,
dependency: Dependency,
options: EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
rebuildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
finish(callback?: any): void;
unseal(): void;
seal(callback: (err?: null | WebpackError) => void): void;
reportDependencyErrorsAndWarnings(
module: Module,
blocks: DependenciesBlock[]
): boolean;
codeGeneration(callback?: any): void;
processRuntimeRequirements(__0?: {
/**
* the chunk graph
*/
chunkGraph?: ChunkGraph;
/**
* modules
*/
modules?: Iterable<Module>;
/**
* chunks
*/
chunks?: Iterable<Chunk>;
/**
* codeGenerationResults
*/
codeGenerationResults?: CodeGenerationResults;
/**
* chunkGraphEntries
*/
chunkGraphEntries?: Iterable<Chunk>;
}): void;
addRuntimeModule(
chunk: Chunk,
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,
module: Module,
loc: DependencyLocation,
request: string
): Entrypoint;
/**
* This method first looks to see if a name is provided for a new chunk,
* and first looks to see if any named chunks already exist and reuse that chunk instead.
*/
addChunk(name?: string): Chunk;
assignDepth(module: Module): void;
assignDepths(modules: Set<Module>): void;
getDependencyReferencedExports(
dependency: Dependency,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
removeReasonsOfDependencyBlock(
module: Module,
block: DependenciesBlockLike
): void;
patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
assignRuntimeIds(): void;
sortItemsWithChunkIds(): void;
summarizeDependencies(): void;
createModuleHashes(): void;
createHash(): {
module: Module;
hash: string;
runtime: RuntimeSpec;
runtimes: RuntimeSpec[];
}[];
fullHash?: string;
hash?: string;
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
updateAsset(
file: string,
newSourceOrFunction: Source | ((arg0: Source) => Source),
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
): void;
renameAsset(file?: any, newFile?: any): void;
deleteAsset(file: string): void;
getAssets(): Readonly<Asset>[];
getAsset(name: string): undefined | Readonly<Asset>;
clearAssets(): void;
createModuleAssets(): void;
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
getPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): string;
getPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): { path: string; info: AssetInfo };
getAssetPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): string;
getAssetPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): { path: string; info: AssetInfo };
getWarnings(): WebpackError[];
getErrors(): WebpackError[];
/**
* This function allows you to run another instance of webpack inside of webpack however as
* a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
* from parent (or top level compiler) and creates a child Compilation
*/
createChildCompiler(
name: string,
outputOptions?: OutputNormalized,
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[]
): Compiler;
executeModule(
module: Module,
options: ExecuteModuleOptions,
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
): void;
checkConstraints(): void;
factorizeModule: {
(
options: FactorizeModuleOptions & { factoryResult?: false },
callback: (err?: null | WebpackError, result?: Module) => void
): void;
(
options: FactorizeModuleOptions & { factoryResult: true },
callback: (
err?: null | WebpackError,
result?: ModuleFactoryResult
) => void
): void;
};
/**
* Add additional assets to the compilation.
*/
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
/**
* Basic preprocessing of assets.
*/
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
/**
* Derive new assets from existing assets.
* Existing assets should not be treated as complete.
*/
static PROCESS_ASSETS_STAGE_DERIVED: number;
/**
* Add additional sections to existing assets, like a banner or initialization code.
*/
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
/**
* Optimize existing assets in a general way.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
/**
* Optimize the count of existing assets, e. g. by merging them.
* Only assets of the same type should be merged.
* For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
/**
* Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
/**
* Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
/**
* Add development tooling to assets, e. g. by extracting a SourceMap.
*/
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
/**
* Optimize the count of existing assets, e. g. by inlining assets of into other assets.
* Only assets of different types should be inlined.
* For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
/**
* Summarize the list of existing assets
* e. g. creating an assets manifest of Service Workers.
*/
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
/**
* Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
/**
* Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
/**
* Analyse existing assets.
*/
static PROCESS_ASSETS_STAGE_ANALYSE: number;
/**
* Creating assets for reporting purposes.
*/
static PROCESS_ASSETS_STAGE_REPORT: number;
} |
3,615 | attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void | class Chunk {
constructor(name?: string, backCompat?: boolean);
id: null | string | number;
ids: null | (string | number)[];
debugId: number;
name: string;
idNameHints: SortableSet<string>;
preventIntegration: boolean;
filenameTemplate:
| null
| string
| ((arg0: PathData, arg1?: AssetInfo) => string);
cssFilenameTemplate:
| null
| string
| ((arg0: PathData, arg1?: AssetInfo) => string);
runtime: RuntimeSpec;
files: Set<string>;
auxiliaryFiles: Set<string>;
rendered: boolean;
hash?: string;
contentHash: Record<string, string>;
renderedHash?: string;
chunkReason?: string;
extraAsync: boolean;
get entryModule(): Module;
hasEntryModule(): boolean;
addModule(module: Module): boolean;
removeModule(module: Module): void;
getNumberOfModules(): number;
get modulesIterable(): Iterable<Module>;
compareTo(otherChunk: Chunk): 0 | 1 | -1;
containsModule(module: Module): boolean;
getModules(): Module[];
remove(): void;
moveModule(module: Module, otherChunk: Chunk): void;
integrate(otherChunk: Chunk): boolean;
canBeIntegrated(otherChunk: Chunk): boolean;
isEmpty(): boolean;
modulesSize(): number;
size(options?: ChunkSizeOptions): number;
integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number;
getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps;
hasModuleInGraph(
filterFn: (m: Module) => boolean,
filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): boolean;
getChunkMaps(realHash: boolean): ChunkMaps;
hasRuntime(): boolean;
canBeInitial(): boolean;
isOnlyInitial(): boolean;
getEntryOptions(): undefined | EntryOptions;
addGroup(chunkGroup: ChunkGroup): void;
removeGroup(chunkGroup: ChunkGroup): void;
isInGroup(chunkGroup: ChunkGroup): boolean;
getNumberOfGroups(): number;
get groupsIterable(): Iterable<ChunkGroup>;
disconnectFromGroups(): void;
split(newChunk: Chunk): void;
updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
getAllAsyncChunks(): Set<Chunk>;
getAllInitialChunks(): Set<Chunk>;
getAllReferencedChunks(): Set<Chunk>;
getAllReferencedAsyncEntrypoints(): Set<Entrypoint>;
hasAsyncChunks(): boolean;
getChildIdsByOrders(
chunkGraph: ChunkGraph,
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string, (string | number)[]>;
getChildrenOfTypeInOrder(
chunkGraph: ChunkGraph,
type: string
): { onChunks: Chunk[]; chunks: Set<Chunk> }[];
getChildIdsByOrdersMap(
chunkGraph: ChunkGraph,
includeDirectChildren?: boolean,
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string | number, Record<string, (string | number)[]>>;
} |
3,616 | attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void | class ChunkGraph {
constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
moduleGraph: ModuleGraph;
connectChunkAndModule(chunk: Chunk, module: Module): void;
disconnectChunkAndModule(chunk: Chunk, module: Module): void;
disconnectChunk(chunk: Chunk): void;
attachModules(chunk: Chunk, modules: Iterable<Module>): void;
attachRuntimeModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
attachFullHashModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
attachDependentHashModules(
chunk: Chunk,
modules: Iterable<RuntimeModule>
): void;
replaceModule(oldModule: Module, newModule: Module): void;
isModuleInChunk(module: Module, chunk: Chunk): boolean;
isModuleInChunkGroup(module: Module, chunkGroup: ChunkGroup): boolean;
isEntryModule(module: Module): boolean;
getModuleChunksIterable(module: Module): Iterable<Chunk>;
getOrderedModuleChunksIterable(
module: Module,
sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1
): Iterable<Chunk>;
getModuleChunks(module: Module): Chunk[];
getNumberOfModuleChunks(module: Module): number;
getModuleRuntimes(module: Module): RuntimeSpecSet;
getNumberOfChunkModules(chunk: Chunk): number;
getNumberOfChunkFullHashModules(chunk: Chunk): number;
getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
getChunkModulesIterableBySourceType(
chunk: Chunk,
sourceType: string
): undefined | Iterable<Module>;
setChunkModuleSourceTypes(
chunk: Chunk,
module: Module,
sourceTypes: Set<string>
): void;
getChunkModuleSourceTypes(chunk: Chunk, module: Module): Set<string>;
getModuleSourceTypes(module: Module): Set<string>;
getOrderedChunkModulesIterable(
chunk: Chunk,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): Iterable<Module>;
getOrderedChunkModulesIterableBySourceType(
chunk: Chunk,
sourceType: string,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): undefined | Iterable<Module>;
getChunkModules(chunk: Chunk): Module[];
getOrderedChunkModules(
chunk: Chunk,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): Module[];
getChunkModuleIdMap(
chunk: Chunk,
filterFn: (m: Module) => boolean,
includeAllChunks?: boolean
): Record<string | number, (string | number)[]>;
getChunkModuleRenderedHashMap(
chunk: Chunk,
filterFn: (m: Module) => boolean,
hashLength?: number,
includeAllChunks?: boolean
): Record<string | number, Record<string | number, string>>;
getChunkConditionMap(
chunk: Chunk,
filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string | number, boolean>;
hasModuleInGraph(
chunk: Chunk,
filterFn: (m: Module) => boolean,
filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): boolean;
compareChunks(chunkA: Chunk, chunkB: Chunk): 0 | 1 | -1;
getChunkModulesSize(chunk: Chunk): number;
getChunkModulesSizes(chunk: Chunk): Record<string, number>;
getChunkRootModules(chunk: Chunk): Module[];
getChunkSize(chunk: Chunk, options?: ChunkSizeOptions): number;
getIntegratedChunksSize(
chunkA: Chunk,
chunkB: Chunk,
options?: ChunkSizeOptions
): number;
canChunksBeIntegrated(chunkA: Chunk, chunkB: Chunk): boolean;
integrateChunks(chunkA: Chunk, chunkB: Chunk): void;
upgradeDependentToFullHashModules(chunk: Chunk): void;
isEntryModuleInChunk(module: Module, chunk: Chunk): boolean;
connectChunkAndEntryModule(
chunk: Chunk,
module: Module,
entrypoint?: Entrypoint
): void;
connectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
addFullHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
addDependentHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
disconnectChunkAndEntryModule(chunk: Chunk, module: Module): void;
disconnectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
disconnectEntryModule(module: Module): void;
disconnectEntries(chunk: Chunk): void;
getNumberOfEntryModules(chunk: Chunk): number;
getNumberOfRuntimeModules(chunk: Chunk): number;
getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
hasChunkEntryDependentChunks(chunk: Chunk): boolean;
getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
getChunkFullHashModulesIterable(
chunk: Chunk
): undefined | Iterable<RuntimeModule>;
getChunkFullHashModulesSet(
chunk: Chunk
): undefined | ReadonlySet<RuntimeModule>;
getChunkDependentHashModulesIterable(
chunk: Chunk
): undefined | Iterable<RuntimeModule>;
getChunkEntryModulesWithChunkGroupIterable(
chunk: Chunk
): Iterable<[Module, undefined | Entrypoint]>;
getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
connectBlockAndChunkGroup(
depBlock: AsyncDependenciesBlock,
chunkGroup: ChunkGroup
): void;
disconnectChunkGroup(chunkGroup: ChunkGroup): void;
getModuleId(module: Module): string | number;
setModuleId(module: Module, id: string | number): void;
getRuntimeId(runtime: string): string | number;
setRuntimeId(runtime: string, id: string | number): void;
hasModuleHashes(module: Module, runtime: RuntimeSpec): boolean;
getModuleHash(module: Module, runtime: RuntimeSpec): string;
getRenderedModuleHash(module: Module, runtime: RuntimeSpec): string;
setModuleHashes(
module: Module,
runtime: RuntimeSpec,
hash: string,
renderedHash: string
): void;
addModuleRuntimeRequirements(
module: Module,
runtime: RuntimeSpec,
items: Set<string>,
transferOwnership?: boolean
): void;
addChunkRuntimeRequirements(chunk: Chunk, items: Set<string>): void;
addTreeRuntimeRequirements(chunk: Chunk, items: Iterable<string>): void;
getModuleRuntimeRequirements(
module: Module,
runtime: RuntimeSpec
): ReadonlySet<string>;
getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
getModuleGraphHash(
module: Module,
runtime: RuntimeSpec,
withConnections?: boolean
): string;
getModuleGraphHashBigInt(
module: Module,
runtime: RuntimeSpec,
withConnections?: boolean
): bigint;
getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
static getChunkGraphForModule(
module: Module,
deprecateMessage: string,
deprecationCode: string
): ChunkGraph;
static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void;
static clearChunkGraphForModule(module: Module): void;
static getChunkGraphForChunk(
chunk: Chunk,
deprecateMessage: string,
deprecationCode: string
): ChunkGraph;
static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void;
static clearChunkGraphForChunk(chunk: Chunk): void;
} |
3,617 | get(runtime: RuntimeSpec): T | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,618 | has(runtime: RuntimeSpec): boolean | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,619 | exec(
parser: JavascriptParser,
valueCacheVersions: Map<string, string | Set<string>>,
key: string
): CodeValuePrimitive | class JavascriptParser extends Parser {
constructor(sourceType?: "module" | "auto" | "script");
hooks: Readonly<{
evaluateTypeof: HookMap<
SyncBailHook<
[UnaryExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluate: HookMap<
SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
>;
evaluateIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | MetaProperty | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateDefinedIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateNewExpression: HookMap<
SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
>;
evaluateCallExpression: HookMap<
SyncBailHook<
[CallExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateCallExpressionMember: HookMap<
SyncBailHook<
[CallExpression, undefined | BasicEvaluatedExpression],
undefined | null | BasicEvaluatedExpression
>
>;
isPure: HookMap<
SyncBailHook<
[
(
| UnaryExpression
| ThisExpression
| ArrayExpression
| ObjectExpression
| FunctionExpression
| ArrowFunctionExpression
| YieldExpression
| SimpleLiteral
| RegExpLiteral
| BigIntLiteral
| UpdateExpression
| BinaryExpression
| AssignmentExpression
| LogicalExpression
| MemberExpression
| ConditionalExpression
| SimpleCallExpression
| NewExpression
| SequenceExpression
| TemplateLiteral
| TaggedTemplateExpression
| ClassExpression
| MetaProperty
| Identifier
| AwaitExpression
| ImportExpression
| ChainExpression
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| PrivateIdentifier
),
number
],
boolean | void
>
>;
preStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
blockPreStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statementIf: SyncBailHook<[IfStatement], boolean | void>;
classExtendsExpression: SyncBailHook<
[Expression, ClassExpression | ClassDeclaration],
boolean | void
>;
classBodyElement: SyncBailHook<
[
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
classBodyValue: SyncBailHook<
[
Expression,
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>;
importSpecifier: SyncBailHook<
[ImportDeclaration, ImportSource, string, string],
boolean | void
>;
export: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration],
boolean | void
>;
exportImport: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, ImportSource],
boolean | void
>;
exportDeclaration: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, Declaration],
boolean | void
>;
exportExpression: SyncBailHook<
[ExportDefaultDeclaration, Declaration],
boolean | void
>;
exportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
string,
string,
undefined | number
],
boolean | void
>;
exportImportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
ImportSource,
string,
string,
undefined | number
],
boolean | void
>;
preDeclarator: SyncBailHook<
[VariableDeclarator, Statement],
boolean | void
>;
declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
assignMemberChain: HookMap<
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
>;
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
importCall: SyncBailHook<[Expression], boolean | void>;
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
callMemberChain: HookMap<
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
>;
memberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
callMemberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
expressionMemberChain: HookMap<
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
>;
unhandledExpressionMemberChain: HookMap<
SyncBailHook<[Expression, string[]], boolean | void>
>;
expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
program: SyncBailHook<[Program, Comment[]], boolean | void>;
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
} |
3,620 | constructor(options: SharePluginOptions) | interface SharePluginOptions {
/**
* Share scope name used for all shared modules (defaults to 'default').
*/
shareScope?: string;
/**
* Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
*/
shared: Shared;
} |
3,621 | constructor(options: SharePluginOptions) | interface SharePluginOptions {
/**
* Share scope name used for all shared modules (defaults to 'default').
*/
shareScope?: string;
/**
* Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
*/
shared: Shared;
} |
3,622 | sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object } | type MapOptions = { columns?: boolean; module?: boolean }; |
3,623 | sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object } | interface MapOptions {
columns?: boolean;
module?: boolean;
} |
3,624 | updateHash(hash: Hash): void | class Hash {
constructor();
/**
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
*/
update(data: string | Buffer, inputEncoding?: string): Hash;
/**
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
*/
digest(encoding?: string): string | Buffer;
} |
3,625 | constructor(options?: SourceMapDevToolPluginOptions) | interface SourceMapDevToolPluginOptions {
/**
* Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
*/
append?: null | string | false;
/**
* Indicates whether column mappings should be used (defaults to true).
*/
columns?: boolean;
/**
* Exclude modules that match the given value from source map generation.
*/
exclude?: string | RegExp | Rule[];
/**
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
*/
fallbackModuleFilenameTemplate?: string | Function;
/**
* Path prefix to which the [file] placeholder is relative to.
*/
fileContext?: string;
/**
* Defines the output filename of the SourceMap (will be inlined if no value is provided).
*/
filename?: null | string | false;
/**
* Include source maps for module paths that match the given value.
*/
include?: string | RegExp | Rule[];
/**
* Indicates whether SourceMaps from loaders should be used (defaults to true).
*/
module?: boolean;
/**
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
*/
moduleFilenameTemplate?: string | Function;
/**
* Namespace prefix to allow multiple webpack roots in the devtools.
*/
namespace?: string;
/**
* Omit the 'sourceContents' array from the SourceMap.
*/
noSources?: boolean;
/**
* Provide a custom public path for the SourceMapping comment.
*/
publicPath?: string;
/**
* Provide a custom value for the 'sourceRoot' property in the SourceMap.
*/
sourceRoot?: string;
/**
* Include source maps for modules based on their extension (defaults to .js and .css).
*/
test?: string | RegExp | Rule[];
} |
3,626 | constructor(options?: SourceMapDevToolPluginOptions) | interface SourceMapDevToolPluginOptions {
/**
* Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
*/
append?: (false | null) | string;
/**
* Indicates whether column mappings should be used (defaults to true).
*/
columns?: boolean;
/**
* Exclude modules that match the given value from source map generation.
*/
exclude?: Rules;
/**
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
*/
fallbackModuleFilenameTemplate?: string | Function;
/**
* Path prefix to which the [file] placeholder is relative to.
*/
fileContext?: string;
/**
* Defines the output filename of the SourceMap (will be inlined if no value is provided).
*/
filename?: (false | null) | string;
/**
* Include source maps for module paths that match the given value.
*/
include?: Rules;
/**
* Indicates whether SourceMaps from loaders should be used (defaults to true).
*/
module?: boolean;
/**
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
*/
moduleFilenameTemplate?: string | Function;
/**
* Namespace prefix to allow multiple webpack roots in the devtools.
*/
namespace?: string;
/**
* Omit the 'sourceContents' array from the SourceMap.
*/
noSources?: boolean;
/**
* Provide a custom public path for the SourceMapping comment.
*/
publicPath?: string;
/**
* Provide a custom value for the 'sourceRoot' property in the SourceMap.
*/
sourceRoot?: string;
/**
* Include source maps for modules based on their extension (defaults to .js and .css).
*/
test?: Rules;
} |
3,627 | (
module: Module,
context: CacheGroupsContext
) => CacheGroupSource[] | interface Module {
hot: webpack.Hot;
} |
3,628 | (
module: Module,
context: CacheGroupsContext
) => CacheGroupSource[] | class Module extends DependenciesBlock {
constructor(type: string, context?: string, layer?: string);
type: string;
context: null | string;
layer: null | string;
needId: boolean;
debugId: number;
resolveOptions: ResolveOptionsWebpackOptions;
factoryMeta?: object;
useSourceMap: boolean;
useSimpleSourceMap: boolean;
buildMeta: BuildMeta;
buildInfo: Record<string, any>;
presentationalDependencies?: Dependency[];
codeGenerationDependencies?: Dependency[];
id: string | number;
get hash(): string;
get renderedHash(): string;
profile: null | ModuleProfile;
index: number;
index2: number;
depth: number;
issuer: null | Module;
get usedExports(): null | boolean | SortableSet<string>;
get optimizationBailout(): (
| string
| ((requestShortener: RequestShortener) => string)
)[];
get optional(): boolean;
addChunk(chunk?: any): boolean;
removeChunk(chunk?: any): void;
isInChunk(chunk?: any): boolean;
isEntryModule(): boolean;
getChunks(): Chunk[];
getNumberOfChunks(): number;
get chunksIterable(): Iterable<Chunk>;
isProvided(exportName: string): null | boolean;
get exportsArgument(): string;
get moduleArgument(): string;
getExportsType(
moduleGraph: ModuleGraph,
strict: boolean
): "namespace" | "default-only" | "default-with-named" | "dynamic";
addPresentationalDependency(presentationalDependency: Dependency): void;
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
addWarning(warning: WebpackError): void;
getWarnings(): undefined | Iterable<WebpackError>;
getNumberOfWarnings(): number;
addError(error: WebpackError): void;
getErrors(): undefined | Iterable<WebpackError>;
getNumberOfErrors(): number;
/**
* removes all warnings and errors
*/
clearWarningsAndErrors(): void;
isOptional(moduleGraph: ModuleGraph): boolean;
isAccessibleInChunk(
chunkGraph: ChunkGraph,
chunk: Chunk,
ignoreChunk?: Chunk
): boolean;
isAccessibleInChunkGroup(
chunkGraph: ChunkGraph,
chunkGroup: ChunkGroup,
ignoreChunk?: Chunk
): boolean;
hasReasonForChunk(
chunk: Chunk,
moduleGraph: ModuleGraph,
chunkGraph: ChunkGraph
): boolean;
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
needBuild(
context: NeedBuildContext,
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
): void;
needRebuild(
fileTimestamps: Map<string, null | number>,
contextTimestamps: Map<string, null | number>
): boolean;
invalidateBuild(): void;
identifier(): string;
readableIdentifier(requestShortener: RequestShortener): string;
build(
options: WebpackOptionsNormalized,
compilation: Compilation,
resolver: ResolverWithOptions,
fs: InputFileSystem,
callback: (arg0?: WebpackError) => void
): void;
getSourceTypes(): Set<string>;
source(
dependencyTemplates: DependencyTemplates,
runtimeTemplate: RuntimeTemplate,
type?: string
): Source;
size(type?: string): number;
libIdent(options: LibIdentOptions): null | string;
nameForCondition(): null | string;
getConcatenationBailoutReason(
context: ConcatenationBailoutReasonContext
): undefined | string;
getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
hasChunkCondition(): boolean;
/**
* Assuming this module is in the cache. Update the (cached) module with
* the fresh module from the factory. Usually updates internal references
* and properties.
*/
updateCacheModule(module: Module): void;
/**
* Module should be unsafe cached. Get data that's needed for that.
* This data will be passed to restoreFromUnsafeCache later.
*/
getUnsafeCacheData(): object;
/**
* Assuming this module is in the cache. Remove internal references to allow freeing some memory.
*/
cleanupForCache(): void;
originalSource(): null | Source;
addCacheDependencies(
fileDependencies: LazySet<string>,
contextDependencies: LazySet<string>,
missingDependencies: LazySet<string>,
buildDependencies: LazySet<string>
): void;
get hasEqualsChunks(): any;
get isUsed(): any;
get errors(): any;
get warnings(): any;
used: any;
} |
3,629 | (
module: Module,
context: CacheGroupsContext
) => CacheGroupSource[] | interface CacheGroupsContext {
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
} |
3,630 | constructor(options?: OptimizationSplitChunksOptions) | interface OptimizationSplitChunksOptions {
/**
* Sets the name delimiter for created chunks.
*/
automaticNameDelimiter?: string;
/**
* Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
*/
cacheGroups?: {
[index: string]:
| string
| false
| Function
| RegExp
| OptimizationSplitChunksCacheGroup;
};
/**
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
*/
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
/**
* Sets the size types which are used when a number is used for sizes.
*/
defaultSizeTypes?: string[];
/**
* Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
*/
enforceSizeThreshold?: number | { [index: string]: number };
/**
* Options for modules not selected by any other cache group.
*/
fallbackCacheGroup?: {
/**
* Sets the name delimiter for created chunks.
*/
automaticNameDelimiter?: string;
/**
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
*/
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
/**
* Maximal size hint for the on-demand chunks.
*/
maxAsyncSize?: number | { [index: string]: number };
/**
* Maximal size hint for the initial chunks.
*/
maxInitialSize?: number | { [index: string]: number };
/**
* Maximal size hint for the created chunks.
*/
maxSize?: number | { [index: string]: number };
/**
* Minimal size for the created chunk.
*/
minSize?: number | { [index: string]: number };
/**
* Minimum size reduction due to the created chunk.
*/
minSizeReduction?: number | { [index: string]: number };
};
/**
* Sets the template for the filename for created chunks.
*/
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
/**
* Prevents exposing path info when creating names for parts splitted by maxSize.
*/
hidePathInfo?: boolean;
/**
* Maximum number of requests which are accepted for on-demand loading.
*/
maxAsyncRequests?: number;
/**
* Maximal size hint for the on-demand chunks.
*/
maxAsyncSize?: number | { [index: string]: number };
/**
* Maximum number of initial chunks which are accepted for an entry point.
*/
maxInitialRequests?: number;
/**
* Maximal size hint for the initial chunks.
*/
maxInitialSize?: number | { [index: string]: number };
/**
* Maximal size hint for the created chunks.
*/
maxSize?: number | { [index: string]: number };
/**
* Minimum number of times a module has to be duplicated until it's considered for splitting.
*/
minChunks?: number;
/**
* Minimal size for the chunks the stay after moving the modules to a new chunk.
*/
minRemainingSize?: number | { [index: string]: number };
/**
* Minimal size for the created chunks.
*/
minSize?: number | { [index: string]: number };
/**
* Minimum size reduction due to the created chunk.
*/
minSizeReduction?: number | { [index: string]: number };
/**
* Give chunks created a name (chunks with equal name are merged).
*/
name?: string | false | Function;
/**
* Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
*/
usedExports?: boolean;
} |
3,631 | constructor(options?: OptimizationSplitChunksOptions) | interface OptimizationSplitChunksOptions {
/**
* Sets the name delimiter for created chunks.
*/
automaticNameDelimiter?: string;
/**
* Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
*/
cacheGroups?: {
/**
* Configuration for a cache group.
*/
[k: string]:
| false
| RegExp
| string
| Function
| OptimizationSplitChunksCacheGroup;
};
/**
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
*/
chunks?:
| ("initial" | "async" | "all")
| ((chunk: import("../lib/Chunk")) => boolean);
/**
* Sets the size types which are used when a number is used for sizes.
*/
defaultSizeTypes?: string[];
/**
* Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
*/
enforceSizeThreshold?: OptimizationSplitChunksSizes;
/**
* Options for modules not selected by any other cache group.
*/
fallbackCacheGroup?: {
/**
* Sets the name delimiter for created chunks.
*/
automaticNameDelimiter?: string;
/**
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
*/
chunks?:
| ("initial" | "async" | "all")
| ((chunk: import("../lib/Chunk")) => boolean);
/**
* Maximal size hint for the on-demand chunks.
*/
maxAsyncSize?: OptimizationSplitChunksSizes;
/**
* Maximal size hint for the initial chunks.
*/
maxInitialSize?: OptimizationSplitChunksSizes;
/**
* Maximal size hint for the created chunks.
*/
maxSize?: OptimizationSplitChunksSizes;
/**
* Minimal size for the created chunk.
*/
minSize?: OptimizationSplitChunksSizes;
/**
* Minimum size reduction due to the created chunk.
*/
minSizeReduction?: OptimizationSplitChunksSizes;
};
/**
* Sets the template for the filename for created chunks.
*/
filename?:
| string
| ((
pathData: import("../lib/Compilation").PathData,
assetInfo?: import("../lib/Compilation").AssetInfo
) => string);
/**
* Prevents exposing path info when creating names for parts splitted by maxSize.
*/
hidePathInfo?: boolean;
/**
* Maximum number of requests which are accepted for on-demand loading.
*/
maxAsyncRequests?: number;
/**
* Maximal size hint for the on-demand chunks.
*/
maxAsyncSize?: OptimizationSplitChunksSizes;
/**
* Maximum number of initial chunks which are accepted for an entry point.
*/
maxInitialRequests?: number;
/**
* Maximal size hint for the initial chunks.
*/
maxInitialSize?: OptimizationSplitChunksSizes;
/**
* Maximal size hint for the created chunks.
*/
maxSize?: OptimizationSplitChunksSizes;
/**
* Minimum number of times a module has to be duplicated until it's considered for splitting.
*/
minChunks?: number;
/**
* Minimal size for the chunks the stay after moving the modules to a new chunk.
*/
minRemainingSize?: OptimizationSplitChunksSizes;
/**
* Minimal size for the created chunks.
*/
minSize?: OptimizationSplitChunksSizes;
/**
* Minimum size reduction due to the created chunk.
*/
minSizeReduction?: OptimizationSplitChunksSizes;
/**
* Give chunks created a name (chunks with equal name are merged).
*/
name?: false | string | Function;
/**
* Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
*/
usedExports?: boolean;
} |
3,632 | constructor(compilation: Compilation) | class Compilation {
/**
* Creates an instance of Compilation.
*/
constructor(compiler: Compiler, params: CompilationParams);
hooks: Readonly<{
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<[Dependency, EntryOptions]>;
failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
dependencyReferencedExports: SyncWaterfallHook<
[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
>;
executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
prepareModuleExecution: AsyncParallelHook<
[ExecuteModuleArgument, ExecuteModuleContext]
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInChunk: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
additionalModuleRuntimeRequirements: SyncHook<
[Module, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any>
>;
additionalTreeRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInTree: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
additionalAssets: FakeHook<
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>;
optimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
afterOptimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
optimizeAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterOptimizeAssets: SyncHook<[CompilationAssets]>;
processAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterProcessAssets: SyncHook<[CompilationAssets]>;
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
[RenderManifestEntry[], RenderManifestOptions]
>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
>;
statsNormalize: SyncHook<
[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
>;
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
}>;
name?: string;
startTime: any;
endTime: any;
compiler: Compiler;
resolverFactory: ResolverFactory;
inputFileSystem: InputFileSystem;
fileSystemInfo: FileSystemInfo;
valueCacheVersions: Map<string, string | Set<string>>;
requestShortener: RequestShortener;
compilerPath: string;
logger: WebpackLogger;
options: WebpackOptionsNormalized;
outputOptions: OutputNormalized;
bail: boolean;
profile: boolean;
params: CompilationParams;
mainTemplate: MainTemplate;
chunkTemplate: ChunkTemplate;
runtimeTemplate: RuntimeTemplate;
moduleTemplates: { javascript: ModuleTemplate };
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
codeGenerationResults: CodeGenerationResults;
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
addModuleQueue: AsyncQueue<Module, string, Module>;
factorizeQueue: AsyncQueue<
FactorizeModuleOptions,
string,
Module | ModuleFactoryResult
>;
buildQueue: AsyncQueue<Module, Module, Module>;
rebuildQueue: AsyncQueue<Module, Module, Module>;
/**
* Modules in value are building during the build of Module in key.
* Means value blocking key from finishing.
* Needed to detect build cycles.
*/
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
entries: Map<string, EntryData>;
globalEntry: EntryData;
entrypoints: Map<string, Entrypoint>;
asyncEntrypoints: Entrypoint[];
chunks: Set<Chunk>;
chunkGroups: ChunkGroup[];
namedChunkGroups: Map<string, ChunkGroup>;
namedChunks: Map<string, Chunk>;
modules: Set<Module>;
records: any;
additionalChunkAssets: string[];
assets: CompilationAssets;
assetsInfo: Map<string, AssetInfo>;
errors: WebpackError[];
warnings: WebpackError[];
children: Compilation[];
logging: Map<string, LogEntry[]>;
dependencyFactories: Map<DepConstructor, ModuleFactory>;
dependencyTemplates: DependencyTemplates;
childrenCounters: object;
usedChunkIds: Set<string | number>;
usedModuleIds: Set<number>;
needAdditionalPass: boolean;
builtModules: WeakSet<Module>;
codeGeneratedModules: WeakSet<Module>;
buildTimeExecutedModules: WeakSet<Module>;
emittedAssets: Set<string>;
comparedForEmitAssets: Set<string>;
fileDependencies: LazySet<string>;
contextDependencies: LazySet<string>;
missingDependencies: LazySet<string>;
buildDependencies: LazySet<string>;
compilationDependencies: { add: (item?: any) => LazySet<string> };
getStats(): Stats;
createStatsOptions(
optionsOrPreset: string | StatsOptions,
context?: CreateStatsOptionsContext
): NormalizedStatsOptions;
createStatsFactory(options?: any): StatsFactory;
createStatsPrinter(options?: any): StatsPrinter;
getCache(name: string): CacheFacade;
getLogger(name: string | (() => string)): WebpackLogger;
addModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
/**
* Fetches a module from a compilation by its identifier
*/
getModule(module: Module): Module;
/**
* Attempts to search for a module by its identifier
*/
findModule(identifier: string): undefined | Module;
/**
* Schedules a build of the module object
*/
buildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependencies(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependenciesNonRecursive(module: Module): void;
handleModuleCreation(
__0: HandleModuleCreationOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleChain(
context: string,
dependency: Dependency,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleTree(
__0: {
/**
* context string path
*/
context: string;
/**
* dependency used to create Module chain
*/
dependency: Dependency;
/**
* additional context info for the root module
*/
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
},
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addEntry(
context: string,
entry: Dependency,
optionsOrName: string | EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addInclude(
context: string,
dependency: Dependency,
options: EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
rebuildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
finish(callback?: any): void;
unseal(): void;
seal(callback: (err?: null | WebpackError) => void): void;
reportDependencyErrorsAndWarnings(
module: Module,
blocks: DependenciesBlock[]
): boolean;
codeGeneration(callback?: any): void;
processRuntimeRequirements(__0?: {
/**
* the chunk graph
*/
chunkGraph?: ChunkGraph;
/**
* modules
*/
modules?: Iterable<Module>;
/**
* chunks
*/
chunks?: Iterable<Chunk>;
/**
* codeGenerationResults
*/
codeGenerationResults?: CodeGenerationResults;
/**
* chunkGraphEntries
*/
chunkGraphEntries?: Iterable<Chunk>;
}): void;
addRuntimeModule(
chunk: Chunk,
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,
module: Module,
loc: DependencyLocation,
request: string
): Entrypoint;
/**
* This method first looks to see if a name is provided for a new chunk,
* and first looks to see if any named chunks already exist and reuse that chunk instead.
*/
addChunk(name?: string): Chunk;
assignDepth(module: Module): void;
assignDepths(modules: Set<Module>): void;
getDependencyReferencedExports(
dependency: Dependency,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
removeReasonsOfDependencyBlock(
module: Module,
block: DependenciesBlockLike
): void;
patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
assignRuntimeIds(): void;
sortItemsWithChunkIds(): void;
summarizeDependencies(): void;
createModuleHashes(): void;
createHash(): {
module: Module;
hash: string;
runtime: RuntimeSpec;
runtimes: RuntimeSpec[];
}[];
fullHash?: string;
hash?: string;
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
updateAsset(
file: string,
newSourceOrFunction: Source | ((arg0: Source) => Source),
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
): void;
renameAsset(file?: any, newFile?: any): void;
deleteAsset(file: string): void;
getAssets(): Readonly<Asset>[];
getAsset(name: string): undefined | Readonly<Asset>;
clearAssets(): void;
createModuleAssets(): void;
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
getPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): string;
getPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): { path: string; info: AssetInfo };
getAssetPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): string;
getAssetPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): { path: string; info: AssetInfo };
getWarnings(): WebpackError[];
getErrors(): WebpackError[];
/**
* This function allows you to run another instance of webpack inside of webpack however as
* a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
* from parent (or top level compiler) and creates a child Compilation
*/
createChildCompiler(
name: string,
outputOptions?: OutputNormalized,
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[]
): Compiler;
executeModule(
module: Module,
options: ExecuteModuleOptions,
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
): void;
checkConstraints(): void;
factorizeModule: {
(
options: FactorizeModuleOptions & { factoryResult?: false },
callback: (err?: null | WebpackError, result?: Module) => void
): void;
(
options: FactorizeModuleOptions & { factoryResult: true },
callback: (
err?: null | WebpackError,
result?: ModuleFactoryResult
) => void
): void;
};
/**
* Add additional assets to the compilation.
*/
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
/**
* Basic preprocessing of assets.
*/
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
/**
* Derive new assets from existing assets.
* Existing assets should not be treated as complete.
*/
static PROCESS_ASSETS_STAGE_DERIVED: number;
/**
* Add additional sections to existing assets, like a banner or initialization code.
*/
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
/**
* Optimize existing assets in a general way.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
/**
* Optimize the count of existing assets, e. g. by merging them.
* Only assets of the same type should be merged.
* For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
/**
* Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
/**
* Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
/**
* Add development tooling to assets, e. g. by extracting a SourceMap.
*/
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
/**
* Optimize the count of existing assets, e. g. by inlining assets of into other assets.
* Only assets of different types should be inlined.
* For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
/**
* Summarize the list of existing assets
* e. g. creating an assets manifest of Service Workers.
*/
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
/**
* Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
/**
* Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
/**
* Analyse existing assets.
*/
static PROCESS_ASSETS_STAGE_ANALYSE: number;
/**
* Creating assets for reporting purposes.
*/
static PROCESS_ASSETS_STAGE_REPORT: number;
} |
3,633 | (warning: StatsError, value: string) => boolean | type StatsError = KnownStatsError & Record<string, any>; |
3,634 | static renderChunkModules(
renderContext: ChunkRenderContext,
modules: Module[],
renderModule: (arg0: Module) => Source,
prefix?: string
): Source | interface Module {
hot: webpack.Hot;
} |
3,635 | static renderChunkModules(
renderContext: ChunkRenderContext,
modules: Module[],
renderModule: (arg0: Module) => Source,
prefix?: string
): Source | class Module extends DependenciesBlock {
constructor(type: string, context?: string, layer?: string);
type: string;
context: null | string;
layer: null | string;
needId: boolean;
debugId: number;
resolveOptions: ResolveOptionsWebpackOptions;
factoryMeta?: object;
useSourceMap: boolean;
useSimpleSourceMap: boolean;
buildMeta: BuildMeta;
buildInfo: Record<string, any>;
presentationalDependencies?: Dependency[];
codeGenerationDependencies?: Dependency[];
id: string | number;
get hash(): string;
get renderedHash(): string;
profile: null | ModuleProfile;
index: number;
index2: number;
depth: number;
issuer: null | Module;
get usedExports(): null | boolean | SortableSet<string>;
get optimizationBailout(): (
| string
| ((requestShortener: RequestShortener) => string)
)[];
get optional(): boolean;
addChunk(chunk?: any): boolean;
removeChunk(chunk?: any): void;
isInChunk(chunk?: any): boolean;
isEntryModule(): boolean;
getChunks(): Chunk[];
getNumberOfChunks(): number;
get chunksIterable(): Iterable<Chunk>;
isProvided(exportName: string): null | boolean;
get exportsArgument(): string;
get moduleArgument(): string;
getExportsType(
moduleGraph: ModuleGraph,
strict: boolean
): "namespace" | "default-only" | "default-with-named" | "dynamic";
addPresentationalDependency(presentationalDependency: Dependency): void;
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
addWarning(warning: WebpackError): void;
getWarnings(): undefined | Iterable<WebpackError>;
getNumberOfWarnings(): number;
addError(error: WebpackError): void;
getErrors(): undefined | Iterable<WebpackError>;
getNumberOfErrors(): number;
/**
* removes all warnings and errors
*/
clearWarningsAndErrors(): void;
isOptional(moduleGraph: ModuleGraph): boolean;
isAccessibleInChunk(
chunkGraph: ChunkGraph,
chunk: Chunk,
ignoreChunk?: Chunk
): boolean;
isAccessibleInChunkGroup(
chunkGraph: ChunkGraph,
chunkGroup: ChunkGroup,
ignoreChunk?: Chunk
): boolean;
hasReasonForChunk(
chunk: Chunk,
moduleGraph: ModuleGraph,
chunkGraph: ChunkGraph
): boolean;
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
needBuild(
context: NeedBuildContext,
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
): void;
needRebuild(
fileTimestamps: Map<string, null | number>,
contextTimestamps: Map<string, null | number>
): boolean;
invalidateBuild(): void;
identifier(): string;
readableIdentifier(requestShortener: RequestShortener): string;
build(
options: WebpackOptionsNormalized,
compilation: Compilation,
resolver: ResolverWithOptions,
fs: InputFileSystem,
callback: (arg0?: WebpackError) => void
): void;
getSourceTypes(): Set<string>;
source(
dependencyTemplates: DependencyTemplates,
runtimeTemplate: RuntimeTemplate,
type?: string
): Source;
size(type?: string): number;
libIdent(options: LibIdentOptions): null | string;
nameForCondition(): null | string;
getConcatenationBailoutReason(
context: ConcatenationBailoutReasonContext
): undefined | string;
getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
hasChunkCondition(): boolean;
/**
* Assuming this module is in the cache. Update the (cached) module with
* the fresh module from the factory. Usually updates internal references
* and properties.
*/
updateCacheModule(module: Module): void;
/**
* Module should be unsafe cached. Get data that's needed for that.
* This data will be passed to restoreFromUnsafeCache later.
*/
getUnsafeCacheData(): object;
/**
* Assuming this module is in the cache. Remove internal references to allow freeing some memory.
*/
cleanupForCache(): void;
originalSource(): null | Source;
addCacheDependencies(
fileDependencies: LazySet<string>,
contextDependencies: LazySet<string>,
missingDependencies: LazySet<string>,
buildDependencies: LazySet<string>
): void;
get hasEqualsChunks(): any;
get isUsed(): any;
get errors(): any;
get warnings(): any;
used: any;
} |
3,636 | static renderChunkModules(
renderContext: ChunkRenderContext,
modules: Module[],
renderModule: (arg0: Module) => Source,
prefix?: string
): Source | interface ChunkRenderContext {
/**
* the chunk
*/
chunk: Chunk;
/**
* the dependency templates
*/
dependencyTemplates: DependencyTemplates;
/**
* the runtime template
*/
runtimeTemplate: RuntimeTemplate;
/**
* the module graph
*/
moduleGraph: ModuleGraph;
/**
* the chunk graph
*/
chunkGraph: ChunkGraph;
/**
* results of code generation
*/
codeGenerationResults: CodeGenerationResults;
/**
* init fragments for the chunk
*/
chunkInitFragments: InitFragment<ChunkRenderContext>[];
/**
* rendering in strict context
*/
strictMode: boolean;
} |
3,637 | (arg0: Module) => Source | interface Module {
hot: webpack.Hot;
} |
3,638 | (arg0: Module) => Source | class Module extends DependenciesBlock {
constructor(type: string, context?: string, layer?: string);
type: string;
context: null | string;
layer: null | string;
needId: boolean;
debugId: number;
resolveOptions: ResolveOptionsWebpackOptions;
factoryMeta?: object;
useSourceMap: boolean;
useSimpleSourceMap: boolean;
buildMeta: BuildMeta;
buildInfo: Record<string, any>;
presentationalDependencies?: Dependency[];
codeGenerationDependencies?: Dependency[];
id: string | number;
get hash(): string;
get renderedHash(): string;
profile: null | ModuleProfile;
index: number;
index2: number;
depth: number;
issuer: null | Module;
get usedExports(): null | boolean | SortableSet<string>;
get optimizationBailout(): (
| string
| ((requestShortener: RequestShortener) => string)
)[];
get optional(): boolean;
addChunk(chunk?: any): boolean;
removeChunk(chunk?: any): void;
isInChunk(chunk?: any): boolean;
isEntryModule(): boolean;
getChunks(): Chunk[];
getNumberOfChunks(): number;
get chunksIterable(): Iterable<Chunk>;
isProvided(exportName: string): null | boolean;
get exportsArgument(): string;
get moduleArgument(): string;
getExportsType(
moduleGraph: ModuleGraph,
strict: boolean
): "namespace" | "default-only" | "default-with-named" | "dynamic";
addPresentationalDependency(presentationalDependency: Dependency): void;
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
addWarning(warning: WebpackError): void;
getWarnings(): undefined | Iterable<WebpackError>;
getNumberOfWarnings(): number;
addError(error: WebpackError): void;
getErrors(): undefined | Iterable<WebpackError>;
getNumberOfErrors(): number;
/**
* removes all warnings and errors
*/
clearWarningsAndErrors(): void;
isOptional(moduleGraph: ModuleGraph): boolean;
isAccessibleInChunk(
chunkGraph: ChunkGraph,
chunk: Chunk,
ignoreChunk?: Chunk
): boolean;
isAccessibleInChunkGroup(
chunkGraph: ChunkGraph,
chunkGroup: ChunkGroup,
ignoreChunk?: Chunk
): boolean;
hasReasonForChunk(
chunk: Chunk,
moduleGraph: ModuleGraph,
chunkGraph: ChunkGraph
): boolean;
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
needBuild(
context: NeedBuildContext,
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
): void;
needRebuild(
fileTimestamps: Map<string, null | number>,
contextTimestamps: Map<string, null | number>
): boolean;
invalidateBuild(): void;
identifier(): string;
readableIdentifier(requestShortener: RequestShortener): string;
build(
options: WebpackOptionsNormalized,
compilation: Compilation,
resolver: ResolverWithOptions,
fs: InputFileSystem,
callback: (arg0?: WebpackError) => void
): void;
getSourceTypes(): Set<string>;
source(
dependencyTemplates: DependencyTemplates,
runtimeTemplate: RuntimeTemplate,
type?: string
): Source;
size(type?: string): number;
libIdent(options: LibIdentOptions): null | string;
nameForCondition(): null | string;
getConcatenationBailoutReason(
context: ConcatenationBailoutReasonContext
): undefined | string;
getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
hasChunkCondition(): boolean;
/**
* Assuming this module is in the cache. Update the (cached) module with
* the fresh module from the factory. Usually updates internal references
* and properties.
*/
updateCacheModule(module: Module): void;
/**
* Module should be unsafe cached. Get data that's needed for that.
* This data will be passed to restoreFromUnsafeCache later.
*/
getUnsafeCacheData(): object;
/**
* Assuming this module is in the cache. Remove internal references to allow freeing some memory.
*/
cleanupForCache(): void;
originalSource(): null | Source;
addCacheDependencies(
fileDependencies: LazySet<string>,
contextDependencies: LazySet<string>,
missingDependencies: LazySet<string>,
buildDependencies: LazySet<string>
): void;
get hasEqualsChunks(): any;
get isUsed(): any;
get errors(): any;
get warnings(): any;
used: any;
} |
3,639 | constructor(options: WatchIgnorePluginOptions) | interface WatchIgnorePluginOptions {
/**
* A list of RegExps or absolute paths to directories or files that should be ignored.
*/
paths: (string | RegExp)[];
} |
3,640 | constructor(options: WatchIgnorePluginOptions) | interface WatchIgnorePluginOptions {
/**
* A list of RegExps or absolute paths to directories or files that should be ignored.
*/
paths: (RegExp | string)[];
} |
3,641 | (
warning: WebpackError,
compilation: Compilation
) => boolean | class WebpackError extends Error {
/**
* Creates an instance of WebpackError.
*/
constructor(message?: string);
details: any;
module: Module;
loc: DependencyLocation;
hideStack: boolean;
chunk: Chunk;
file: string;
serialize(__0: { write: any }): void;
deserialize(__0: { read: any }): void;
/**
* Create .stack property on a target object
*/
static captureStackTrace(
targetObject: object,
constructorOpt?: Function
): void;
/**
* Optional override for formatting stack traces
*/
static prepareStackTrace?: (
err: Error,
stackTraces: NodeJS.CallSite[]
) => any;
static stackTraceLimit: number;
} |
3,642 | (
warning: WebpackError,
compilation: Compilation
) => boolean | class Compilation {
/**
* Creates an instance of Compilation.
*/
constructor(compiler: Compiler, params: CompilationParams);
hooks: Readonly<{
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<[Dependency, EntryOptions]>;
failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
dependencyReferencedExports: SyncWaterfallHook<
[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
>;
executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
prepareModuleExecution: AsyncParallelHook<
[ExecuteModuleArgument, ExecuteModuleContext]
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInChunk: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
additionalModuleRuntimeRequirements: SyncHook<
[Module, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any>
>;
additionalTreeRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInTree: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
additionalAssets: FakeHook<
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>;
optimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
afterOptimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
optimizeAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterOptimizeAssets: SyncHook<[CompilationAssets]>;
processAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterProcessAssets: SyncHook<[CompilationAssets]>;
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
[RenderManifestEntry[], RenderManifestOptions]
>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
>;
statsNormalize: SyncHook<
[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
>;
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
}>;
name?: string;
startTime: any;
endTime: any;
compiler: Compiler;
resolverFactory: ResolverFactory;
inputFileSystem: InputFileSystem;
fileSystemInfo: FileSystemInfo;
valueCacheVersions: Map<string, string | Set<string>>;
requestShortener: RequestShortener;
compilerPath: string;
logger: WebpackLogger;
options: WebpackOptionsNormalized;
outputOptions: OutputNormalized;
bail: boolean;
profile: boolean;
params: CompilationParams;
mainTemplate: MainTemplate;
chunkTemplate: ChunkTemplate;
runtimeTemplate: RuntimeTemplate;
moduleTemplates: { javascript: ModuleTemplate };
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
codeGenerationResults: CodeGenerationResults;
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
addModuleQueue: AsyncQueue<Module, string, Module>;
factorizeQueue: AsyncQueue<
FactorizeModuleOptions,
string,
Module | ModuleFactoryResult
>;
buildQueue: AsyncQueue<Module, Module, Module>;
rebuildQueue: AsyncQueue<Module, Module, Module>;
/**
* Modules in value are building during the build of Module in key.
* Means value blocking key from finishing.
* Needed to detect build cycles.
*/
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
entries: Map<string, EntryData>;
globalEntry: EntryData;
entrypoints: Map<string, Entrypoint>;
asyncEntrypoints: Entrypoint[];
chunks: Set<Chunk>;
chunkGroups: ChunkGroup[];
namedChunkGroups: Map<string, ChunkGroup>;
namedChunks: Map<string, Chunk>;
modules: Set<Module>;
records: any;
additionalChunkAssets: string[];
assets: CompilationAssets;
assetsInfo: Map<string, AssetInfo>;
errors: WebpackError[];
warnings: WebpackError[];
children: Compilation[];
logging: Map<string, LogEntry[]>;
dependencyFactories: Map<DepConstructor, ModuleFactory>;
dependencyTemplates: DependencyTemplates;
childrenCounters: object;
usedChunkIds: Set<string | number>;
usedModuleIds: Set<number>;
needAdditionalPass: boolean;
builtModules: WeakSet<Module>;
codeGeneratedModules: WeakSet<Module>;
buildTimeExecutedModules: WeakSet<Module>;
emittedAssets: Set<string>;
comparedForEmitAssets: Set<string>;
fileDependencies: LazySet<string>;
contextDependencies: LazySet<string>;
missingDependencies: LazySet<string>;
buildDependencies: LazySet<string>;
compilationDependencies: { add: (item?: any) => LazySet<string> };
getStats(): Stats;
createStatsOptions(
optionsOrPreset: string | StatsOptions,
context?: CreateStatsOptionsContext
): NormalizedStatsOptions;
createStatsFactory(options?: any): StatsFactory;
createStatsPrinter(options?: any): StatsPrinter;
getCache(name: string): CacheFacade;
getLogger(name: string | (() => string)): WebpackLogger;
addModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
/**
* Fetches a module from a compilation by its identifier
*/
getModule(module: Module): Module;
/**
* Attempts to search for a module by its identifier
*/
findModule(identifier: string): undefined | Module;
/**
* Schedules a build of the module object
*/
buildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependencies(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependenciesNonRecursive(module: Module): void;
handleModuleCreation(
__0: HandleModuleCreationOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleChain(
context: string,
dependency: Dependency,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleTree(
__0: {
/**
* context string path
*/
context: string;
/**
* dependency used to create Module chain
*/
dependency: Dependency;
/**
* additional context info for the root module
*/
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
},
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addEntry(
context: string,
entry: Dependency,
optionsOrName: string | EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addInclude(
context: string,
dependency: Dependency,
options: EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
rebuildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
finish(callback?: any): void;
unseal(): void;
seal(callback: (err?: null | WebpackError) => void): void;
reportDependencyErrorsAndWarnings(
module: Module,
blocks: DependenciesBlock[]
): boolean;
codeGeneration(callback?: any): void;
processRuntimeRequirements(__0?: {
/**
* the chunk graph
*/
chunkGraph?: ChunkGraph;
/**
* modules
*/
modules?: Iterable<Module>;
/**
* chunks
*/
chunks?: Iterable<Chunk>;
/**
* codeGenerationResults
*/
codeGenerationResults?: CodeGenerationResults;
/**
* chunkGraphEntries
*/
chunkGraphEntries?: Iterable<Chunk>;
}): void;
addRuntimeModule(
chunk: Chunk,
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,
module: Module,
loc: DependencyLocation,
request: string
): Entrypoint;
/**
* This method first looks to see if a name is provided for a new chunk,
* and first looks to see if any named chunks already exist and reuse that chunk instead.
*/
addChunk(name?: string): Chunk;
assignDepth(module: Module): void;
assignDepths(modules: Set<Module>): void;
getDependencyReferencedExports(
dependency: Dependency,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
removeReasonsOfDependencyBlock(
module: Module,
block: DependenciesBlockLike
): void;
patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
assignRuntimeIds(): void;
sortItemsWithChunkIds(): void;
summarizeDependencies(): void;
createModuleHashes(): void;
createHash(): {
module: Module;
hash: string;
runtime: RuntimeSpec;
runtimes: RuntimeSpec[];
}[];
fullHash?: string;
hash?: string;
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
updateAsset(
file: string,
newSourceOrFunction: Source | ((arg0: Source) => Source),
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
): void;
renameAsset(file?: any, newFile?: any): void;
deleteAsset(file: string): void;
getAssets(): Readonly<Asset>[];
getAsset(name: string): undefined | Readonly<Asset>;
clearAssets(): void;
createModuleAssets(): void;
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
getPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): string;
getPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): { path: string; info: AssetInfo };
getAssetPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): string;
getAssetPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): { path: string; info: AssetInfo };
getWarnings(): WebpackError[];
getErrors(): WebpackError[];
/**
* This function allows you to run another instance of webpack inside of webpack however as
* a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
* from parent (or top level compiler) and creates a child Compilation
*/
createChildCompiler(
name: string,
outputOptions?: OutputNormalized,
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[]
): Compiler;
executeModule(
module: Module,
options: ExecuteModuleOptions,
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
): void;
checkConstraints(): void;
factorizeModule: {
(
options: FactorizeModuleOptions & { factoryResult?: false },
callback: (err?: null | WebpackError, result?: Module) => void
): void;
(
options: FactorizeModuleOptions & { factoryResult: true },
callback: (
err?: null | WebpackError,
result?: ModuleFactoryResult
) => void
): void;
};
/**
* Add additional assets to the compilation.
*/
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
/**
* Basic preprocessing of assets.
*/
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
/**
* Derive new assets from existing assets.
* Existing assets should not be treated as complete.
*/
static PROCESS_ASSETS_STAGE_DERIVED: number;
/**
* Add additional sections to existing assets, like a banner or initialization code.
*/
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
/**
* Optimize existing assets in a general way.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
/**
* Optimize the count of existing assets, e. g. by merging them.
* Only assets of the same type should be merged.
* For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
/**
* Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
/**
* Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
/**
* Add development tooling to assets, e. g. by extracting a SourceMap.
*/
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
/**
* Optimize the count of existing assets, e. g. by inlining assets of into other assets.
* Only assets of different types should be inlined.
* For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
/**
* Summarize the list of existing assets
* e. g. creating an assets manifest of Service Workers.
*/
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
/**
* Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
/**
* Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
/**
* Analyse existing assets.
*/
static PROCESS_ASSETS_STAGE_ANALYSE: number;
/**
* Creating assets for reporting purposes.
*/
static PROCESS_ASSETS_STAGE_REPORT: number;
} |
3,643 | (compiler: Compiler) => void | class Compiler {
constructor(context: string, options?: WebpackOptionsNormalized);
hooks: Readonly<{
initialize: SyncHook<[]>;
shouldEmit: SyncBailHook<[Compilation], boolean>;
done: AsyncSeriesHook<[Stats]>;
afterDone: SyncHook<[Stats]>;
additionalPass: AsyncSeriesHook<[]>;
beforeRun: AsyncSeriesHook<[Compiler]>;
run: AsyncSeriesHook<[Compiler]>;
emit: AsyncSeriesHook<[Compilation]>;
assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
afterEmit: AsyncSeriesHook<[Compilation]>;
thisCompilation: SyncHook<[Compilation, CompilationParams]>;
compilation: SyncHook<[Compilation, CompilationParams]>;
normalModuleFactory: SyncHook<[NormalModuleFactory]>;
contextModuleFactory: SyncHook<[ContextModuleFactory]>;
beforeCompile: AsyncSeriesHook<[CompilationParams]>;
compile: SyncHook<[CompilationParams]>;
make: AsyncParallelHook<[Compilation]>;
finishMake: AsyncParallelHook<[Compilation]>;
afterCompile: AsyncSeriesHook<[Compilation]>;
readRecords: AsyncSeriesHook<[]>;
emitRecords: AsyncSeriesHook<[]>;
watchRun: AsyncSeriesHook<[Compiler]>;
failed: SyncHook<[Error]>;
invalid: SyncHook<[null | string, number]>;
watchClose: SyncHook<[]>;
shutdown: AsyncSeriesHook<[]>;
infrastructureLog: SyncBailHook<[string, string, any[]], true>;
environment: SyncHook<[]>;
afterEnvironment: SyncHook<[]>;
afterPlugins: SyncHook<[Compiler]>;
afterResolvers: SyncHook<[Compiler]>;
entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
}>;
webpack: typeof exports;
name?: string;
parentCompilation?: Compilation;
root: Compiler;
outputPath: string;
watching: Watching;
outputFileSystem: OutputFileSystem;
intermediateFileSystem: IntermediateFileSystem;
inputFileSystem: InputFileSystem;
watchFileSystem: WatchFileSystem;
recordsInputPath: null | string;
recordsOutputPath: null | string;
records: object;
managedPaths: Set<string | RegExp>;
immutablePaths: Set<string | RegExp>;
modifiedFiles: ReadonlySet<string>;
removedFiles: ReadonlySet<string>;
fileTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
contextTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
fsStartTime: number;
resolverFactory: ResolverFactory;
infrastructureLogger: any;
options: WebpackOptionsNormalized;
context: string;
requestShortener: RequestShortener;
cache: Cache;
moduleMemCaches?: Map<
Module,
{
buildInfo: object;
references: WeakMap<Dependency, Module>;
memCache: WeakTupleMap<any, any>;
}
>;
compilerPath: string;
running: boolean;
idle: boolean;
watchMode: boolean;
getCache(name: string): CacheFacade;
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
run(callback: CallbackFunction<Stats>): void;
runAsChild(
callback: (
err?: null | Error,
entries?: Chunk[],
compilation?: Compilation
) => any
): void;
purgeInputFileSystem(): void;
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
emitRecords(callback: CallbackFunction<void>): void;
readRecords(callback: CallbackFunction<void>): void;
createChildCompiler(
compilation: Compilation,
compilerName: string,
compilerIndex: number,
outputOptions?: OutputNormalized,
plugins?: WebpackPluginInstance[]
): Compiler;
isChild(): boolean;
createCompilation(params?: any): Compilation;
newCompilation(params: CompilationParams): Compilation;
createNormalModuleFactory(): NormalModuleFactory;
createContextModuleFactory(): ContextModuleFactory;
newCompilationParams(): {
normalModuleFactory: NormalModuleFactory;
contextModuleFactory: ContextModuleFactory;
};
compile(callback: CallbackFunction<Compilation>): void;
close(callback: CallbackFunction<void>): void;
} |
3,644 | function exports(
options: Configuration,
callback?: CallbackWebpack<Stats>
): Compiler; | interface Configuration {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: false | { [index: string]: any };
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: boolean;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: string;
/**
* References to other configurations to depend on.
*/
dependencies?: string[];
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: string | false;
/**
* The entry point(s) of the compilation.
*/
entry?:
| string
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
| EntryObject
| string[];
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments?: Experiments;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals?:
| string
| RegExp
| ExternalItem[]
| (ExternalItemObjectKnown & ExternalItemObjectUnknown)
| ((
data: ExternalItemFunctionData,
callback: (
err?: Error,
result?: string | boolean | string[] | { [index: string]: any }
) => void
) => void)
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
/**
* Enable presets of externals for specific targets.
*/
externalsPresets?: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?:
| "import"
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "commonjs-static"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system"
| "promise"
| "script"
| "node-commonjs";
/**
* Ignore specific warnings.
*/
ignoreWarnings?: (
| RegExp
| {
/**
* A RegExp to select the origin file for the warning.
*/
file?: RegExp;
/**
* A RegExp to select the warning message.
*/
message?: RegExp;
/**
* A RegExp to select the origin module for the warning.
*/
module?: RegExp;
}
| ((warning: WebpackError, compilation: Compilation) => boolean)
)[];
/**
* Options for infrastructure level logging.
*/
infrastructureLogging?: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: "none" | "development" | "production";
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module?: ModuleOptions;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: string;
/**
* Include polyfills or mocks for various node stuff.
*/
node?: false | NodeOptions;
/**
* Enables/Disables integrated optimizations.
*/
optimization?: Optimization;
/**
* Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output?: Output;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: number;
/**
* Configuration for web performance recommendations.
*/
performance?: false | PerformanceOptions;
/**
* Add additional plugins to the compiler.
*/
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[];
/**
* Capture timing information for each module.
*/
profile?: boolean;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: string | false;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: string | false;
/**
* Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
*/
recordsPath?: string | false;
/**
* Options for the resolver.
*/
resolve?: ResolveOptionsWebpackOptions;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader?: ResolveOptionsWebpackOptions;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot?: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats?:
| boolean
| StatsOptions
| "none"
| "verbose"
| "summary"
| "errors-only"
| "errors-warnings"
| "minimal"
| "normal"
| "detailed";
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: string | false | string[];
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: boolean;
/**
* Options for the watcher.
*/
watchOptions?: WatchOptions;
} |
3,645 | (options: Configuration, callback?: CallbackWebpack<Stats>): Compiler | interface Configuration {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: false | { [index: string]: any };
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: boolean;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: string;
/**
* References to other configurations to depend on.
*/
dependencies?: string[];
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: string | false;
/**
* The entry point(s) of the compilation.
*/
entry?:
| string
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
| EntryObject
| string[];
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments?: Experiments;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals?:
| string
| RegExp
| ExternalItem[]
| (ExternalItemObjectKnown & ExternalItemObjectUnknown)
| ((
data: ExternalItemFunctionData,
callback: (
err?: Error,
result?: string | boolean | string[] | { [index: string]: any }
) => void
) => void)
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
/**
* Enable presets of externals for specific targets.
*/
externalsPresets?: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?:
| "import"
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "commonjs-static"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system"
| "promise"
| "script"
| "node-commonjs";
/**
* Ignore specific warnings.
*/
ignoreWarnings?: (
| RegExp
| {
/**
* A RegExp to select the origin file for the warning.
*/
file?: RegExp;
/**
* A RegExp to select the warning message.
*/
message?: RegExp;
/**
* A RegExp to select the origin module for the warning.
*/
module?: RegExp;
}
| ((warning: WebpackError, compilation: Compilation) => boolean)
)[];
/**
* Options for infrastructure level logging.
*/
infrastructureLogging?: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: "none" | "development" | "production";
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module?: ModuleOptions;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: string;
/**
* Include polyfills or mocks for various node stuff.
*/
node?: false | NodeOptions;
/**
* Enables/Disables integrated optimizations.
*/
optimization?: Optimization;
/**
* Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output?: Output;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: number;
/**
* Configuration for web performance recommendations.
*/
performance?: false | PerformanceOptions;
/**
* Add additional plugins to the compiler.
*/
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[];
/**
* Capture timing information for each module.
*/
profile?: boolean;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: string | false;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: string | false;
/**
* Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
*/
recordsPath?: string | false;
/**
* Options for the resolver.
*/
resolve?: ResolveOptionsWebpackOptions;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader?: ResolveOptionsWebpackOptions;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot?: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats?:
| boolean
| StatsOptions
| "none"
| "verbose"
| "summary"
| "errors-only"
| "errors-warnings"
| "minimal"
| "normal"
| "detailed";
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: string | false | string[];
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: boolean;
/**
* Options for the watcher.
*/
watchOptions?: WatchOptions;
} |
3,646 | (
config: Configuration
) => WebpackOptionsNormalized | interface Configuration {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: false | { [index: string]: any };
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: boolean;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: string;
/**
* References to other configurations to depend on.
*/
dependencies?: string[];
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: string | false;
/**
* The entry point(s) of the compilation.
*/
entry?:
| string
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
| EntryObject
| string[];
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments?: Experiments;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals?:
| string
| RegExp
| ExternalItem[]
| (ExternalItemObjectKnown & ExternalItemObjectUnknown)
| ((
data: ExternalItemFunctionData,
callback: (
err?: Error,
result?: string | boolean | string[] | { [index: string]: any }
) => void
) => void)
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
/**
* Enable presets of externals for specific targets.
*/
externalsPresets?: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?:
| "import"
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "commonjs-static"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system"
| "promise"
| "script"
| "node-commonjs";
/**
* Ignore specific warnings.
*/
ignoreWarnings?: (
| RegExp
| {
/**
* A RegExp to select the origin file for the warning.
*/
file?: RegExp;
/**
* A RegExp to select the warning message.
*/
message?: RegExp;
/**
* A RegExp to select the origin module for the warning.
*/
module?: RegExp;
}
| ((warning: WebpackError, compilation: Compilation) => boolean)
)[];
/**
* Options for infrastructure level logging.
*/
infrastructureLogging?: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: "none" | "development" | "production";
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module?: ModuleOptions;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: string;
/**
* Include polyfills or mocks for various node stuff.
*/
node?: false | NodeOptions;
/**
* Enables/Disables integrated optimizations.
*/
optimization?: Optimization;
/**
* Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output?: Output;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: number;
/**
* Configuration for web performance recommendations.
*/
performance?: false | PerformanceOptions;
/**
* Add additional plugins to the compiler.
*/
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[];
/**
* Capture timing information for each module.
*/
profile?: boolean;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: string | false;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: string | false;
/**
* Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
*/
recordsPath?: string | false;
/**
* Options for the resolver.
*/
resolve?: ResolveOptionsWebpackOptions;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader?: ResolveOptionsWebpackOptions;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot?: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats?:
| boolean
| StatsOptions
| "none"
| "verbose"
| "summary"
| "errors-only"
| "errors-warnings"
| "minimal"
| "normal"
| "detailed";
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: string | false | string[];
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: boolean;
/**
* Options for the watcher.
*/
watchOptions?: WatchOptions;
} |
3,647 | (
options: WebpackOptionsNormalized
) => void | interface WebpackOptionsNormalized {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: false | { [index: string]: any };
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: boolean;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache: CacheOptionsNormalized;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: string;
/**
* References to other configurations to depend on.
*/
dependencies?: string[];
/**
* Options for the webpack-dev-server.
*/
devServer?: DevServer;
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: string | false;
/**
* The entry point(s) of the compilation.
*/
entry: EntryNormalized;
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments: ExperimentsNormalized;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals: Externals;
/**
* Enable presets of externals for specific targets.
*/
externalsPresets: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?:
| "import"
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "commonjs-static"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system"
| "promise"
| "script"
| "node-commonjs";
/**
* Ignore specific warnings.
*/
ignoreWarnings?: ((
warning: WebpackError,
compilation: Compilation
) => boolean)[];
/**
* Options for infrastructure level logging.
*/
infrastructureLogging: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: "none" | "development" | "production";
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module: ModuleOptionsNormalized;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: string;
/**
* Include polyfills or mocks for various node stuff.
*/
node: NodeWebpackOptions;
/**
* Enables/Disables integrated optimizations.
*/
optimization: Optimization;
/**
* Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output: OutputNormalized;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: number;
/**
* Configuration for web performance recommendations.
*/
performance?: false | PerformanceOptions;
/**
* Add additional plugins to the compiler.
*/
plugins: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[];
/**
* Capture timing information for each module.
*/
profile?: boolean;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: string | false;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: string | false;
/**
* Options for the resolver.
*/
resolve: ResolveOptionsWebpackOptions;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader: ResolveOptionsWebpackOptions;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats: StatsValue;
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: string | false | string[];
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: boolean;
/**
* Options for the watcher.
*/
watchOptions: WatchOptions;
} |
3,648 | (
options: WebpackOptionsNormalized
) => void | interface WebpackOptionsNormalized {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: Amd;
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: Bail;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache: CacheOptionsNormalized;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: Context;
/**
* References to other configurations to depend on.
*/
dependencies?: Dependencies;
/**
* Options for the webpack-dev-server.
*/
devServer?: DevServer;
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: DevTool;
/**
* The entry point(s) of the compilation.
*/
entry: EntryNormalized;
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments: ExperimentsNormalized;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals: Externals;
/**
* Enable presets of externals for specific targets.
*/
externalsPresets: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?: ExternalsType;
/**
* Ignore specific warnings.
*/
ignoreWarnings?: IgnoreWarningsNormalized;
/**
* Options for infrastructure level logging.
*/
infrastructureLogging: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: Mode;
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module: ModuleOptionsNormalized;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: Name;
/**
* Include polyfills or mocks for various node stuff.
*/
node: Node;
/**
* Enables/Disables integrated optimizations.
*/
optimization: Optimization;
/**
* Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output: OutputNormalized;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: Parallelism;
/**
* Configuration for web performance recommendations.
*/
performance?: Performance;
/**
* Add additional plugins to the compiler.
*/
plugins: Plugins;
/**
* Capture timing information for each module.
*/
profile?: Profile;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: RecordsInputPath;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: RecordsOutputPath;
/**
* Options for the resolver.
*/
resolve: Resolve;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader: ResolveLoader;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats: StatsValue;
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: Target;
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: Watch;
/**
* Options for the watcher.
*/
watchOptions: WatchOptions;
} |
3,649 | (parserState: ParserState) => void | type ParserState = Record<string, any> & ParserStateBase; |
3,650 | (parserState: ParserState) => boolean | type ParserState = Record<string, any> & ParserStateBase; |
3,651 | (
state: ParserState,
symbol: null | TopLevelSymbol,
usage: string | true | TopLevelSymbol
) => void | type ParserState = Record<string, any> & ParserStateBase; |
3,652 | (
parser: JavascriptParser,
name: string,
usage: string | true | TopLevelSymbol
) => void | class JavascriptParser extends Parser {
constructor(sourceType?: "module" | "auto" | "script");
hooks: Readonly<{
evaluateTypeof: HookMap<
SyncBailHook<
[UnaryExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluate: HookMap<
SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
>;
evaluateIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | MetaProperty | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateDefinedIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateNewExpression: HookMap<
SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
>;
evaluateCallExpression: HookMap<
SyncBailHook<
[CallExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateCallExpressionMember: HookMap<
SyncBailHook<
[CallExpression, undefined | BasicEvaluatedExpression],
undefined | null | BasicEvaluatedExpression
>
>;
isPure: HookMap<
SyncBailHook<
[
(
| UnaryExpression
| ThisExpression
| ArrayExpression
| ObjectExpression
| FunctionExpression
| ArrowFunctionExpression
| YieldExpression
| SimpleLiteral
| RegExpLiteral
| BigIntLiteral
| UpdateExpression
| BinaryExpression
| AssignmentExpression
| LogicalExpression
| MemberExpression
| ConditionalExpression
| SimpleCallExpression
| NewExpression
| SequenceExpression
| TemplateLiteral
| TaggedTemplateExpression
| ClassExpression
| MetaProperty
| Identifier
| AwaitExpression
| ImportExpression
| ChainExpression
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| PrivateIdentifier
),
number
],
boolean | void
>
>;
preStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
blockPreStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statementIf: SyncBailHook<[IfStatement], boolean | void>;
classExtendsExpression: SyncBailHook<
[Expression, ClassExpression | ClassDeclaration],
boolean | void
>;
classBodyElement: SyncBailHook<
[
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
classBodyValue: SyncBailHook<
[
Expression,
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>;
importSpecifier: SyncBailHook<
[ImportDeclaration, ImportSource, string, string],
boolean | void
>;
export: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration],
boolean | void
>;
exportImport: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, ImportSource],
boolean | void
>;
exportDeclaration: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, Declaration],
boolean | void
>;
exportExpression: SyncBailHook<
[ExportDefaultDeclaration, Declaration],
boolean | void
>;
exportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
string,
string,
undefined | number
],
boolean | void
>;
exportImportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
ImportSource,
string,
string,
undefined | number
],
boolean | void
>;
preDeclarator: SyncBailHook<
[VariableDeclarator, Statement],
boolean | void
>;
declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
assignMemberChain: HookMap<
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
>;
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
importCall: SyncBailHook<[Expression], boolean | void>;
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
callMemberChain: HookMap<
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
>;
memberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
callMemberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
expressionMemberChain: HookMap<
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
>;
unhandledExpressionMemberChain: HookMap<
SyncBailHook<[Expression, string[]], boolean | void>
>;
expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
program: SyncBailHook<[Program, Comment[]], boolean | void>;
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
} |
3,653 | (state: ParserState) => void | type ParserState = Record<string, any> & ParserStateBase; |
3,654 | (
state: ParserState,
onUsageCallback: (arg0?: boolean | Set<string>) => void
) => void | type ParserState = Record<string, any> & ParserStateBase; |
3,655 | (
state: ParserState,
symbol: TopLevelSymbol
) => void | type ParserState = Record<string, any> & ParserStateBase; |
3,656 | (
state: ParserState,
symbol: TopLevelSymbol
) => void | class TopLevelSymbol {
constructor(name: string);
name: string;
} |
3,657 | (
state: ParserState
) => void | TopLevelSymbol | type ParserState = Record<string, any> & ParserStateBase; |
3,658 | (
parser: JavascriptParser,
name: string
) => TopLevelSymbol | class JavascriptParser extends Parser {
constructor(sourceType?: "module" | "auto" | "script");
hooks: Readonly<{
evaluateTypeof: HookMap<
SyncBailHook<
[UnaryExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluate: HookMap<
SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
>;
evaluateIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | MetaProperty | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateDefinedIdentifier: HookMap<
SyncBailHook<
[ThisExpression | MemberExpression | Identifier],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateNewExpression: HookMap<
SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
>;
evaluateCallExpression: HookMap<
SyncBailHook<
[CallExpression],
undefined | null | BasicEvaluatedExpression
>
>;
evaluateCallExpressionMember: HookMap<
SyncBailHook<
[CallExpression, undefined | BasicEvaluatedExpression],
undefined | null | BasicEvaluatedExpression
>
>;
isPure: HookMap<
SyncBailHook<
[
(
| UnaryExpression
| ThisExpression
| ArrayExpression
| ObjectExpression
| FunctionExpression
| ArrowFunctionExpression
| YieldExpression
| SimpleLiteral
| RegExpLiteral
| BigIntLiteral
| UpdateExpression
| BinaryExpression
| AssignmentExpression
| LogicalExpression
| MemberExpression
| ConditionalExpression
| SimpleCallExpression
| NewExpression
| SequenceExpression
| TemplateLiteral
| TaggedTemplateExpression
| ClassExpression
| MetaProperty
| Identifier
| AwaitExpression
| ImportExpression
| ChainExpression
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| PrivateIdentifier
),
number
],
boolean | void
>
>;
preStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
blockPreStatement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statement: SyncBailHook<
[
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
],
boolean | void
>;
statementIf: SyncBailHook<[IfStatement], boolean | void>;
classExtendsExpression: SyncBailHook<
[Expression, ClassExpression | ClassDeclaration],
boolean | void
>;
classBodyElement: SyncBailHook<
[
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
classBodyValue: SyncBailHook<
[
Expression,
MethodDefinition | PropertyDefinition,
ClassExpression | ClassDeclaration
],
boolean | void
>;
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>;
importSpecifier: SyncBailHook<
[ImportDeclaration, ImportSource, string, string],
boolean | void
>;
export: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration],
boolean | void
>;
exportImport: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, ImportSource],
boolean | void
>;
exportDeclaration: SyncBailHook<
[ExportNamedDeclaration | ExportAllDeclaration, Declaration],
boolean | void
>;
exportExpression: SyncBailHook<
[ExportDefaultDeclaration, Declaration],
boolean | void
>;
exportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
string,
string,
undefined | number
],
boolean | void
>;
exportImportSpecifier: SyncBailHook<
[
ExportNamedDeclaration | ExportAllDeclaration,
ImportSource,
string,
string,
undefined | number
],
boolean | void
>;
preDeclarator: SyncBailHook<
[VariableDeclarator, Statement],
boolean | void
>;
declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
assignMemberChain: HookMap<
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
>;
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
importCall: SyncBailHook<[Expression], boolean | void>;
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
callMemberChain: HookMap<
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
>;
memberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
callMemberChainOfCallMemberChain: HookMap<
SyncBailHook<
[Expression, string[], CallExpression, string[]],
boolean | void
>
>;
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
expressionMemberChain: HookMap<
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
>;
unhandledExpressionMemberChain: HookMap<
SyncBailHook<[Expression, string[]], boolean | void>
>;
expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
program: SyncBailHook<[Program, Comment[]], boolean | void>;
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
} |
3,659 | (
dependency: Dependency,
usedByExports: boolean | Set<string>,
moduleGraph: ModuleGraph,
runtime: RuntimeSpec
) => boolean | class Dependency {
constructor();
weak: boolean;
optional: boolean;
get type(): string;
get category(): string;
loc: DependencyLocation;
setLoc(
startLine?: any,
startColumn?: any,
endLine?: any,
endColumn?: any
): void;
getContext(): undefined | string;
getResourceIdentifier(): null | string;
couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
/**
* Returns the referenced module and export
*/
getReference(moduleGraph: ModuleGraph): never;
/**
* Returns list of exports referenced by this dependency
*/
getReferencedExports(
moduleGraph: ModuleGraph,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
getCondition(
moduleGraph: ModuleGraph
):
| null
| false
| ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
/**
* Returns the exported names
*/
getExports(moduleGraph: ModuleGraph): undefined | ExportsSpec;
/**
* Returns warnings
*/
getWarnings(moduleGraph: ModuleGraph): WebpackError[];
/**
* Returns errors
*/
getErrors(moduleGraph: ModuleGraph): WebpackError[];
/**
* Update the hash
*/
updateHash(hash: Hash, context: UpdateHashContextDependency): void;
/**
* implement this method to allow the occurrence order plugin to count correctly
*/
getNumberOfIdOccurrences(): number;
getModuleEvaluationSideEffectsState(
moduleGraph: ModuleGraph
): ConnectionState;
createIgnoredModule(context: string): Module;
serialize(__0: { write: any }): void;
deserialize(__0: { read: any }): void;
module: any;
get disconnect(): any;
static NO_EXPORTS_REFERENCED: string[][];
static EXPORTS_OBJECT_REFERENCED: string[][];
static TRANSITIVE: typeof TRANSITIVE;
} |
3,660 | (
dependency: Dependency,
usedByExports: boolean | Set<string>,
moduleGraph: ModuleGraph,
runtime: RuntimeSpec
) => boolean | class ModuleGraph {
constructor();
setParents(
dependency: Dependency,
block: DependenciesBlock,
module: Module,
indexInBlock?: number
): void;
getParentModule(dependency: Dependency): Module;
getParentBlock(dependency: Dependency): DependenciesBlock;
getParentBlockIndex(dependency: Dependency): number;
setResolvedModule(
originModule: Module,
dependency: Dependency,
module: Module
): void;
updateModule(dependency: Dependency, module: Module): void;
removeConnection(dependency: Dependency): void;
addExplanation(dependency: Dependency, explanation: string): void;
cloneModuleAttributes(sourceModule: Module, targetModule: Module): void;
removeModuleAttributes(module: Module): void;
removeAllModuleAttributes(): void;
moveModuleConnections(
oldModule: Module,
newModule: Module,
filterConnection: (arg0: ModuleGraphConnection) => boolean
): void;
copyOutgoingModuleConnections(
oldModule: Module,
newModule: Module,
filterConnection: (arg0: ModuleGraphConnection) => boolean
): void;
addExtraReason(module: Module, explanation: string): void;
getResolvedModule(dependency: Dependency): Module;
getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
getModule(dependency: Dependency): Module;
getOrigin(dependency: Dependency): Module;
getResolvedOrigin(dependency: Dependency): Module;
getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
getIncomingConnectionsByOriginModule(
module: Module
): Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
getOutgoingConnectionsByModule(
module: Module
): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
getProfile(module: Module): null | ModuleProfile;
setProfile(module: Module, profile: null | ModuleProfile): void;
getIssuer(module: Module): null | Module;
setIssuer(module: Module, issuer: null | Module): void;
setIssuerIfUnset(module: Module, issuer: null | Module): void;
getOptimizationBailout(
module: Module
): (string | ((requestShortener: RequestShortener) => string))[];
getProvidedExports(module: Module): null | true | string[];
isExportProvided(
module: Module,
exportName: string | string[]
): null | boolean;
getExportsInfo(module: Module): ExportsInfo;
getExportInfo(module: Module, exportName: string): ExportInfo;
getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
getUsedExports(
module: Module,
runtime: RuntimeSpec
): null | boolean | SortableSet<string>;
getPreOrderIndex(module: Module): number;
getPostOrderIndex(module: Module): number;
setPreOrderIndex(module: Module, index: number): void;
setPreOrderIndexIfUnset(module: Module, index: number): boolean;
setPostOrderIndex(module: Module, index: number): void;
setPostOrderIndexIfUnset(module: Module, index: number): boolean;
getDepth(module: Module): number;
setDepth(module: Module, depth: number): void;
setDepthIfLower(module: Module, depth: number): boolean;
isAsync(module: Module): boolean;
setAsync(module: Module): void;
getMeta(thing?: any): Object;
getMetaIfExisting(thing?: any): Object;
freeze(cacheStage?: string): void;
unfreeze(): void;
cached<T extends any[], V>(
fn: (moduleGraph: ModuleGraph, ...args: T) => V,
...args: T
): V;
setModuleMemCaches(
moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
): void;
dependencyCacheProvide(dependency: Dependency, ...args: any[]): any;
static getModuleGraphForModule(
module: Module,
deprecateMessage: string,
deprecationCode: string
): ModuleGraph;
static setModuleGraphForModule(
module: Module,
moduleGraph: ModuleGraph
): void;
static clearModuleGraphForModule(module: Module): void;
static ModuleGraphConnection: typeof ModuleGraphConnection;
} |
3,661 | (
dependency: Dependency,
usedByExports: boolean | Set<string>,
moduleGraph: ModuleGraph,
runtime: RuntimeSpec
) => boolean | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,662 | (
dependency: Dependency,
usedByExports: boolean | Set<string>,
moduleGraph: ModuleGraph
) =>
| null
| false
| ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState) | class Dependency {
constructor();
weak: boolean;
optional: boolean;
get type(): string;
get category(): string;
loc: DependencyLocation;
setLoc(
startLine?: any,
startColumn?: any,
endLine?: any,
endColumn?: any
): void;
getContext(): undefined | string;
getResourceIdentifier(): null | string;
couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
/**
* Returns the referenced module and export
*/
getReference(moduleGraph: ModuleGraph): never;
/**
* Returns list of exports referenced by this dependency
*/
getReferencedExports(
moduleGraph: ModuleGraph,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
getCondition(
moduleGraph: ModuleGraph
):
| null
| false
| ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
/**
* Returns the exported names
*/
getExports(moduleGraph: ModuleGraph): undefined | ExportsSpec;
/**
* Returns warnings
*/
getWarnings(moduleGraph: ModuleGraph): WebpackError[];
/**
* Returns errors
*/
getErrors(moduleGraph: ModuleGraph): WebpackError[];
/**
* Update the hash
*/
updateHash(hash: Hash, context: UpdateHashContextDependency): void;
/**
* implement this method to allow the occurrence order plugin to count correctly
*/
getNumberOfIdOccurrences(): number;
getModuleEvaluationSideEffectsState(
moduleGraph: ModuleGraph
): ConnectionState;
createIgnoredModule(context: string): Module;
serialize(__0: { write: any }): void;
deserialize(__0: { read: any }): void;
module: any;
get disconnect(): any;
static NO_EXPORTS_REFERENCED: string[][];
static EXPORTS_OBJECT_REFERENCED: string[][];
static TRANSITIVE: typeof TRANSITIVE;
} |
3,663 | (
dependency: Dependency,
usedByExports: boolean | Set<string>,
moduleGraph: ModuleGraph
) =>
| null
| false
| ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState) | class ModuleGraph {
constructor();
setParents(
dependency: Dependency,
block: DependenciesBlock,
module: Module,
indexInBlock?: number
): void;
getParentModule(dependency: Dependency): Module;
getParentBlock(dependency: Dependency): DependenciesBlock;
getParentBlockIndex(dependency: Dependency): number;
setResolvedModule(
originModule: Module,
dependency: Dependency,
module: Module
): void;
updateModule(dependency: Dependency, module: Module): void;
removeConnection(dependency: Dependency): void;
addExplanation(dependency: Dependency, explanation: string): void;
cloneModuleAttributes(sourceModule: Module, targetModule: Module): void;
removeModuleAttributes(module: Module): void;
removeAllModuleAttributes(): void;
moveModuleConnections(
oldModule: Module,
newModule: Module,
filterConnection: (arg0: ModuleGraphConnection) => boolean
): void;
copyOutgoingModuleConnections(
oldModule: Module,
newModule: Module,
filterConnection: (arg0: ModuleGraphConnection) => boolean
): void;
addExtraReason(module: Module, explanation: string): void;
getResolvedModule(dependency: Dependency): Module;
getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
getModule(dependency: Dependency): Module;
getOrigin(dependency: Dependency): Module;
getResolvedOrigin(dependency: Dependency): Module;
getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
getIncomingConnectionsByOriginModule(
module: Module
): Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
getOutgoingConnectionsByModule(
module: Module
): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
getProfile(module: Module): null | ModuleProfile;
setProfile(module: Module, profile: null | ModuleProfile): void;
getIssuer(module: Module): null | Module;
setIssuer(module: Module, issuer: null | Module): void;
setIssuerIfUnset(module: Module, issuer: null | Module): void;
getOptimizationBailout(
module: Module
): (string | ((requestShortener: RequestShortener) => string))[];
getProvidedExports(module: Module): null | true | string[];
isExportProvided(
module: Module,
exportName: string | string[]
): null | boolean;
getExportsInfo(module: Module): ExportsInfo;
getExportInfo(module: Module, exportName: string): ExportInfo;
getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
getUsedExports(
module: Module,
runtime: RuntimeSpec
): null | boolean | SortableSet<string>;
getPreOrderIndex(module: Module): number;
getPostOrderIndex(module: Module): number;
setPreOrderIndex(module: Module, index: number): void;
setPreOrderIndexIfUnset(module: Module, index: number): boolean;
setPostOrderIndex(module: Module, index: number): void;
setPostOrderIndexIfUnset(module: Module, index: number): boolean;
getDepth(module: Module): number;
setDepth(module: Module, depth: number): void;
setDepthIfLower(module: Module, depth: number): boolean;
isAsync(module: Module): boolean;
setAsync(module: Module): void;
getMeta(thing?: any): Object;
getMetaIfExisting(thing?: any): Object;
freeze(cacheStage?: string): void;
unfreeze(): void;
cached<T extends any[], V>(
fn: (moduleGraph: ModuleGraph, ...args: T) => V,
...args: T
): V;
setModuleMemCaches(
moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
): void;
dependencyCacheProvide(dependency: Dependency, ...args: any[]): any;
static getModuleGraphForModule(
module: Module,
deprecateMessage: string,
deprecationCode: string
): ModuleGraph;
static setModuleGraphForModule(
module: Module,
moduleGraph: ModuleGraph
): void;
static clearModuleGraphForModule(module: Module): void;
static ModuleGraphConnection: typeof ModuleGraphConnection;
} |
3,664 | (a: Chunk, b: Chunk) => 0 | 1 | -1 | class Chunk {
constructor(name?: string, backCompat?: boolean);
id: null | string | number;
ids: null | (string | number)[];
debugId: number;
name: string;
idNameHints: SortableSet<string>;
preventIntegration: boolean;
filenameTemplate:
| null
| string
| ((arg0: PathData, arg1?: AssetInfo) => string);
cssFilenameTemplate:
| null
| string
| ((arg0: PathData, arg1?: AssetInfo) => string);
runtime: RuntimeSpec;
files: Set<string>;
auxiliaryFiles: Set<string>;
rendered: boolean;
hash?: string;
contentHash: Record<string, string>;
renderedHash?: string;
chunkReason?: string;
extraAsync: boolean;
get entryModule(): Module;
hasEntryModule(): boolean;
addModule(module: Module): boolean;
removeModule(module: Module): void;
getNumberOfModules(): number;
get modulesIterable(): Iterable<Module>;
compareTo(otherChunk: Chunk): 0 | 1 | -1;
containsModule(module: Module): boolean;
getModules(): Module[];
remove(): void;
moveModule(module: Module, otherChunk: Chunk): void;
integrate(otherChunk: Chunk): boolean;
canBeIntegrated(otherChunk: Chunk): boolean;
isEmpty(): boolean;
modulesSize(): number;
size(options?: ChunkSizeOptions): number;
integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number;
getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps;
hasModuleInGraph(
filterFn: (m: Module) => boolean,
filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): boolean;
getChunkMaps(realHash: boolean): ChunkMaps;
hasRuntime(): boolean;
canBeInitial(): boolean;
isOnlyInitial(): boolean;
getEntryOptions(): undefined | EntryOptions;
addGroup(chunkGroup: ChunkGroup): void;
removeGroup(chunkGroup: ChunkGroup): void;
isInGroup(chunkGroup: ChunkGroup): boolean;
getNumberOfGroups(): number;
get groupsIterable(): Iterable<ChunkGroup>;
disconnectFromGroups(): void;
split(newChunk: Chunk): void;
updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
getAllAsyncChunks(): Set<Chunk>;
getAllInitialChunks(): Set<Chunk>;
getAllReferencedChunks(): Set<Chunk>;
getAllReferencedAsyncEntrypoints(): Set<Entrypoint>;
hasAsyncChunks(): boolean;
getChildIdsByOrders(
chunkGraph: ChunkGraph,
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string, (string | number)[]>;
getChildrenOfTypeInOrder(
chunkGraph: ChunkGraph,
type: string
): { onChunks: Chunk[]; chunks: Set<Chunk> }[];
getChildIdsByOrdersMap(
chunkGraph: ChunkGraph,
includeDirectChildren?: boolean,
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string | number, Record<string, (string | number)[]>>;
} |
3,665 | (
a: Module,
b: Module
) => 0 | 1 | -1 | interface Module {
hot: webpack.Hot;
} |
3,666 | (
a: Module,
b: Module
) => 0 | 1 | -1 | class Module extends DependenciesBlock {
constructor(type: string, context?: string, layer?: string);
type: string;
context: null | string;
layer: null | string;
needId: boolean;
debugId: number;
resolveOptions: ResolveOptionsWebpackOptions;
factoryMeta?: object;
useSourceMap: boolean;
useSimpleSourceMap: boolean;
buildMeta: BuildMeta;
buildInfo: Record<string, any>;
presentationalDependencies?: Dependency[];
codeGenerationDependencies?: Dependency[];
id: string | number;
get hash(): string;
get renderedHash(): string;
profile: null | ModuleProfile;
index: number;
index2: number;
depth: number;
issuer: null | Module;
get usedExports(): null | boolean | SortableSet<string>;
get optimizationBailout(): (
| string
| ((requestShortener: RequestShortener) => string)
)[];
get optional(): boolean;
addChunk(chunk?: any): boolean;
removeChunk(chunk?: any): void;
isInChunk(chunk?: any): boolean;
isEntryModule(): boolean;
getChunks(): Chunk[];
getNumberOfChunks(): number;
get chunksIterable(): Iterable<Chunk>;
isProvided(exportName: string): null | boolean;
get exportsArgument(): string;
get moduleArgument(): string;
getExportsType(
moduleGraph: ModuleGraph,
strict: boolean
): "namespace" | "default-only" | "default-with-named" | "dynamic";
addPresentationalDependency(presentationalDependency: Dependency): void;
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
addWarning(warning: WebpackError): void;
getWarnings(): undefined | Iterable<WebpackError>;
getNumberOfWarnings(): number;
addError(error: WebpackError): void;
getErrors(): undefined | Iterable<WebpackError>;
getNumberOfErrors(): number;
/**
* removes all warnings and errors
*/
clearWarningsAndErrors(): void;
isOptional(moduleGraph: ModuleGraph): boolean;
isAccessibleInChunk(
chunkGraph: ChunkGraph,
chunk: Chunk,
ignoreChunk?: Chunk
): boolean;
isAccessibleInChunkGroup(
chunkGraph: ChunkGraph,
chunkGroup: ChunkGroup,
ignoreChunk?: Chunk
): boolean;
hasReasonForChunk(
chunk: Chunk,
moduleGraph: ModuleGraph,
chunkGraph: ChunkGraph
): boolean;
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
needBuild(
context: NeedBuildContext,
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
): void;
needRebuild(
fileTimestamps: Map<string, null | number>,
contextTimestamps: Map<string, null | number>
): boolean;
invalidateBuild(): void;
identifier(): string;
readableIdentifier(requestShortener: RequestShortener): string;
build(
options: WebpackOptionsNormalized,
compilation: Compilation,
resolver: ResolverWithOptions,
fs: InputFileSystem,
callback: (arg0?: WebpackError) => void
): void;
getSourceTypes(): Set<string>;
source(
dependencyTemplates: DependencyTemplates,
runtimeTemplate: RuntimeTemplate,
type?: string
): Source;
size(type?: string): number;
libIdent(options: LibIdentOptions): null | string;
nameForCondition(): null | string;
getConcatenationBailoutReason(
context: ConcatenationBailoutReasonContext
): undefined | string;
getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
hasChunkCondition(): boolean;
/**
* Assuming this module is in the cache. Update the (cached) module with
* the fresh module from the factory. Usually updates internal references
* and properties.
*/
updateCacheModule(module: Module): void;
/**
* Module should be unsafe cached. Get data that's needed for that.
* This data will be passed to restoreFromUnsafeCache later.
*/
getUnsafeCacheData(): object;
/**
* Assuming this module is in the cache. Remove internal references to allow freeing some memory.
*/
cleanupForCache(): void;
originalSource(): null | Source;
addCacheDependencies(
fileDependencies: LazySet<string>,
contextDependencies: LazySet<string>,
missingDependencies: LazySet<string>,
buildDependencies: LazySet<string>
): void;
get hasEqualsChunks(): any;
get isUsed(): any;
get errors(): any;
get warnings(): any;
used: any;
} |
3,667 | (
chunkGraph: ChunkGraph
) => Comparator<Chunk> | class ChunkGraph {
constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
moduleGraph: ModuleGraph;
connectChunkAndModule(chunk: Chunk, module: Module): void;
disconnectChunkAndModule(chunk: Chunk, module: Module): void;
disconnectChunk(chunk: Chunk): void;
attachModules(chunk: Chunk, modules: Iterable<Module>): void;
attachRuntimeModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
attachFullHashModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
attachDependentHashModules(
chunk: Chunk,
modules: Iterable<RuntimeModule>
): void;
replaceModule(oldModule: Module, newModule: Module): void;
isModuleInChunk(module: Module, chunk: Chunk): boolean;
isModuleInChunkGroup(module: Module, chunkGroup: ChunkGroup): boolean;
isEntryModule(module: Module): boolean;
getModuleChunksIterable(module: Module): Iterable<Chunk>;
getOrderedModuleChunksIterable(
module: Module,
sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1
): Iterable<Chunk>;
getModuleChunks(module: Module): Chunk[];
getNumberOfModuleChunks(module: Module): number;
getModuleRuntimes(module: Module): RuntimeSpecSet;
getNumberOfChunkModules(chunk: Chunk): number;
getNumberOfChunkFullHashModules(chunk: Chunk): number;
getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
getChunkModulesIterableBySourceType(
chunk: Chunk,
sourceType: string
): undefined | Iterable<Module>;
setChunkModuleSourceTypes(
chunk: Chunk,
module: Module,
sourceTypes: Set<string>
): void;
getChunkModuleSourceTypes(chunk: Chunk, module: Module): Set<string>;
getModuleSourceTypes(module: Module): Set<string>;
getOrderedChunkModulesIterable(
chunk: Chunk,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): Iterable<Module>;
getOrderedChunkModulesIterableBySourceType(
chunk: Chunk,
sourceType: string,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): undefined | Iterable<Module>;
getChunkModules(chunk: Chunk): Module[];
getOrderedChunkModules(
chunk: Chunk,
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
): Module[];
getChunkModuleIdMap(
chunk: Chunk,
filterFn: (m: Module) => boolean,
includeAllChunks?: boolean
): Record<string | number, (string | number)[]>;
getChunkModuleRenderedHashMap(
chunk: Chunk,
filterFn: (m: Module) => boolean,
hashLength?: number,
includeAllChunks?: boolean
): Record<string | number, Record<string | number, string>>;
getChunkConditionMap(
chunk: Chunk,
filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): Record<string | number, boolean>;
hasModuleInGraph(
chunk: Chunk,
filterFn: (m: Module) => boolean,
filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
): boolean;
compareChunks(chunkA: Chunk, chunkB: Chunk): 0 | 1 | -1;
getChunkModulesSize(chunk: Chunk): number;
getChunkModulesSizes(chunk: Chunk): Record<string, number>;
getChunkRootModules(chunk: Chunk): Module[];
getChunkSize(chunk: Chunk, options?: ChunkSizeOptions): number;
getIntegratedChunksSize(
chunkA: Chunk,
chunkB: Chunk,
options?: ChunkSizeOptions
): number;
canChunksBeIntegrated(chunkA: Chunk, chunkB: Chunk): boolean;
integrateChunks(chunkA: Chunk, chunkB: Chunk): void;
upgradeDependentToFullHashModules(chunk: Chunk): void;
isEntryModuleInChunk(module: Module, chunk: Chunk): boolean;
connectChunkAndEntryModule(
chunk: Chunk,
module: Module,
entrypoint?: Entrypoint
): void;
connectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
addFullHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
addDependentHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
disconnectChunkAndEntryModule(chunk: Chunk, module: Module): void;
disconnectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
disconnectEntryModule(module: Module): void;
disconnectEntries(chunk: Chunk): void;
getNumberOfEntryModules(chunk: Chunk): number;
getNumberOfRuntimeModules(chunk: Chunk): number;
getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
hasChunkEntryDependentChunks(chunk: Chunk): boolean;
getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
getChunkFullHashModulesIterable(
chunk: Chunk
): undefined | Iterable<RuntimeModule>;
getChunkFullHashModulesSet(
chunk: Chunk
): undefined | ReadonlySet<RuntimeModule>;
getChunkDependentHashModulesIterable(
chunk: Chunk
): undefined | Iterable<RuntimeModule>;
getChunkEntryModulesWithChunkGroupIterable(
chunk: Chunk
): Iterable<[Module, undefined | Entrypoint]>;
getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
connectBlockAndChunkGroup(
depBlock: AsyncDependenciesBlock,
chunkGroup: ChunkGroup
): void;
disconnectChunkGroup(chunkGroup: ChunkGroup): void;
getModuleId(module: Module): string | number;
setModuleId(module: Module, id: string | number): void;
getRuntimeId(runtime: string): string | number;
setRuntimeId(runtime: string, id: string | number): void;
hasModuleHashes(module: Module, runtime: RuntimeSpec): boolean;
getModuleHash(module: Module, runtime: RuntimeSpec): string;
getRenderedModuleHash(module: Module, runtime: RuntimeSpec): string;
setModuleHashes(
module: Module,
runtime: RuntimeSpec,
hash: string,
renderedHash: string
): void;
addModuleRuntimeRequirements(
module: Module,
runtime: RuntimeSpec,
items: Set<string>,
transferOwnership?: boolean
): void;
addChunkRuntimeRequirements(chunk: Chunk, items: Set<string>): void;
addTreeRuntimeRequirements(chunk: Chunk, items: Iterable<string>): void;
getModuleRuntimeRequirements(
module: Module,
runtime: RuntimeSpec
): ReadonlySet<string>;
getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
getModuleGraphHash(
module: Module,
runtime: RuntimeSpec,
withConnections?: boolean
): string;
getModuleGraphHashBigInt(
module: Module,
runtime: RuntimeSpec,
withConnections?: boolean
): bigint;
getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
static getChunkGraphForModule(
module: Module,
deprecateMessage: string,
deprecationCode: string
): ChunkGraph;
static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void;
static clearChunkGraphForModule(module: Module): void;
static getChunkGraphForChunk(
chunk: Chunk,
deprecateMessage: string,
deprecationCode: string
): ChunkGraph;
static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void;
static clearChunkGraphForChunk(chunk: Chunk): void;
} |
3,668 | (
a: DependencyLocation,
b: DependencyLocation
) => 0 | 1 | -1 | type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation; |
3,669 | (
compilation: Compilation,
name: string,
options?: EntryOptions
) => RuntimeSpec | class Compilation {
/**
* Creates an instance of Compilation.
*/
constructor(compiler: Compiler, params: CompilationParams);
hooks: Readonly<{
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<[Dependency, EntryOptions]>;
failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
dependencyReferencedExports: SyncWaterfallHook<
[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
>;
executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
prepareModuleExecution: AsyncParallelHook<
[ExecuteModuleArgument, ExecuteModuleContext]
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInChunk: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
additionalModuleRuntimeRequirements: SyncHook<
[Module, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any>
>;
additionalTreeRuntimeRequirements: SyncHook<
[Chunk, Set<string>, RuntimeRequirementsContext]
>;
runtimeRequirementInTree: HookMap<
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
additionalAssets: FakeHook<
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>;
optimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
afterOptimizeChunkAssets: FakeHook<
Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"name" | "tap" | "tapAsync" | "tapPromise"
>
>;
optimizeAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterOptimizeAssets: SyncHook<[CompilationAssets]>;
processAssets: AsyncSeriesHook<
[CompilationAssets],
ProcessAssetsAdditionalOptions
>;
afterProcessAssets: SyncHook<[CompilationAssets]>;
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
[RenderManifestEntry[], RenderManifestOptions]
>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
>;
statsNormalize: SyncHook<
[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
>;
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
}>;
name?: string;
startTime: any;
endTime: any;
compiler: Compiler;
resolverFactory: ResolverFactory;
inputFileSystem: InputFileSystem;
fileSystemInfo: FileSystemInfo;
valueCacheVersions: Map<string, string | Set<string>>;
requestShortener: RequestShortener;
compilerPath: string;
logger: WebpackLogger;
options: WebpackOptionsNormalized;
outputOptions: OutputNormalized;
bail: boolean;
profile: boolean;
params: CompilationParams;
mainTemplate: MainTemplate;
chunkTemplate: ChunkTemplate;
runtimeTemplate: RuntimeTemplate;
moduleTemplates: { javascript: ModuleTemplate };
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
moduleGraph: ModuleGraph;
chunkGraph: ChunkGraph;
codeGenerationResults: CodeGenerationResults;
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
addModuleQueue: AsyncQueue<Module, string, Module>;
factorizeQueue: AsyncQueue<
FactorizeModuleOptions,
string,
Module | ModuleFactoryResult
>;
buildQueue: AsyncQueue<Module, Module, Module>;
rebuildQueue: AsyncQueue<Module, Module, Module>;
/**
* Modules in value are building during the build of Module in key.
* Means value blocking key from finishing.
* Needed to detect build cycles.
*/
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
entries: Map<string, EntryData>;
globalEntry: EntryData;
entrypoints: Map<string, Entrypoint>;
asyncEntrypoints: Entrypoint[];
chunks: Set<Chunk>;
chunkGroups: ChunkGroup[];
namedChunkGroups: Map<string, ChunkGroup>;
namedChunks: Map<string, Chunk>;
modules: Set<Module>;
records: any;
additionalChunkAssets: string[];
assets: CompilationAssets;
assetsInfo: Map<string, AssetInfo>;
errors: WebpackError[];
warnings: WebpackError[];
children: Compilation[];
logging: Map<string, LogEntry[]>;
dependencyFactories: Map<DepConstructor, ModuleFactory>;
dependencyTemplates: DependencyTemplates;
childrenCounters: object;
usedChunkIds: Set<string | number>;
usedModuleIds: Set<number>;
needAdditionalPass: boolean;
builtModules: WeakSet<Module>;
codeGeneratedModules: WeakSet<Module>;
buildTimeExecutedModules: WeakSet<Module>;
emittedAssets: Set<string>;
comparedForEmitAssets: Set<string>;
fileDependencies: LazySet<string>;
contextDependencies: LazySet<string>;
missingDependencies: LazySet<string>;
buildDependencies: LazySet<string>;
compilationDependencies: { add: (item?: any) => LazySet<string> };
getStats(): Stats;
createStatsOptions(
optionsOrPreset: string | StatsOptions,
context?: CreateStatsOptionsContext
): NormalizedStatsOptions;
createStatsFactory(options?: any): StatsFactory;
createStatsPrinter(options?: any): StatsPrinter;
getCache(name: string): CacheFacade;
getLogger(name: string | (() => string)): WebpackLogger;
addModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
/**
* Fetches a module from a compilation by its identifier
*/
getModule(module: Module): Module;
/**
* Attempts to search for a module by its identifier
*/
findModule(identifier: string): undefined | Module;
/**
* Schedules a build of the module object
*/
buildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependencies(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
processModuleDependenciesNonRecursive(module: Module): void;
handleModuleCreation(
__0: HandleModuleCreationOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleChain(
context: string,
dependency: Dependency,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addModuleTree(
__0: {
/**
* context string path
*/
context: string;
/**
* dependency used to create Module chain
*/
dependency: Dependency;
/**
* additional context info for the root module
*/
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
},
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addEntry(
context: string,
entry: Dependency,
optionsOrName: string | EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
addInclude(
context: string,
dependency: Dependency,
options: EntryOptions,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
rebuildModule(
module: Module,
callback: (err?: null | WebpackError, result?: Module) => void
): void;
finish(callback?: any): void;
unseal(): void;
seal(callback: (err?: null | WebpackError) => void): void;
reportDependencyErrorsAndWarnings(
module: Module,
blocks: DependenciesBlock[]
): boolean;
codeGeneration(callback?: any): void;
processRuntimeRequirements(__0?: {
/**
* the chunk graph
*/
chunkGraph?: ChunkGraph;
/**
* modules
*/
modules?: Iterable<Module>;
/**
* chunks
*/
chunks?: Iterable<Chunk>;
/**
* codeGenerationResults
*/
codeGenerationResults?: CodeGenerationResults;
/**
* chunkGraphEntries
*/
chunkGraphEntries?: Iterable<Chunk>;
}): void;
addRuntimeModule(
chunk: Chunk,
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,
module: Module,
loc: DependencyLocation,
request: string
): Entrypoint;
/**
* This method first looks to see if a name is provided for a new chunk,
* and first looks to see if any named chunks already exist and reuse that chunk instead.
*/
addChunk(name?: string): Chunk;
assignDepth(module: Module): void;
assignDepths(modules: Set<Module>): void;
getDependencyReferencedExports(
dependency: Dependency,
runtime: RuntimeSpec
): (string[] | ReferencedExport)[];
removeReasonsOfDependencyBlock(
module: Module,
block: DependenciesBlockLike
): void;
patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
assignRuntimeIds(): void;
sortItemsWithChunkIds(): void;
summarizeDependencies(): void;
createModuleHashes(): void;
createHash(): {
module: Module;
hash: string;
runtime: RuntimeSpec;
runtimes: RuntimeSpec[];
}[];
fullHash?: string;
hash?: string;
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
updateAsset(
file: string,
newSourceOrFunction: Source | ((arg0: Source) => Source),
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
): void;
renameAsset(file?: any, newFile?: any): void;
deleteAsset(file: string): void;
getAssets(): Readonly<Asset>[];
getAsset(name: string): undefined | Readonly<Asset>;
clearAssets(): void;
createModuleAssets(): void;
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
getPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): string;
getPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data?: PathData
): { path: string; info: AssetInfo };
getAssetPath(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): string;
getAssetPathWithInfo(
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
data: PathData
): { path: string; info: AssetInfo };
getWarnings(): WebpackError[];
getErrors(): WebpackError[];
/**
* This function allows you to run another instance of webpack inside of webpack however as
* a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
* from parent (or top level compiler) and creates a child Compilation
*/
createChildCompiler(
name: string,
outputOptions?: OutputNormalized,
plugins?: (
| ((this: Compiler, compiler: Compiler) => void)
| WebpackPluginInstance
)[]
): Compiler;
executeModule(
module: Module,
options: ExecuteModuleOptions,
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
): void;
checkConstraints(): void;
factorizeModule: {
(
options: FactorizeModuleOptions & { factoryResult?: false },
callback: (err?: null | WebpackError, result?: Module) => void
): void;
(
options: FactorizeModuleOptions & { factoryResult: true },
callback: (
err?: null | WebpackError,
result?: ModuleFactoryResult
) => void
): void;
};
/**
* Add additional assets to the compilation.
*/
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
/**
* Basic preprocessing of assets.
*/
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
/**
* Derive new assets from existing assets.
* Existing assets should not be treated as complete.
*/
static PROCESS_ASSETS_STAGE_DERIVED: number;
/**
* Add additional sections to existing assets, like a banner or initialization code.
*/
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
/**
* Optimize existing assets in a general way.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
/**
* Optimize the count of existing assets, e. g. by merging them.
* Only assets of the same type should be merged.
* For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
/**
* Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
/**
* Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
/**
* Add development tooling to assets, e. g. by extracting a SourceMap.
*/
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
/**
* Optimize the count of existing assets, e. g. by inlining assets of into other assets.
* Only assets of different types should be inlined.
* For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
/**
* Summarize the list of existing assets
* e. g. creating an assets manifest of Service Workers.
*/
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
/**
* Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
/**
* Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
*/
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
/**
* Analyse existing assets.
*/
static PROCESS_ASSETS_STAGE_ANALYSE: number;
/**
* Creating assets for reporting purposes.
*/
static PROCESS_ASSETS_STAGE_REPORT: number;
} |
3,670 | (
compilation: Compilation,
name: string,
options?: EntryOptions
) => RuntimeSpec | type EntryOptions = { name?: string } & Omit<
EntryDescriptionNormalized,
"import"
>; |
3,671 | (
runtime: RuntimeSpec,
fn: (arg0: string) => void,
deterministicOrder?: boolean
) => void | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,672 | (runtime: RuntimeSpec) => string | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,673 | (
runtimeCondition: RuntimeCondition
) => string | type RuntimeCondition = undefined | string | boolean | SortableSet<string>; |
3,674 | (a: RuntimeSpec, b: RuntimeSpec) => boolean | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,675 | (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1 | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,676 | (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,677 | (
a: RuntimeCondition,
b: RuntimeCondition,
runtime: RuntimeSpec
) => RuntimeCondition | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,678 | (
a: RuntimeCondition,
b: RuntimeCondition,
runtime: RuntimeSpec
) => RuntimeCondition | type RuntimeCondition = undefined | string | boolean | SortableSet<string>; |
3,679 | (
a: RuntimeSpec,
b: RuntimeSpec
) => RuntimeSpec | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,680 | (
runtime: RuntimeSpec,
filter: (arg0: RuntimeSpec) => boolean
) => undefined | string | boolean | SortableSet<string> | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,681 | (arg0: RuntimeSpec) => boolean | type RuntimeSpec = undefined | string | SortableSet<string>; |
3,682 | (
Constructor: Constructor,
request: string,
name: string,
serializer: ObjectSerializer
) => void | interface ObjectSerializer {
serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
deserialize: (arg0: ObjectDeserializerContext) => any;
} |
3,683 | (
Constructor: Constructor,
request: string,
name: string,
serializer: ObjectSerializer
) => void | interface Constructor {
new (...params: any[]): any;
} |
3,684 | (Constructor: Constructor) => void | interface Constructor {
new (...params: any[]): any;
} |
3,685 | (
this: Compiler,
compiler: Compiler
) => void | class Compiler {
constructor(context: string, options?: WebpackOptionsNormalized);
hooks: Readonly<{
initialize: SyncHook<[]>;
shouldEmit: SyncBailHook<[Compilation], boolean>;
done: AsyncSeriesHook<[Stats]>;
afterDone: SyncHook<[Stats]>;
additionalPass: AsyncSeriesHook<[]>;
beforeRun: AsyncSeriesHook<[Compiler]>;
run: AsyncSeriesHook<[Compiler]>;
emit: AsyncSeriesHook<[Compilation]>;
assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
afterEmit: AsyncSeriesHook<[Compilation]>;
thisCompilation: SyncHook<[Compilation, CompilationParams]>;
compilation: SyncHook<[Compilation, CompilationParams]>;
normalModuleFactory: SyncHook<[NormalModuleFactory]>;
contextModuleFactory: SyncHook<[ContextModuleFactory]>;
beforeCompile: AsyncSeriesHook<[CompilationParams]>;
compile: SyncHook<[CompilationParams]>;
make: AsyncParallelHook<[Compilation]>;
finishMake: AsyncParallelHook<[Compilation]>;
afterCompile: AsyncSeriesHook<[Compilation]>;
readRecords: AsyncSeriesHook<[]>;
emitRecords: AsyncSeriesHook<[]>;
watchRun: AsyncSeriesHook<[Compiler]>;
failed: SyncHook<[Error]>;
invalid: SyncHook<[null | string, number]>;
watchClose: SyncHook<[]>;
shutdown: AsyncSeriesHook<[]>;
infrastructureLog: SyncBailHook<[string, string, any[]], true>;
environment: SyncHook<[]>;
afterEnvironment: SyncHook<[]>;
afterPlugins: SyncHook<[Compiler]>;
afterResolvers: SyncHook<[Compiler]>;
entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
}>;
webpack: typeof exports;
name?: string;
parentCompilation?: Compilation;
root: Compiler;
outputPath: string;
watching: Watching;
outputFileSystem: OutputFileSystem;
intermediateFileSystem: IntermediateFileSystem;
inputFileSystem: InputFileSystem;
watchFileSystem: WatchFileSystem;
recordsInputPath: null | string;
recordsOutputPath: null | string;
records: object;
managedPaths: Set<string | RegExp>;
immutablePaths: Set<string | RegExp>;
modifiedFiles: ReadonlySet<string>;
removedFiles: ReadonlySet<string>;
fileTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
contextTimestamps: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
fsStartTime: number;
resolverFactory: ResolverFactory;
infrastructureLogger: any;
options: WebpackOptionsNormalized;
context: string;
requestShortener: RequestShortener;
cache: Cache;
moduleMemCaches?: Map<
Module,
{
buildInfo: object;
references: WeakMap<Dependency, Module>;
memCache: WeakTupleMap<any, any>;
}
>;
compilerPath: string;
running: boolean;
idle: boolean;
watchMode: boolean;
getCache(name: string): CacheFacade;
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
run(callback: CallbackFunction<Stats>): void;
runAsChild(
callback: (
err?: null | Error,
entries?: Chunk[],
compilation?: Compilation
) => any
): void;
purgeInputFileSystem(): void;
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
emitRecords(callback: CallbackFunction<void>): void;
readRecords(callback: CallbackFunction<void>): void;
createChildCompiler(
compilation: Compilation,
compilerName: string,
compilerIndex: number,
outputOptions?: OutputNormalized,
plugins?: WebpackPluginInstance[]
): Compiler;
isChild(): boolean;
createCompilation(params?: any): Compilation;
newCompilation(params: CompilationParams): Compilation;
createNormalModuleFactory(): NormalModuleFactory;
createContextModuleFactory(): ContextModuleFactory;
newCompilationParams(): {
normalModuleFactory: NormalModuleFactory;
contextModuleFactory: ContextModuleFactory;
};
compile(callback: CallbackFunction<Compilation>): void;
close(callback: CallbackFunction<void>): void;
} |
3,686 | getOptions(schema: Schema): OptionsType | type Schema = Parameters<typeof validate>[0]; |
3,687 | getResolve(
options?: ResolveOptionsWithDependencyType
): ((context: string, request: string, callback: ResolveCallback) => void) &
((context: string, request: string) => Promise<string>) | type ResolveOptionsWithDependencyType = ResolveOptionsWebpackOptions & {
dependencyType?: string;
resolveToContext?: boolean;
}; |
3,688 | (
data: ExternalItemFunctionData,
callback: (err?: Error, result?: ExternalItemValue) => void
) => void | interface ExternalItemFunctionData {
/**
* The directory in which the request is placed.
*/
context?: string;
/**
* Contextual information.
*/
contextInfo?: ModuleFactoryCreateDataContextInfo;
/**
* The category of the referencing dependencies.
*/
dependencyType?: string;
/**
* Get a resolve function with the current resolver options.
*/
getResolve?: (
options?: ResolveOptionsWebpackOptions
) =>
| ((
context: string,
request: string,
callback: (err?: Error, result?: string) => void
) => void)
| ((context: string, request: string) => Promise<string>);
/**
* The request as written by the user in the require/import expression/statement.
*/
request?: string;
} |
3,689 | (
data: ExternalItemFunctionData,
callback: (err?: Error, result?: ExternalItemValue) => void
) => void | interface ExternalItemFunctionData {
/**
* The directory in which the request is placed.
*/
context?: string;
/**
* Contextual information.
*/
contextInfo?: import |
3,690 | (
data: ExternalItemFunctionData,
callback: (err?: Error, result?: ExternalItemValue) => void
) => void | type ExternalItemValue = string | boolean | string[] | { [index: string]: any }; |
3,691 | (
data: ExternalItemFunctionData,
callback: (err?: Error, result?: ExternalItemValue) => void
) => void | type ExternalItemValue =
| string[]
| boolean
| string
| {
[k: string]: any;
}; |
3,692 | (err?: Error, result?: ExternalItemValue) => void | type ExternalItemValue = string | boolean | string[] | { [index: string]: any }; |
3,693 | (err?: Error, result?: ExternalItemValue) => void | type ExternalItemValue =
| string[]
| boolean
| string
| {
[k: string]: any;
}; |
3,694 | (
request: import("enhanced-resolve").ResolveRequest
) => boolean | type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>; |
3,695 | (
err?: Error,
api?: import("../lib/hmr/LazyCompilationPlugin").BackendApi
) => void | interface BackendApi {
dispose: (arg0?: Error) => void;
module: (arg0: Module) => { client: string; data: string; active: boolean };
} |
3,696 | (options: import("../declarations/WebpackOptions").WebpackOptions) => boolean | interface WebpackOptions {
/**
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
*/
amd?: Amd;
/**
* Report the first error as a hard error instead of tolerating it.
*/
bail?: Bail;
/**
* Cache generated modules and chunks to improve performance for multiple incremental builds.
*/
cache?: CacheOptions;
/**
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
*/
context?: Context;
/**
* References to other configurations to depend on.
*/
dependencies?: Dependencies;
/**
* Options for the webpack-dev-server.
*/
devServer?: DevServer;
/**
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
*/
devtool?: DevTool;
/**
* The entry point(s) of the compilation.
*/
entry?: Entry;
/**
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
*/
experiments?: Experiments;
/**
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
*/
externals?: Externals;
/**
* Enable presets of externals for specific targets.
*/
externalsPresets?: ExternalsPresets;
/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
externalsType?: ExternalsType;
/**
* Ignore specific warnings.
*/
ignoreWarnings?: IgnoreWarnings;
/**
* Options for infrastructure level logging.
*/
infrastructureLogging?: InfrastructureLogging;
/**
* Custom values available in the loader context.
*/
loader?: Loader;
/**
* Enable production optimizations or development hints.
*/
mode?: Mode;
/**
* Options affecting the normal modules (`NormalModuleFactory`).
*/
module?: ModuleOptions;
/**
* Name of the configuration. Used when loading multiple configurations.
*/
name?: Name;
/**
* Include polyfills or mocks for various node stuff.
*/
node?: Node;
/**
* Enables/Disables integrated optimizations.
*/
optimization?: Optimization;
/**
* Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
*/
output?: Output;
/**
* The number of parallel processed modules in the compilation.
*/
parallelism?: Parallelism;
/**
* Configuration for web performance recommendations.
*/
performance?: Performance;
/**
* Add additional plugins to the compiler.
*/
plugins?: Plugins;
/**
* Capture timing information for each module.
*/
profile?: Profile;
/**
* Store compiler state to a json file.
*/
recordsInputPath?: RecordsInputPath;
/**
* Load compiler state from a json file.
*/
recordsOutputPath?: RecordsOutputPath;
/**
* Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
*/
recordsPath?: RecordsPath;
/**
* Options for the resolver.
*/
resolve?: Resolve;
/**
* Options for the resolver when resolving loaders.
*/
resolveLoader?: ResolveLoader;
/**
* Options affecting how file system snapshots are created and validated.
*/
snapshot?: SnapshotOptions;
/**
* Stats options object or preset name.
*/
stats?: StatsValue;
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
target?: Target;
/**
* Enter watch mode, which rebuilds on file change.
*/
watch?: Watch;
/**
* Options for the watcher.
*/
watchOptions?: WatchOptions;
} |
3,697 | (options: import("../../declarations/plugins/IgnorePlugin").IgnorePluginOptions) => boolean | type IgnorePluginOptions =
| {
/**
* A RegExp to test the context (directory) against.
*/
contextRegExp?: RegExp;
/**
* A RegExp to test the request against.
*/
resourceRegExp: RegExp;
}
| {
/**
* A filter function for resource and context.
*/
checkResource: (resource: string, context: string) => boolean;
}; |
3,698 | (options: import("../../declarations/plugins/IgnorePlugin").IgnorePluginOptions) => boolean | type IgnorePluginOptions =
| {
/**
* A RegExp to test the context (directory) against.
*/
contextRegExp?: RegExp;
/**
* A RegExp to test the request against.
*/
resourceRegExp: RegExp;
}
| {
/**
* A filter function for resource and context.
*/
checkResource: (resource: string, context: string) => boolean;
}; |
3,699 | (options: import("../../declarations/plugins/DllReferencePlugin").DllReferencePluginOptions) => boolean | type DllReferencePluginOptions =
| {
/**
* Context of requests in the manifest (or content property) as absolute path.
*/
context?: string;
/**
* Extensions used to resolve modules in the dll bundle (only used when using 'scope').
*/
extensions?: string[];
/**
* An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation.
*/
manifest: string | DllReferencePluginOptionsManifest;
/**
* The name where the dll is exposed (external name, defaults to manifest.name).
*/
name?: string;
/**
* Prefix which is used for accessing the content of the dll.
*/
scope?: string;
/**
* How the dll is exposed (libraryTarget, defaults to manifest.type).
*/
sourceType?:
| "var"
| "assign"
| "this"
| "window"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system";
/**
* The way how the export of the dll bundle is used.
*/
type?: "object" | "require";
}
| {
/**
* The mappings from request to module info.
*/
content: DllReferencePluginOptionsContent;
/**
* Context of requests in the manifest (or content property) as absolute path.
*/
context?: string;
/**
* Extensions used to resolve modules in the dll bundle (only used when using 'scope').
*/
extensions?: string[];
/**
* The name where the dll is exposed (external name).
*/
name: string;
/**
* Prefix which is used for accessing the content of the dll.
*/
scope?: string;
/**
* How the dll is exposed (libraryTarget).
*/
sourceType?:
| "var"
| "assign"
| "this"
| "window"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system";
/**
* The way how the export of the dll bundle is used.
*/
type?: "object" | "require";
}; |