new Compilation(compiler, params): CompilationCompilerCompilationParamsCompilationCreates an instance of Compilation.
string[]AsyncQueue<Module, string, Module>CompilationAssetsEntrypoint[]booleanAsyncQueue<Module, Module, Module>Compilation[]ChunkGraphChunkGroup[]ChunkTemplateCodeGenerationResultsCompilerstringMap<DependencyConstructor, ModuleFactory>DependencyTemplatesnumberMap<string, Entrypoint>Error[]AsyncQueue<FactorizeModuleOptions, string, Module | ModuleFactoryResult>FileSystemInfostringEntryDatastringReadonly<{ addEntry: SyncHook<[Dependency, EntryOptions]>; additionalAssets: FakeHook<Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">>; additionalChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>]>, "name" | "tap" | "tapAsync" | "tapPromise">>; additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>, RuntimeRequirementsContext]>; additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>, RuntimeRequirementsContext]>; additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>, RuntimeRequirementsContext]>; afterChunks: SyncHook<[Iterable<Chunk>]>; afterCodeGeneration: SyncHook<[]>; afterHash: SyncHook<[]>; afterModuleHash: SyncHook<[]>; afterOptimizeAssets: SyncHook<[CompilationAssets]>; afterOptimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>]>, "name" | "tap" | "tapAsync" | "tapPromise">>; afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>; afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>; afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>; afterOptimizeDependencies: SyncHook<[Iterable<Module>]>; afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>; afterOptimizeModules: SyncHook<[Iterable<Module>]>; afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>; afterProcessAssets: SyncHook<[CompilationAssets]>; afterRuntimeRequirements: SyncHook<[]>; afterSeal: AsyncSeriesHook<[]>; assetPath: SyncWaterfallHook<[string, PathData, undefined | AssetInfo], string>; beforeChunkAssets: SyncHook<[]>; beforeChunkIds: SyncHook<[Iterable<Chunk>]>; beforeChunks: SyncHook<[]>; beforeCodeGeneration: SyncHook<[]>; beforeHash: SyncHook<[]>; beforeModuleAssets: SyncHook<[]>; beforeModuleHash: SyncHook<[]>; beforeModuleIds: SyncHook<[Iterable<Module>]>; beforeRuntimeRequirements: SyncHook<[]>; buildModule: SyncHook<[Module]>; childCompiler: SyncHook<[Compiler, string, number]>; chunkAsset: SyncHook<[Chunk, string]>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>; chunkIds: SyncHook<[Iterable<Chunk>]>; contentHash: SyncHook<[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>]>; finishRebuildingModule: AsyncSeriesHook<[Module]>; fullHash: SyncHook<[Hash]>; log: SyncBailHook<[string, LogEntry], boolean | void>; moduleAsset: SyncHook<[Module, string]>; moduleIds: SyncHook<[Iterable<Module>]>; needAdditionalPass: SyncBailHook<[], boolean | void>; needAdditionalSeal: SyncBailHook<[], boolean | void>; normalModuleLoader: SyncHook<[AnyLoaderContext, NormalModule]>; optimize: SyncHook<[]>; optimizeAssets: AsyncSeriesHook<[CompilationAssets], ProcessAssetsAdditionalOptions>; optimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>]>, "name" | "tap" | "tapAsync" | "tapPromise">>; optimizeChunkIds: SyncHook<[Iterable<Chunk>]>; optimizeChunkModules: AsyncSeriesBailHook<[Iterable<Chunk>, Iterable<Module>], void>; optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], boolean | void>; optimizeCodeGeneration: SyncHook<[Iterable<Module>]>; optimizeDependencies: SyncBailHook<[Iterable<Module>], boolean | void>; optimizeModuleIds: SyncHook<[Iterable<Module>]>; optimizeModules: SyncBailHook<[Iterable<Module>], boolean | void>; optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>; prepareModuleExecution: AsyncParallelHook<[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<Chunk>, Records]>; recordHash: SyncHook<[Records]>; recordModules: SyncHook<[Iterable<Module>, Records]>; renderManifest: SyncWaterfallHook<[RenderManifestEntry[], RenderManifestOptions], RenderManifestEntry[]>; reviveChunks: SyncHook<[Iterable<Chunk>, Records]>; reviveModules: SyncHook<[Iterable<Module>, Records]>; runtimeModule: SyncHook<[RuntimeModule, Chunk]>; runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>>; runtimeRequirementInModule: HookMap<SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], void>>; runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>>; seal: SyncHook<[]>; shouldGenerateChunkAssets: SyncBailHook<[], boolean | void>; shouldRecord: SyncBailHook<[], boolean | void>; statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>; statsNormalize: SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>; statsPreset: HookMap<SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>>; statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>; stillValidModule: SyncHook<[Module]>; succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>; succeedModule: SyncHook<[Module]>; unseal: SyncHook<[]> }>InputFileSystemWebpackLoggerMainTemplateModuleGraphMap<Module, WeakTupleMap<any[], any>>Map<Module, WeakTupleMap<any[], any>>ModuleTemplatesstringMap<string, ChunkGroup>booleanOutputNormalizedWithDefaultsCompilationParamsAsyncQueue<Module, Module, Module>booleanAsyncQueue<Module, Module, Module>Records | nullRequestShortenerResolverFactoryRuntimeTemplatenumberMap<string, ValueCacheVersion>Error[]numbernumbernumbernumbernumbernumbernumbernumbernumbernumbernumbernumbernumbernumbernumberaddAsyncEntrypoint(options, module, loc, request): EntrypointEntryOptionsModulestringEntrypointAdds 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?): ChunkGroupstring | ChunkGroupOptionsModulestringChunkGroupIf module is passed, loc and request must also be passed.
addEntry(context, entry, optionsOrName, callback): voidstringDependencystring | EntryOptions(err?: WebpackError | null, result?: Module | null) => voidvoidAdds the provided string to the compilation.
addInclude(context, dependency, options, callback): voidstringDependencyEntryOptions(err?: WebpackError | null, result?: Module | null) => voidvoidAdds the provided string to the compilation.
addModule(module, callback): voidModule(err?: WebpackError | null, result?: Module | null) => voidvoidAdds the provided module to the compilation.
addModuleChain(context, dependency, callback): voidstringDependency(err?: WebpackError | null, result?: Module | null) => voidvoidAdds the provided string to the compilation.
addModuleTree({ context, dependency, contextInfo }, callback): voidstringPartial<ModuleFactoryCreateDataContextInfo>Dependency(err?: WebpackError | null, result?: Module | null) => voidvoidAdds the provided object to the compilation.
addRuntimeModule(chunk, module, chunkGraph?): voidChunkRuntimeModuleChunkGraphvoidAdds runtime module.
assignDepth(module): voidProcesses the provided module.
assignDepths(modules): voidAssigns depth values to the provided modules.
assignRuntimeIds(): voidvoidbuildModule(module, callback): voidModule(err?: WebpackError | null, result?: Module | null) => voidvoidSchedules a build of the module object
checkConstraints(): voidvoidclearAssets(): voidvoidcodeGeneration(callback): void(err?: WebpackError | null) => voidvoidGenerates code and runtime requirements for this module.
createChildCompiler(name, outputOptions?, plugins?): CompilerstringPartial<OutputNormalized>(false | "" | 0 | ((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance | null | undefined)[]CompilerThis 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): void(err?: WebpackError | null) => voidvoidCreates a chunk assets.
createHash(): CodeGenerationJob[]CodeGenerationJob[]createModuleAssets(): voidvoidcreateModuleHashes(): voidvoidcreateStatsFactory(options): StatsFactoryNormalizedStatsOptionsStatsFactoryCreates a stats factory.
createStatsOptions(optionsOrPreset?, context?): NormalizedStatsOptionsstring | boolean | StatsOptionsCreateStatsOptionsContextNormalizedStatsOptionsCreates a stats options.
createStatsPrinter(options): StatsPrinterNormalizedStatsOptionsStatsPrinterCreates a stats printer.
deleteAsset(file): voidProcesses the provided file.
emitAsset(file, source, assetInfo?): voidProcesses the provided file.
executeModule(module, options, callback): voidModuleExecuteModuleOptions(err?: WebpackError | null, result?: ExecuteModuleResult | null) => voidvoidProcesses the provided module.
factorizeModule(options, callback): voidFactorizeModuleOptions & { factoryResult?: false }(err?: WebpackError | null, result?: Module | null) => voidvoidProcesses the provided |.
FactorizeModuleOptions & { factoryResult: true }(err?: WebpackError | null, result?: ModuleFactoryResult | null) => voidvoidProcesses the provided |.
findModule(identifier): Module | undefinedAttempts to search for a module by its identifier
finish(callback): void(err?: WebpackError | null) => voidvoidProcesses the provided callback.
getAsset(name): Readonly<Asset> | undefinedReturns the asset or undefined when not found.
getAssetPath(filename, data): stringstring | TemplatePathFn<T>TstringReturns interpolated path.
getAssetPathWithInfo(filename, data): InterpolatedPathAndAssetInfostring | TemplatePathFn<T>TInterpolatedPathAndAssetInfoGets asset path with info.
getAssets(): Readonly<Asset>[]Readonly<Asset>[]getCache(name): CacheFacadestringCacheFacadeReturns the cache facade instance.
getDependencyReferencedExports(dependency, runtime): (string[] | ReferencedExport)[]DependencyRuntimeSpec(string[] | ReferencedExport)[]Gets dependency referenced exports.
getErrors(): Error[]Error[]getLogger(name): WebpackLoggerWebpackLoggerReturns a logger with that name.
getModule(module): ModuleFetches a module from a compilation by its identifier
getPath(filename, data?): stringstring | TemplatePathFn<T>TstringReturns interpolated path.
getPathWithInfo(filename, data?): InterpolatedPathAndAssetInfostring | TemplatePathFn<T>TInterpolatedPathAndAssetInfoGets path with info.
getRenderManifest(options): RenderManifestEntry[]RenderManifestOptionsRenderManifestEntry[]Gets render manifest.
getStats(): StatsStatsgetWarnings(): Error[]Error[]handleModuleCreation(handleModuleCreationOptions, callback): voidHandleModuleCreationOptions(err?: WebpackError | null, result?: Module | null) => voidvoidHandle module creation.
patchChunksAfterReasonRemoval(module, chunk): voidPatch chunks after reason removal.
processModuleDependencies(module, callback): voidModule(err?: WebpackError | null, result?: Module | null) => voidvoidProcess module dependencies.
processModuleDependenciesNonRecursive(module): voidProcess module dependencies non recursive.
processRuntimeRequirements({ chunkGraph?, modules?, chunks?, codeGenerationResults?, chunkGraphEntries }?): voidProcess runtime requirements.
rebuildModule(module, callback): voidModule(err?: WebpackError | null, result?: Module | null) => voidvoidProcesses the provided module.
removeChunkFromDependencies(block, chunk): voidRemoves chunk from dependencies.
removeReasonsOfDependencyBlock(module, block): voidModuleDependenciesBlockLikevoidRemoves reasons of dependency block.
renameAsset(file, newFile): voidProcesses the provided file.
reportDependencyErrorsAndWarnings(module, blocks): booleanModuleDependenciesBlock[]booleanReport dependency errors and warnings.
seal
seal(callback): void(err?: WebpackError | null) => voidvoidProcesses the provided callback.
sortItemsWithChunkIds(): voidvoidsummarizeDependencies(): voidvoidunseal(): voidvoidupdateAsset(file, newSourceOrFunction, assetInfoUpdateOrFunction?): voidUpdates asset using the provided file.
[index: {string}]Source
KnownCreateStatsOptionsContext & Record<string, any>AsyncDependenciesBlock[]Dependency[]Dependency[]Dependency[]EntryOptions"module" | "chunk" | "root-of-chunk" | "nested"EntryOptionsProcesses the provided factorize module option.
stringPartial<ModuleFactoryCreateDataContextInfo>ModuleProfileDependency[]ModuleFactorybooleanModule | nullbooleanbooleanstringPartial<ModuleFactoryCreateDataContextInfo>Dependency[]ModuleFactoryModule | nullbooleanbooleanstring | falsenumberbooleanbooleanbooleanbooleannumberbooleanstring | falsenumberstring | falsestringbooleanboolean | "auto"((value: string, asset: StatsAsset) => boolean)[]((name: string, module: StatsModule, type: ExcludeModulesType) => boolean)[]booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanfalse | "error" | "warn" | "info" | "log" | "none" | "verbose"booleanstring | falsenumberstring | falsenumberbooleanRequestShortenerboolean((warning: StatsError, textValue: string) => boolean)[]ModuleTemplateKnownNormalizedStatsOptions & 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 | ((assets: CompilationAssets) => void)ChunkGraphCodeGenerationResultsRecord<string, ExecuteModuleObject>((options: ExecuteOptions) => void)[]