Skip to main content
webpack / Compilation

Class: Compilation

Defined in: webpack/types.d.ts:2233

Constructors

Constructor

new Compilation(compiler, params): Compilation
Defined in: webpack/types.d.ts:2237 Creates an instance of Compilation.

Parameters

compiler
Compiler
params
CompilationParams

Returns

Compilation

Properties

additionalChunkAssets

additionalChunkAssets: string[]
Defined in: webpack/types.d.ts:2463

addModuleQueue

addModuleQueue: AsyncQueue<Module, string, Module>
Defined in: webpack/types.d.ts:2438

assets

assets: CompilationAssets
Defined in: webpack/types.d.ts:2464

assetsInfo

assetsInfo: Map<string, AssetInfo>
Defined in: webpack/types.d.ts:2465

asyncEntrypoints

asyncEntrypoints: Entrypoint[]
Defined in: webpack/types.d.ts:2456

bail

bail: boolean
Defined in: webpack/types.d.ts:2425

buildDependencies

buildDependencies: LazySet<string>
Defined in: webpack/types.d.ts:2484

buildQueue

buildQueue: AsyncQueue<Module, Module, Module>
Defined in: webpack/types.d.ts:2444

buildTimeExecutedModules

buildTimeExecutedModules: WeakSet<Module>
Defined in: webpack/types.d.ts:2478

builtModules

builtModules: WeakSet<Module>
Defined in: webpack/types.d.ts:2476

children

children: Compilation[]
Defined in: webpack/types.d.ts:2468

childrenCounters

childrenCounters: Record<string, number>
Defined in: webpack/types.d.ts:2472

chunkGraph

chunkGraph: ChunkGraph
Defined in: webpack/types.d.ts:2435

chunkGroups

chunkGroups: ChunkGroup[]
Defined in: webpack/types.d.ts:2458

chunks

chunks: Set<Chunk>
Defined in: webpack/types.d.ts:2457

chunkTemplate

chunkTemplate: ChunkTemplate
Defined in: webpack/types.d.ts:2429

codeGeneratedModules

codeGeneratedModules: WeakSet<Module>
Defined in: webpack/types.d.ts:2477

codeGenerationResults?

optional codeGenerationResults: CodeGenerationResults
Defined in: webpack/types.d.ts:2436

comparedForEmitAssets

comparedForEmitAssets: Set<string>
Defined in: webpack/types.d.ts:2480

compilationDependencies

compilationDependencies: object
Defined in: webpack/types.d.ts:2489

add()

add: (item) => LazySet<string>
Parameters
item
string
Returns
LazySet<string>

Deprecated


compiler

compiler: Compiler
Defined in: webpack/types.d.ts:2415

compilerPath

compilerPath: string
Defined in: webpack/types.d.ts:2421

contextDependencies

contextDependencies: LazySet<string>
Defined in: webpack/types.d.ts:2482

creatingModuleDuringBuild

creatingModuleDuringBuild: WeakMap<Module, Set<Module>>
Defined in: webpack/types.d.ts:2452 Modules in value are building during the build of Module in key. Means value blocking key from finishing. Needed to detect build cycles.

dependencyFactories

dependencyFactories: Map<DependencyConstructor, ModuleFactory>
Defined in: webpack/types.d.ts:2470

dependencyTemplates

dependencyTemplates: DependencyTemplates
Defined in: webpack/types.d.ts:2471

emittedAssets

emittedAssets: Set<string>
Defined in: webpack/types.d.ts:2479

endTime?

optional endTime: number
Defined in: webpack/types.d.ts:2414

entries

entries: Map<string, EntryData>
Defined in: webpack/types.d.ts:2453

entrypoints

entrypoints: Map<string, Entrypoint>
Defined in: webpack/types.d.ts:2455

errors

errors: Error[]
Defined in: webpack/types.d.ts:2466

factorizeQueue

factorizeQueue: AsyncQueue<FactorizeModuleOptions, string, Module | ModuleFactoryResult>
Defined in: webpack/types.d.ts:2439

fileDependencies

fileDependencies: LazySet<string>
Defined in: webpack/types.d.ts:2481

fileSystemInfo

fileSystemInfo: FileSystemInfo
Defined in: webpack/types.d.ts:2418

fullHash?

optional fullHash: string
Defined in: webpack/types.d.ts:2657

globalEntry

globalEntry: EntryData
Defined in: webpack/types.d.ts:2454

hash?

optional hash: string
Defined in: webpack/types.d.ts:2658

hooks

hooks: Readonly<{ 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>; 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<[]>; get normalModuleLoader(): SyncHook<[AnyLoaderContext, NormalModule]>; }>
Defined in: webpack/types.d.ts:2238

inputFileSystem

inputFileSystem: InputFileSystem
Defined in: webpack/types.d.ts:2417

logger

logger: WebpackLogger
Defined in: webpack/types.d.ts:2422

logging

logging: Map<string, LogEntry[]>
Defined in: webpack/types.d.ts:2469

mainTemplate

mainTemplate: MainTemplate
Defined in: webpack/types.d.ts:2428

missingDependencies

missingDependencies: LazySet<string>
Defined in: webpack/types.d.ts:2483

moduleGraph

moduleGraph: ModuleGraph
Defined in: webpack/types.d.ts:2434

moduleMemCaches?

optional moduleMemCaches: Map<Module, WeakTupleMap<any[], any>>
Defined in: webpack/types.d.ts:2432

moduleMemCaches2?

optional moduleMemCaches2: Map<Module, WeakTupleMap<any[], any>>
Defined in: webpack/types.d.ts:2433

modules

modules: Set<Module>
Defined in: webpack/types.d.ts:2461

moduleTemplates

moduleTemplates: ModuleTemplates
Defined in: webpack/types.d.ts:2431

name?

optional name: string
Defined in: webpack/types.d.ts:2412

namedChunkGroups

namedChunkGroups: Map<string, ChunkGroup>
Defined in: webpack/types.d.ts:2459

namedChunks

namedChunks: Map<string, Chunk>
Defined in: webpack/types.d.ts:2460

needAdditionalPass

needAdditionalPass: boolean
Defined in: webpack/types.d.ts:2475

options

options: WebpackOptionsNormalizedWithDefaults
Defined in: webpack/types.d.ts:2423

outputOptions

outputOptions: OutputNormalizedWithDefaults
Defined in: webpack/types.d.ts:2424

params

params: CompilationParams
Defined in: webpack/types.d.ts:2427

processDependenciesQueue

processDependenciesQueue: AsyncQueue<Module, Module, Module>
Defined in: webpack/types.d.ts:2437

profile

profile: boolean
Defined in: webpack/types.d.ts:2426

rebuildQueue

rebuildQueue: AsyncQueue<Module, Module, Module>
Defined in: webpack/types.d.ts:2445

records

records: Records
Defined in: webpack/types.d.ts:2462

requestShortener

requestShortener: RequestShortener
Defined in: webpack/types.d.ts:2420

resolverFactory

resolverFactory: ResolverFactory
Defined in: webpack/types.d.ts:2416

runtimeTemplate

runtimeTemplate: RuntimeTemplate
Defined in: webpack/types.d.ts:2430

startTime?

optional startTime: number
Defined in: webpack/types.d.ts:2413

usedChunkIds

usedChunkIds: Set<number>
Defined in: webpack/types.d.ts:2473

usedModuleIds

usedModuleIds: Set<number>
Defined in: webpack/types.d.ts:2474

valueCacheVersions

valueCacheVersions: Map<string, ValueCacheVersion>
Defined in: webpack/types.d.ts:2419

warnings

warnings: Error[]
Defined in: webpack/types.d.ts:2467

PROCESS_ASSETS_STAGE_ADDITIONAL

static PROCESS_ASSETS_STAGE_ADDITIONAL: number
Defined in: webpack/types.d.ts:2719 Add additional assets to the compilation.

PROCESS_ASSETS_STAGE_ADDITIONS

static PROCESS_ASSETS_STAGE_ADDITIONS: number
Defined in: webpack/types.d.ts:2735 Add additional sections to existing assets, like a banner or initialization code.

PROCESS_ASSETS_STAGE_ANALYSE

static PROCESS_ASSETS_STAGE_ANALYSE: number
Defined in: webpack/types.d.ts:2790 Analyse existing assets.

PROCESS_ASSETS_STAGE_DERIVED

static PROCESS_ASSETS_STAGE_DERIVED: number
Defined in: webpack/types.d.ts:2730 Derive new assets from existing assets. Existing assets should not be treated as complete.

PROCESS_ASSETS_STAGE_DEV_TOOLING

static PROCESS_ASSETS_STAGE_DEV_TOOLING: number
Defined in: webpack/types.d.ts:2762 Add development tooling to assets, e. g. by extracting a SourceMap.

PROCESS_ASSETS_STAGE_OPTIMIZE

static PROCESS_ASSETS_STAGE_OPTIMIZE: number
Defined in: webpack/types.d.ts:2740 Optimize existing assets in a general way.

PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY

static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number
Defined in: webpack/types.d.ts:2752 Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.

PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT

static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number
Defined in: webpack/types.d.ts:2747 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.

PROCESS_ASSETS_STAGE_OPTIMIZE_HASH

static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number
Defined in: webpack/types.d.ts:2780 Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.

PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE

static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number
Defined in: webpack/types.d.ts:2769 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.

PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE

static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number
Defined in: webpack/types.d.ts:2757 Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.

PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER

static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number
Defined in: webpack/types.d.ts:2785 Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.

PROCESS_ASSETS_STAGE_PRE_PROCESS

static PROCESS_ASSETS_STAGE_PRE_PROCESS: number
Defined in: webpack/types.d.ts:2724 Basic preprocessing of assets.

PROCESS_ASSETS_STAGE_REPORT

static PROCESS_ASSETS_STAGE_REPORT: number
Defined in: webpack/types.d.ts:2795 Creating assets for reporting purposes.

PROCESS_ASSETS_STAGE_SUMMARIZE

static PROCESS_ASSETS_STAGE_SUMMARIZE: number
Defined in: webpack/types.d.ts:2775 Summarize the list of existing assets e. g. creating an assets manifest of Service Workers.

Methods

addAsyncEntrypoint()

addAsyncEntrypoint(options, module, loc, request): Entrypoint
Defined in: webpack/types.d.ts:2624

Parameters

options
EntryOptions
module
Module
loc
DependencyLocation
request
string

Returns

Entrypoint

addChunk()

addChunk(name?): Chunk
Defined in: webpack/types.d.ts:2635 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.

Parameters

name?
string

Returns

Chunk

addChunkInGroup()

addChunkInGroup(groupOptions, module?, loc?, request?): ChunkGroup
Defined in: webpack/types.d.ts:2618 If module is passed, loc and request must also be passed.

Parameters

groupOptions
string | ChunkGroupOptions
module?
Module
loc?
SyntheticDependencyLocation | RealDependencyLocation
request?
string

Returns

ChunkGroup

addEntry()

addEntry(context, entry, optionsOrName, callback): void
Defined in: webpack/types.d.ts:2563

Parameters

context
string
entry
Dependency
optionsOrName
string | EntryOptions
callback
(err?, result?) => void

Returns

void

addInclude()

addInclude(context, dependency, options, callback): void
Defined in: webpack/types.d.ts:2569

Parameters

context
string
dependency
Dependency
options
EntryOptions
callback
(err?, result?) => void

Returns

void

addModule()

addModule(module, callback): void
Defined in: webpack/types.d.ts:2499

Parameters

module
Module
callback
(err?, result?) => void

Returns

void

addModuleChain()

addModuleChain(context, dependency, callback): void
Defined in: webpack/types.d.ts:2541

Parameters

context
string
dependency
Dependency
callback
(err?, result?) => void

Returns

void

addModuleTree()

addModuleTree(__namedParameters, callback): void
Defined in: webpack/types.d.ts:2546

Parameters

__namedParameters
context
string context string path
contextInfo?
Partial<ModuleFactoryCreateDataContextInfo> additional context info for the root module
dependency
Dependency dependency used to create Module chain
callback
(err?, result?) => void

Returns

void

addRuntimeModule()

addRuntimeModule(chunk, module, chunkGraph?): void
Defined in: webpack/types.d.ts:2609

Parameters

chunk
Chunk
module
RuntimeModule
chunkGraph?
ChunkGraph

Returns

void

assignDepth()

assignDepth(module): void
Defined in: webpack/types.d.ts:2640

Parameters

module
Module

Returns

void

Deprecated


assignDepths()

assignDepths(modules): void
Defined in: webpack/types.d.ts:2641

Parameters

modules
Set<Module>

Returns

void

assignRuntimeIds()

assignRuntimeIds(): void
Defined in: webpack/types.d.ts:2652

Returns

void

buildModule()

buildModule(module, callback): void
Defined in: webpack/types.d.ts:2517 Schedules a build of the module object

Parameters

module
Module
callback
(err?, result?) => void

Returns

void

checkConstraints()

checkConstraints(): void
Defined in: webpack/types.d.ts:2714

Returns

void

clearAssets()

clearAssets(): void
Defined in: webpack/types.d.ts:2671

Returns

void

codeGeneration()

codeGeneration(callback): void
Defined in: webpack/types.d.ts:2586

Parameters

callback
(err?) => void

Returns

void

createChildCompiler()

createChildCompiler(name, outputOptions?, plugins?): Compiler
Defined in: webpack/types.d.ts:2693 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

Parameters

name
string
outputOptions?
Partial<OutputNormalized>
plugins?
(false | "" | 0 | WebpackPluginInstance | (this, compiler) => void)[]

Returns

Compiler

createChunkAssets()

createChunkAssets(callback): void
Defined in: webpack/types.d.ts:2674

Parameters

callback
(err?) => void

Returns

void

createHash()

createHash(): CodeGenerationJob[]
Defined in: webpack/types.d.ts:2656

Returns

CodeGenerationJob[]

createModuleAssets()

createModuleAssets(): void
Defined in: webpack/types.d.ts:2672

Returns

void

createModuleHashes()

createModuleHashes(): void
Defined in: webpack/types.d.ts:2655

Returns

void

createStatsFactory()

createStatsFactory(options): StatsFactory
Defined in: webpack/types.d.ts:2495

Parameters

options
NormalizedStatsOptions

Returns

StatsFactory

createStatsOptions()

createStatsOptions(optionsOrPreset?, context?): NormalizedStatsOptions
Defined in: webpack/types.d.ts:2491

Parameters

optionsOrPreset?
string | boolean | StatsOptions
context?
CreateStatsOptionsContext

Returns

NormalizedStatsOptions

createStatsPrinter()

createStatsPrinter(options): StatsPrinter
Defined in: webpack/types.d.ts:2496

Parameters

options
NormalizedStatsOptions

Returns

StatsPrinter

deleteAsset()

deleteAsset(file): void
Defined in: webpack/types.d.ts:2668

Parameters

file
string

Returns

void

emitAsset()

emitAsset(file, source, assetInfo?): void
Defined in: webpack/types.d.ts:2659

Parameters

file
string
source
Source
assetInfo?
AssetInfo

Returns

void

executeModule()

executeModule(module, options, callback): void
Defined in: webpack/types.d.ts:2706

Parameters

module
Module
options
ExecuteModuleOptions
callback
(err?, result?) => void

Returns

void

factorizeModule()

Call Signature

factorizeModule(options, callback): void
Defined in: webpack/types.d.ts:2526
Parameters
options
FactorizeModuleOptions & object
callback
(err?, result?) => void
Returns
void

Call Signature

factorizeModule(options, callback): void
Defined in: webpack/types.d.ts:2530
Parameters
options
FactorizeModuleOptions & object
callback
(err?, result?) => void
Returns
void

findModule()

findModule(identifier): Module
Defined in: webpack/types.d.ts:2512 Attempts to search for a module by its identifier

Parameters

identifier
string

Returns

Module

finish()

finish(callback): void
Defined in: webpack/types.d.ts:2579

Parameters

callback
(err?) => void

Returns

void

getAsset()

getAsset(name): Readonly<Asset>
Defined in: webpack/types.d.ts:2670

Parameters

name
string

Returns

Readonly<Asset>

getAssetPath()

getAssetPath(filename, data): string
Defined in: webpack/types.d.ts:2680

Parameters

filename
TemplatePath
data
PathData

Returns

string

getAssetPathWithInfo()

getAssetPathWithInfo(filename, data): InterpolatedPathAndAssetInfo
Defined in: webpack/types.d.ts:2681

Parameters

filename
TemplatePath
data
PathData

Returns

InterpolatedPathAndAssetInfo

getAssets()

getAssets(): Readonly<Asset>[]
Defined in: webpack/types.d.ts:2669

Returns

Readonly<Asset>[]

getCache()

getCache(name): CacheFacade
Defined in: webpack/types.d.ts:2497

Parameters

name
string

Returns

CacheFacade

getDependencyReferencedExports()

getDependencyReferencedExports(dependency, runtime): (string[] | ReferencedExport)[]
Defined in: webpack/types.d.ts:2642

Parameters

dependency
Dependency
runtime
RuntimeSpec

Returns

(string[] | ReferencedExport)[]

getErrors()

getErrors(): Error[]
Defined in: webpack/types.d.ts:2686

Returns

Error[]

getLogger()

getLogger(name): WebpackLogger
Defined in: webpack/types.d.ts:2498

Parameters

name
string | () => string

Returns

WebpackLogger

getModule()

getModule(module): Module
Defined in: webpack/types.d.ts:2507 Fetches a module from a compilation by its identifier

Parameters

module
Module

Returns

Module

getPath()

getPath(filename, data?): string
Defined in: webpack/types.d.ts:2675

Parameters

filename
TemplatePath
data?
PathData

Returns

string

getPathWithInfo()

getPathWithInfo(filename, data?): InterpolatedPathAndAssetInfo
Defined in: webpack/types.d.ts:2676

Parameters

filename
TemplatePath
data?
PathData

Returns

InterpolatedPathAndAssetInfo

getRenderManifest()

getRenderManifest(options): RenderManifestEntry[]
Defined in: webpack/types.d.ts:2673

Parameters

options
RenderManifestOptions

Returns

RenderManifestEntry[]

getStats()

getStats(): Stats
Defined in: webpack/types.d.ts:2490

Returns

Stats

getWarnings()

getWarnings(): Error[]
Defined in: webpack/types.d.ts:2685

Returns

Error[]

handleModuleCreation()

handleModuleCreation(__namedParameters, callback): void
Defined in: webpack/types.d.ts:2537

Parameters

__namedParameters
HandleModuleCreationOptions
callback
(err?, result?) => void

Returns

void

patchChunksAfterReasonRemoval()

patchChunksAfterReasonRemoval(module, chunk): void
Defined in: webpack/types.d.ts:2650

Parameters

module
Module
chunk
Chunk

Returns

void

processModuleDependencies()

processModuleDependencies(module, callback): void
Defined in: webpack/types.d.ts:2521

Parameters

module
Module
callback
(err?, result?) => void

Returns

void

processModuleDependenciesNonRecursive()

processModuleDependenciesNonRecursive(module): void
Defined in: webpack/types.d.ts:2525

Parameters

module
Module

Returns

void

processRuntimeRequirements()

processRuntimeRequirements(__namedParameters?): void
Defined in: webpack/types.d.ts:2587

Parameters

__namedParameters?
chunkGraph?
ChunkGraph the chunk graph
chunkGraphEntries?
Iterable<Chunk> chunkGraphEntries
chunks?
Iterable<Chunk> chunks
codeGenerationResults?
CodeGenerationResults codeGenerationResults
modules?
Iterable<Module> modules

Returns

void

rebuildModule()

rebuildModule(module, callback): void
Defined in: webpack/types.d.ts:2575

Parameters

module
Module
callback
(err?, result?) => void

Returns

void

removeChunkFromDependencies()

removeChunkFromDependencies(block, chunk): void
Defined in: webpack/types.d.ts:2651

Parameters

block
DependenciesBlock
chunk
Chunk

Returns

void

removeReasonsOfDependencyBlock()

removeReasonsOfDependencyBlock(module, block): void
Defined in: webpack/types.d.ts:2646

Parameters

module
Module
block
DependenciesBlockLike

Returns

void

renameAsset()

renameAsset(file, newFile): void
Defined in: webpack/types.d.ts:2667

Parameters

file
string
newFile
string

Returns

void

reportDependencyErrorsAndWarnings()

reportDependencyErrorsAndWarnings(module, blocks): boolean
Defined in: webpack/types.d.ts:2582

Parameters

module
Module
blocks
DependenciesBlock[]

Returns

boolean

seal()

seal(callback): void
Defined in: webpack/types.d.ts:2581

Parameters

callback
(err?) => void

Returns

void

sortItemsWithChunkIds()

sortItemsWithChunkIds(): void
Defined in: webpack/types.d.ts:2653

Returns

void

summarizeDependencies()

summarizeDependencies(): void
Defined in: webpack/types.d.ts:2654

Returns

void

unseal()

unseal(): void
Defined in: webpack/types.d.ts:2580

Returns

void

updateAsset()

updateAsset(file, newSourceOrFunction, assetInfoUpdateOrFunction?): void
Defined in: webpack/types.d.ts:2660

Parameters

file
string
newSourceOrFunction
Source | (source) => Source
assetInfoUpdateOrFunction?
AssetInfo | (assetInfo?) => AssetInfo

Returns

void