new Compilation(compiler, params): Compilation<Compiler><CompilationParams><Compilation>Creates an instance of Compilation.
<string><AsyncQueue><CompilationAssets><Map><string>
,
<AssetInfo>
><Entrypoint><boolean><AsyncQueue><Compilation><ChunkGraph><ChunkGroup><ChunkTemplate><CodeGenerationResults><Compiler><string><Map><DependencyTemplates><number><Map><string>
,
<EntryData>
><Map><string>
,
<Entrypoint>
><Error><AsyncQueue><FileSystemInfo><string><EntryData><string><>
<
<[Dependency, EntryOptions]>; additionalAssets: FakeHook>
<
<Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
>>; additionalChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set
<>
<
<[]>; afterHash: SyncHook<[]>; afterModuleHash: SyncHook<[]>; afterOptimizeAssets: SyncHook<[CompilationAssets]>
>; afterOptimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set
<>
<
<[CompilationAssets]>; afterRuntimeRequirements: SyncHook<[]>; afterSeal: AsyncSeriesHook<[]>; assetPath: SyncWaterfallHook<[string, PathData, undefined | AssetInfo]>
,
<string>; beforeChunkAssets: SyncHook<[]>
>; beforeChunkIds: SyncHook<[Iterable
<>
<
<[]>; beforeCodeGeneration: SyncHook<[]>; beforeHash: SyncHook<[]>; beforeModuleAssets: SyncHook<[]>; beforeModuleHash: SyncHook<[]>
>; beforeModuleIds: SyncHook<[Iterable
<>
<
<[]>; buildModule: SyncHook<[Module]>; childCompiler: SyncHook<[Compiler, string, number]>; chunkAsset: SyncHook<[Chunk, string]>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>
>; chunkIds: SyncHook<[Iterable
<>
<
<[Chunk]>; dependencyReferencedExports: SyncWaterfallHook<[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]>
,
<(string[] | ReferencedExport)[]>; executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>; failedEntry: SyncHook<[Dependency, EntryOptions, Error]>; failedModule: SyncHook<[Module, WebpackError]>
>; finishModules: AsyncSeriesHook<[Iterable
<>
<
<[Module]>; fullHash: SyncHook<[Hash]>; log: SyncBailHook<[string, LogEntry]>
,
<boolean>
|
<void>; moduleAsset: SyncHook<[Module, string]>
>; moduleIds: SyncHook<[Iterable
<>
<
<[]>
,
<boolean>
|
<void>; needAdditionalSeal: SyncBailHook<[]>
,
<boolean>
|
<void>; normalModuleLoader: SyncHook<[AnyLoaderContext, NormalModule]>; optimize: SyncHook<[]>; optimizeAssets: AsyncSeriesHook<[CompilationAssets]>
,
<ProcessAssetsAdditionalOptions>
>; optimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set
<>
<
<[ExecuteModuleArgument, ExecuteModuleContext]>; processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>; processAssets: AsyncSeriesHook<[CompilationAssets]>
,
<ProcessAssetsAdditionalOptions>; processErrors: SyncWaterfallHook<[Error[]]>
,
<Error[]>; processWarnings: SyncWaterfallHook<[Error[]]>
,
<Error[]>; rebuildModule: SyncHook<[Module]>; record: SyncHook<[Compilation, Records]>
>; recordChunks: SyncHook<[Iterable
<>
<
<[Records]>
>; recordModules: SyncHook<[Iterable
<>
<
<[RenderManifestEntry[], RenderManifestOptions]>
,
<RenderManifestEntry>
[]>; reviveChunks: SyncHook<[Iterable
<>
<
<[RuntimeModule, Chunk]>
>; runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set
<>
<
<[]>; shouldGenerateChunkAssets: SyncBailHook<[]>
,
<boolean>
|
<void>; shouldRecord: SyncBailHook<[]>
,
<boolean>
|
<void>; statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>
>; statsNormalize: SyncHook<[Partial
<InputFileSystem><WebpackLogger><Map><string>
,
<LogEntry>
[]><MainTemplate><ModuleGraph><Map><Map><ModuleTemplates><string><Map><string>
,
<ChunkGroup>
><boolean><OutputNormalizedWithDefaults><CompilationParams><AsyncQueue><boolean><AsyncQueue><RequestShortener><ResolverFactory><RuntimeTemplate><number><Map><string>
,
<ValueCacheVersion>
><Error><number><number><number><number><number><number><number><number><number><number><number><number><number><number><number>addAsyncEntrypoint(options, module, loc, request): Entrypoint<EntryOptions><Module><string><Entrypoint>Adds the provided async entrypoint to this chunk group.
addChunk(name?): ChunkThis 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.
addChunkInGroup(groupOptions, module?, loc?, request?): ChunkGroup<string>
|
<ChunkGroupOptions><Module><string><ChunkGroup>If module is passed, loc and request must also be passed.
addEntry(context, entry, optionsOrName, callback): void<string><Dependency><string>
|
<EntryOptions><void>Adds the provided string to the compilation.
addInclude(context, dependency, options, callback): void<string><Dependency><EntryOptions><void>Adds the provided string to the compilation.
addModule(module, callback): voidAdds the provided module to the compilation.
addModuleChain(context, dependency, callback): void<string><Dependency><WebpackError>
|
<null>
, result?:
<Module>
|
<null>
) =>
<void>
callback for when module chain is complete<void>Adds the provided string to the compilation.
addModuleTree({ context, dependency, contextInfo }, callback): void<string><Dependency><WebpackError>
|
<null>
, result?:
<Module>
|
<null>
) =>
<void>
callback for when module chain is complete<void>Adds the provided object to the compilation.
addRuntimeModule(chunk, module, chunkGraph?): void<Chunk><RuntimeModule><ChunkGraph><void>Adds runtime module.
assignDepth(module): voidProcesses the provided module.
assignDepths(modules): voidmodules{Module[] | Set} modules to assign depth - Returns:
<void>
Assigns depth values to the provided modules.
assignRuntimeIds(): void<void>buildModule(module, callback): voidSchedules a build of the module object
checkConstraints(): void<void>clearAssets(): void<void>codeGeneration(callback): voidcallback(err?:<WebpackError>|<null>) =><void>callback- Returns:
<void>
Generates code and runtime requirements for this module.
createChildCompiler(name, outputOptions?, plugins?): Compiler<string><Compiler>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
createChunkAssets(callback): voidcallback(err?:<WebpackError>|<null>) =><void>signals when the call finishes- Returns:
<void>
Creates a chunk assets.
createHash(): CodeGenerationJob<CodeGenerationJob>createModuleAssets(): void<void>createModuleHashes(): void<void>createStatsFactory(options): StatsFactory<NormalizedStatsOptions><StatsFactory>Creates a stats factory.
createStatsOptions(optionsOrPreset?, context?): NormalizedStatsOptions<string>
|
<boolean>
|
<StatsOptions><CreateStatsOptionsContext><NormalizedStatsOptions>Creates a stats options.
createStatsPrinter(options): StatsPrinter<NormalizedStatsOptions><StatsPrinter>Creates a stats printer.
deleteAsset(file): voidProcesses the provided file.
emitAsset(file, source, assetInfo?): void<string><Source><AssetInfo><void>Processes the provided file.
executeModule(module, options, callback): voidProcesses the provided module.
factorizeModule(options, callback): voidoptions{FactorizeModuleOptions & { factoryResult?: false }} optionscallback(err?:<WebpackError>|<null>, result?:<Module>|<null>) =><void>callback- Returns:
<void>
Processes the provided |.
options{FactorizeModuleOptions & { factoryResult: true }} optionscallback(err?:<WebpackError>|<null>, result?:<ModuleFactoryResult>|<null>) =><void>callback- Returns:
<void>
Processes the provided |.
findModule(identifier): Module | undefined<string><Module>
|
<undefined>Attempts to search for a module by its identifier
finish(callback): voidcallback(err?:<WebpackError>|<null>) =><void>callback- Returns:
<void>
Processes the provided callback.
getAsset(name): Readonly<Asset> | undefined<string>Returns the asset or undefined when not found.
getAssetPath(filename, data): voidfilename{string | TemplatePathFn} used to get asset path with hash data{T} context data- Returns:
<string>interpolated path
Returns interpolated path.
getAssetPathWithInfo(filename, data): voidfilename{string | TemplatePathFn} used to get asset path with hash data{T} context data- Returns:
<InterpolatedPathAndAssetInfo>interpolated path and asset info
Gets asset path with info.
getAssets(): Readonly<Asset>[]getCache(name): CacheFacade<string><CacheFacade>Returns the cache facade instance.
getDependencyReferencedExports(dependency, runtime): (string[] | ReferencedExport)[]<Dependency><RuntimeSpec>Gets dependency referenced exports.
getErrors(): Error<Error>getLogger(name): WebpackLogger<WebpackLogger>Returns a logger with that name.
getModule(module): ModuleFetches a module from a compilation by its identifier
getPath(filename, data?): voidfilename{string | TemplatePathFn} used to get asset path with hash data{T} context data- Returns:
<string>interpolated path
Returns interpolated path.
getPathWithInfo(filename, data?): voidfilename{string | TemplatePathFn} used to get asset path with hash data{T} context data- Returns:
<InterpolatedPathAndAssetInfo>interpolated path and asset info
Gets path with info.
getRenderManifest(options): RenderManifestEntry<RenderManifestOptions><RenderManifestEntry>Gets render manifest.
getStats(): Stats<Stats>getWarnings(): Error<Error>handleModuleCreation(handleModuleCreationOptions, callback): voidHandle module creation.
patchChunksAfterReasonRemoval(module, chunk): voidPatch chunks after reason removal.
processModuleDependencies(module, callback): voidProcess module dependencies.
processModuleDependenciesNonRecursive(module): voidProcess module dependencies non recursive.
processRuntimeRequirements({ chunkGraph?, modules?, chunks?, codeGenerationResults?, chunkGraphEntries }?): void<ChunkGraph><Iterable><Iterable><CodeGenerationResults><Iterable><void>Process runtime requirements.
rebuildModule(module, callback): voidProcesses the provided module.
removeChunkFromDependencies(block, chunk): voidRemoves chunk from dependencies.
removeReasonsOfDependencyBlock(module, block): void<Module><DependenciesBlockLike><void>Removes reasons of dependency block.
renameAsset(file, newFile): voidProcesses the provided file.
reportDependencyErrorsAndWarnings(module, blocks): boolean<Module><DependenciesBlock><boolean>Report dependency errors and warnings.
seal
seal(callback): voidcallback(err?:<WebpackError>|<null>) =><void>signals when the call finishes- Returns:
<void>
Processes the provided callback.
sortItemsWithChunkIds(): void<void>summarizeDependencies(): void<void>unseal(): void<void>updateAsset(file, newSourceOrFunction, assetInfoUpdateOrFunction?): void<string><Source><AssetInfo><AssetInfo>
) =>
<AssetInfo>
|
<undefined>
new asset info or function converting old to new<void>Updates asset using the provided file.
[index: {string}]<Source>
<AsyncDependenciesBlock><Dependency><Dependency><Dependency><EntryOptions><"module">
|
<"chunk">
|
<"root-of-chunk">
|
<"nested"><WebpackRequire><Chunk><ChunkGraph><EntryOptions>assets{Map<string, { info?: AssetInfo; source: Source }>}buildDependencies{LazySet} cacheable<boolean>contextDependencies{LazySet} exports<any>fileDependencies{LazySet} missingDependencies{LazySet}
Processes the provided factorize module option.
<string><ModuleProfile><Dependency><ModuleFactory><boolean><boolean><boolean><string><Dependency><ModuleFactory><boolean><boolean><string>
|
<false><number><boolean><boolean><boolean><boolean><number><boolean><string>
|
<false><number><string>
|
<false><string><boolean><boolean>
|
<"auto"><boolean><boolean><boolean><boolean><boolean><boolean><boolean><boolean><boolean><boolean><false>
|
<"error">
|
<"warn">
|
<"info">
|
<"log">
|
<"none">
|
<"verbose"><boolean><string>
|
<false><number><string>
|
<false><number><boolean><RequestShortener><boolean><ModuleTemplate><Omit>
<
<StatsOptions>
,
<"context">
|
<"chunkGroups">
|
<"requestShortener">
|
<"chunksSort">
|
<"modulesSort">
|
<"chunkModulesSort">
|
<"nestedModulesSort">
|
<"assetsSort">
|
<"ids">
|
<"cachedAssets">
|
<"groupAssetsByEmitStatus">
|
<"groupAssetsByPath">
|
<"groupAssetsByExtension">
|
<"assetsSpace">
|
<"excludeAssets">
|
<"excludeModules">
|
<"warningsFilter">
|
<"cachedModules">
|
<"orphanModules">
|
<"dependentModules">
|
<"runtimeModules">
|
<"groupModulesByCacheStatus">
|
<"groupModulesByLayer">
|
<"groupModulesByAttributes">
|
<"groupModulesByPath">
|
<"groupModulesByExtension">
|
<"groupModulesByType">
|
<"entrypoints">
|
<"chunkGroupAuxiliary">
|
<"chunkGroupChildren">
|
<"chunkGroupMaxAssets">
|
<"modulesSpace">
|
<"chunkModulesSpace">
|
<"nestedModulesSpace">
|
<"logging">
|
<"loggingDebug">
|
<"loggingTrace">
|
<"_env">
> &
<Record>
<
<string>
,
<any>
><boolean><CompilationAssets>
) =>
<void><ChunkGraph><CodeGenerationResults>c<Record><<string>,<ExecuteModuleObject>>i{((options: ExecuteOptions) => void)[]}