}
idle <boolean>
immutablePaths {Set<string|RegExp>}
infrastructureLogger {object}
inputFileSystem <InputFileSystem>
intermediateFileSystem {IntermediateFileSystem}
managedPaths {Set<string|RegExp>}
modifiedFiles {ReadonlySet}
moduleMemCaches {Map<Module, ModuleMemCachesItem>}
name <string>
options <WebpackOptionsNormalized>
outputFileSystem <OutputFileSystem>
outputPath <string>
parentCompilation <Compilation>
platform {Readonly}
records {Records}
recordsInputPath <string>
recordsOutputPath <string>
removedFiles {ReadonlySet}
requestShortener {RequestShortener}
resolverFactory {ResolverFactory}
root <Compiler>
running <boolean>
unmanagedPaths {Set<string|RegExp>}
watchFileSystem {WatchFileSystem}
watching <Watching>
watchMode <boolean>
webpack {exports}
callback {object}
Returns: {void}
callback {CallbackWebpackFunction_2<Compilation, void>}
Returns: {void}
createChildCompiler ( compilation , compilerName , compilerIndex , outputOptions ? , plugins ? ) : Compiler
createCompilation ( params ): void
createContextModuleFactory (): ContextModuleFactory
createNormalModuleFactory (): NormalModuleFactory
emitAssets ( compilation , callback ): void
emitRecords ( callback ): void
callback {object}
Returns: {void}
getCache ( name ): CacheFacade
getInfrastructureLogger ( name ): WebpackLogger
Compilation ( params ): void
CompilationParams (): object
purgeInputFileSystem (): void
readRecords ( callback ): void
callback {object}
Returns: {void}
callback {CallbackWebpackFunction_2<Stats, void>}
Returns: {void}
runAsChild ( callback ): void
callback {object}
Returns: {void}
validate ( schema , value , options ? , check ? ) : void
schema {JSONSchema4|ExtendedSchema|JSONSchema6|ExtendedSchema|JSONSchema7|ExtendedSchema|object}
value {T}
options {ValidationErrorConfiguration}
check {object}
Returns: {void}
Schema validation function with optional pre-compiled check
watch ( watchOptions , handler ): void
watchOptions {WatchOptions}
handler {CallbackWebpackFunction_2<Stats, void>}
Returns: <Watching>
new ConcatenationScope ( modulesMap , currentModule , usedNames ): void
modulesMap {ModuleInfo[]|Map<Module, ModuleInfo>}
currentModule {ConcatenatedModuleInfo}
usedNames {Set}
Returns: <ConcatenationScope>
createModuleReference ( module , __namedParameters ): string
getRawExport ( exportName ): string
isModuleInScope ( module ): boolean
registerExport ( exportName , symbol ): void
registerNamespaceExport ( symbol ): void
registerRawExport ( exportName , expression ): void
setRawExportMap ( exportName , expression ): void
{ModuleReferenceOptions|object}
new ContextExclusionPlugin ( negativeMatcher ): ContextExclusionPlugin
Apply the plugin
new ContextReplacementPlugin ( resourceRegExp , newContentResource ? , newContentRecursive ? , newContentRegExp ? ) : ContextReplacementPlugin
newContentCallback {object}
newContentCreateContextMap {object}
newContentRecursive <boolean>
newContentRegExp <RegExp>
newContentResource <string>
resourceRegExp <RegExp>
Apply the plugin
new DefinePlugin ( definitions ): void
Create a new define plugin
definitions {Definitions}
Apply the plugin
fn {object}
options <string[]>
Returns: {RuntimeValue}
new DelegatedPlugin ( options ): void
Apply the plugin
{ModuleDependency}
{NullDependency}
new Dependency (): Dependency
couldAffectReferencingModule (): boolean | symbol
createIgnoredModule ( context ): Module
deserialize ( __namedParameters ): void
getCondition ( moduleGraph ): false | object
getErrors ( moduleGraph ): WebpackError []
Returns errors
getExports ( moduleGraph ): ExportsSpec
Returns the exported names
getModuleEvaluationSideEffectsState ( moduleGraph ): ConnectionState
getNumberOfIdOccurrences (): number
implement this method to allow the occurrence order plugin to count correctly
getReference ( moduleGraph ): never
Stability: 0 Deprecated
Returns the referenced module and export
getReferencedExports ( moduleGraph , runtime ): string []
Returns list of exports referenced by this dependency
getResourceIdentifier (): string
getWarnings ( moduleGraph ): WebpackError []
Returns warnings
serialize ( __namedParameters ): void
setLoc ( startLine , startColumn , endLine , endColumn ): void
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Update the hash
new DllPlugin ( options ): void
options {DllPluginOptions}
Apply the plugin
new DllReferencePlugin ( options ): void
options {DllReferencePluginOptions}
Apply the plugin
new DotenvPlugin ( options ? ) : void
options {DotenvPluginOptions}
new DynamicEntryPlugin ( context , entry ): DynamicEntryPlugin
Apply the plugin
new EntryOptionPlugin (): EntryOptionPlugin
Attributes
{EntryDescriptionNormalized}
new EntryPlugin ( context , entry , options ? ) : EntryPlugin
An entry plugin which will handle creation of the EntryDependency
Apply the plugin
new Entrypoint (): Entrypoint
asyncEntrypointsIterable {SortableSet}
blocksIterable {Iterable}
childrenIterable {SortableSet}
chunks <Chunk[]>
debugId <string> get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
getModuleIndex {object}
getModuleIndex2 {object}
groupDebugId <number>
id <string> get a unique id for ChunkGroup, made up of its member Chunk id's
index <number>
name <string> returns the name of current ChunkGroup
sets a new name for current ChunkGroup
options {ChunkGroupOptions}
origins {OriginRecord[]}
parentsIterable {SortableSet}
addAsyncEntrypoint ( entrypoint ): boolean
addDependOn ( entrypoint ): void
addOptions ( options ): void
options {ChunkGroupOptions}
Returns: {void}
when a new chunk is added to a chunkGroup, addingOptions will occur.
addOrigin ( module , loc , request ): void
addParent ( parentChunk ): boolean
compareTo ( chunkGraph , otherGroup ): - 1 | 0 | 1
Sorting predicate which allows current ChunkGroup to be compared against another.
Sorting values are based off of number of chunks in ChunkGroup.
dependOn ( entrypoint ): boolean
getBlocks (): AsyncDependenciesBlock []
getChildren (): ChunkGroup []
getChildrenByOrders ( moduleGraph , chunkGraph ): Record < string , ChunkGroup [] >
{Record<string, ChunkGroup[]>}
getEntrypointChunk (): Chunk
Returns the chunk which contains the entrypoint modules
(or at least the execution of them)
getModulePostOrderIndex ( module ): number
Gets the bottom-up index of a module in this ChunkGroup
getModulePreOrderIndex ( module ): number
Gets the top-down index of a module in this ChunkGroup
getNumberOfBlocks (): number
getNumberOfChildren (): number
getNumberOfParents (): number
getParents (): ChunkGroup []
Fetches the chunk reference containing the webpack bootstrap code
hasParent ( parent ): boolean
insertChunk ( chunk , before ): boolean
inserts a chunk before another existing chunk in group
pushChunk ( chunk ): boolean
add a chunk into ChunkGroup. Is pushed on or prepended
removeChild ( group ): boolean
removeChunk ( chunk ): boolean
removeParent ( chunkGroup ): boolean
replaceChunk ( oldChunk , newChunk ): boolean
setEntrypointChunk ( chunk ): void
Sets the chunk with the entrypoint modules for an entrypoint.
setModulePostOrderIndex ( module , index ): void
Sets the bottom-up index of a module in this ChunkGroup
setModulePreOrderIndex ( module , index ): void
Sets the top-down index of a module in this ChunkGroup
setRuntimeChunk ( chunk ): void
Sets the runtimeChunk for an entrypoint.
unshiftChunk ( chunk ): boolean
Performs an unshift of a specific chunk
new EnvironmentPlugin ( keys ): void
defaultValues {Record<string, any>}
keys <string[]>
Apply the plugin
new EvalDevToolModulePlugin ( options ? ) : void
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
sourceUrlComment <string>
Apply the plugin
new EvalSourceMapDevToolPlugin ( inputOptions ? ) : EvalSourceMapDevToolPlugin
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
options {SourceMapDevToolPluginOptions}
sourceMapComment <string>
Apply the plugin
new ExternalModule ( request , type , userRequest , dependencyMeta ? ) : void
request {ExternalModuleRequest}
type {ExternalsType}
userRequest <string>
dependencyMeta {ImportDependencyMeta|CssImportDependencyMeta|AssetDependencyMeta}
Returns: <ExternalModule>
Attributes
{ImportDependencyMeta|CssImportDependencyMeta|AssetDependencyMeta}
{ModuleExternalInitFragment}
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
restoreFromUnsafeCache ( unsafeCacheData , normalModuleFactory ): void
unsafeCacheData {UnsafeCacheData}
normalModuleFactory {NormalModuleFactory}
Returns: {void}
restore unsafe cache data
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new ExternalsPlugin ( type , externals ): void
type {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"|object}
externals <Externals>
Returns: <ExternalsPlugin>
Attributes
{"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"|object}
Apply the plugin
new Generator (): Generator
generate ( module , __namedParameters ): Source
getConcatenationBailoutReason ( module , context ): string
Attributes
{ConcatenationBailoutReasonContext}
getSize ( module , type ? ) : number
getTypes ( module ): ReadonlySet < string >
updateHash ( hash , __namedParameters ): void
hash {Hash}
__namedParameters {UpdateHashContextGenerator}
Returns: {void}
map {object}
Returns: {ByTypeGenerator}
new HotModuleReplacementPlugin (): HotModuleReplacementPlugin
Apply the plugin
parser {JavascriptParser}
Returns: {HMRJavascriptParserHooks}
new HotUpdateChunk (): HotUpdateChunk
addGroup ( chunkGroup ): void
addModule ( module ): boolean
canBeIntegrated ( otherChunk ): boolean
compareTo ( otherChunk ): - 1 | 0 | 1
containsModule ( module ): boolean
disconnectFromGroups (): void
getAllAsyncChunks (): Set < Chunk >
getAllInitialChunks (): Set < Chunk >
getAllReferencedAsyncEntrypoints (): Set < Entrypoint >
getAllReferencedChunks (): Set < Chunk >
getChildIdsByOrders ( chunkGraph , filterFn ? ) : Record < string , ChunkId [] >
{Record<string, ChunkId[]>}
getChildIdsByOrdersMap ( chunkGraph , includeDirectChildren ? , filterFn ? ) : ChunkChildIdsByOrdersMapByData
{ChunkChildIdsByOrdersMapByData}
getChildrenOfTypeInOrder ( chunkGraph , type ): ChunkChildOfTypeInOrder []
{ChunkChildOfTypeInOrder[]}
getChunkMaps ( realHash ): ChunkMaps
Stability: 0 Deprecated
getChunkModuleMaps ( filterFn ): void
filterFn {object}
Returns: {ChunkModuleMaps}
getEntryOptions (): EntryOptions
getNumberOfGroups (): number
getNumberOfModules (): number
hasAsyncChunks (): boolean
hasChildByOrder ( chunkGraph , type , includeDirectChildren ? , filterFn ? ) : boolean
hasEntryModule (): boolean
hasModuleInGraph ( filterFn , filterChunkFn ? ) : void
filterFn {object}
filterChunkFn {object}
Returns: <boolean>
integrate ( otherChunk ): boolean
integratedSize ( otherChunk , options ): number
isInGroup ( chunkGroup ): boolean
moveModule ( module , otherChunk ): void
removeGroup ( chunkGroup ): void
removeModule ( module ): void
options {ChunkSizeOptions}
Returns: <number>
updateHash ( hash , chunkGraph ): void
new IgnorePlugin ( options ): void
options {IgnorePluginOptions}
Apply the plugin
checkIgnore ( resolveData ): false
Note that if "contextRegExp" is given, both the "resourceRegExp" and "contextRegExp" have to match.
new InitFragment ( content , stage , position , key ? , endContent ? ) : InitFragment < GenerateContext >
deserialize ( context ): void
getContent ( context ): void
context {GenerateContext}
Returns: <string>
getEndContent ( context ): void
context {GenerateContext}
Returns: <string>
source {Source}
initFragments {MaybeMergeableInitFragment[]}
context {Context}
Returns: {Source}
new JavascriptModulesPlugin ( options ? ) : void
options {object}
chunkHasJs {object}
Apply the plugin
renderBootstrap ( renderContext , hooks ): void
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {Bootstrap}
renderChunk ( renderContext , hooks ): void
renderContext {RenderContextJavascriptModulesPlugin}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {Source}
renderMain ( renderContext , hooks , compilation ): void
renderContext {MainRenderContext}
hooks {CompilationHooksJavascriptModulesPlugin}
compilation <Compilation>
Returns: {Source}
renderModule ( module , renderContext , hooks ): Source
Attributes
{CompilationHooksJavascriptModulesPlugin}
renderRequire ( renderContext , hooks ): void
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: <string>
updateHashWithBootstrap ( hash , renderContext , hooks ): void
hash {Hash}
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {void}
Attributes
{OutputNormalizedWithDefaults}
{CompilationHooksJavascriptModulesPlugin}
new LibManifestPlugin ( options ): void
options {LibManifestPluginOptions}
Apply the plugin
new LibraryTemplatePlugin ( name , target , umdNamedDefine , auxiliaryComment , exportProperty ): void
Apply the plugin
new LoaderOptionsPlugin ( options ? ) : void
options {LoaderOptionsPluginOptions|MatchObject}
Apply the plugin
new LoaderTargetPlugin ( target ): LoaderTargetPlugin
Apply the plugin
new ManifestPlugin ( options ? ) : void
options {ManifestPluginOptions}
Apply the plugin
new Module ( type , context ? , layer ? ) : Module
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new ModuleFactory (): ModuleFactory
create ( data , callback ): void
data {ModuleFactoryCreateData}
callback {object}
Returns: {void}
new ModuleGraph (): ModuleGraph
addExplanation ( dependency , explanation ): void
addExtraReason ( module , explanation ): void
fn {object}
args {T}
Returns: {R}
cloneModuleAttributes ( sourceModule , targetModule ): void
copyOutgoingModuleConnections ( oldModule , newModule , filterConnection ): void
dependencyCacheProvide ( dependency , args ): void
dependency {D}
args {Tuple<ARGS, unknown>}
Returns: {R}
finishUpdateParent (): void
freeze ( cacheStage ? ) : void
getConnection ( dependency ): ModuleGraphConnection
getExportInfo ( module , exportName ): ExportInfo
getExportsInfo ( module ): ExportsInfo
getIncomingConnections ( module ): Iterable < ModuleGraphConnection >
getIncomingConnectionsByOriginModule ( module ): ReadonlyMap < Module , ModuleGraphConnection [] >
{ReadonlyMap<Module, ModuleGraphConnection[]>}
getIssuer ( module ): Module
thing {object}
Returns: {Meta}
getMetaIfExisting ( thing ): void
thing {object}
Returns: {Meta}
getModule ( dependency ): Module
getOptimizationBailout ( module ): string
getOrigin ( dependency ): Module
getOutgoingConnections ( module ): Iterable < ModuleGraphConnection >
getOutgoingConnectionsByModule ( module ): ReadonlyMap < Module , ModuleGraphConnection [] >
{ReadonlyMap<Module, ModuleGraphConnection[]>}
getParentBlock ( dependency ): DependenciesBlock
getParentBlockIndex ( dependency ): number
getParentModule ( dependency ): Module
getPostOrderIndex ( module ): number
getPreOrderIndex ( module ): number
getProfile ( module ): ModuleProfile
getProvidedExports ( module ): string []
getReadOnlyExportInfo ( module , exportName ): ExportInfo
getResolvedModule ( dependency ): Module
getResolvedOrigin ( dependency ): Module
getUsedExports ( module , runtime ): boolean | SortableSet < string >
isDeferred ( module ): boolean
isExportProvided ( module , exportName ): boolean
moveModuleConnections ( oldModule , newModule , filterConnection ): void
removeAllModuleAttributes (): void
removeConnection ( dependency ): void
removeModuleAttributes ( module ): void
setDepth ( module , depth ): void
setDepthIfLower ( module , depth ): boolean
setIssuer ( module , issuer ): void
setIssuerIfUnset ( module , issuer ): void
setModuleMemCaches ( moduleMemCaches ): void
moduleMemCaches {Map<Module, WeakTupleMap<any[], any>>}
Returns: {void}
setParentDependenciesBlockIndex ( dependency , index ): void
setParents ( dependency , block , module , indexInBlock ? ) : void
setPostOrderIndex ( module , index ): void
setPostOrderIndexIfUnset ( module , index ): boolean
setPreOrderIndex ( module , index ): void
setPreOrderIndexIfUnset ( module , index ): boolean
setProfile ( module , profile ? ) : void
setResolvedModule ( originModule , dependency , module ): void
updateModule ( dependency , module ): void
updateParent ( dependency , connection ? , parentModule ? ) : void
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
new ModuleGraphConnection ( originModule , dependency , module , explanation ? , weak ? , condition ? ) : ModuleGraphConnection
addCondition ( condition ): void
condition {object}
Returns: {void}
addExplanation ( explanation ): void
clone (): ModuleGraphConnection
getActiveState ( runtime ): void
runtime {RuntimeSpec}
Returns: {ConnectionState}
isTargetActive ( runtime ): void
new MultiCompiler ( compilers , options ): void
Attributes
{WeakMap<Compiler, string[]>}
callback {object}
Returns: {void}
getInfrastructureLogger ( name ): WebpackLogger
purgeInputFileSystem (): void
callback {CallbackWebpackFunction_2<MultiStats, void>}
Returns: {void}
runWithDependencies ( compilers , fn , callback ): void
Stability: 0 Deprecated
Attributes
{CallbackWebpackFunction_2<Stats[], void>}
This method should have been private
setDependencies ( compiler , dependencies ): void
validateDependencies ( callback ): void
callback {CallbackWebpackFunction_2<MultiStats, void>}
Returns: <boolean>
watch ( watchOptions , handler ): void
watchOptions {WatchOptions|WatchOptions[]}
handler {CallbackWebpackFunction_2<MultiStats, void>}
Returns: {MultiWatching}
new MultiStats (): MultiStats
toJson ( options ? ) : StatsCompilation
toString ( options ? ) : string
new NoEmitOnErrorsPlugin (): NoEmitOnErrorsPlugin
Apply the plugin
new NormalModule ( __namedParameters ): void
Attributes
{ResourceSchemeData|Partial
}
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
applyNoParseRule ( rule , content ): boolean
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
createSource ( context , content , sourceMap ? , associatedObjectForCache ? ) : Source
createSourceForAsset ( context , name , content , sourceMap ? , associatedObjectForCache ? ) : Source
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getCurrentLoader ( loaderContext , index ? ) : void
loaderContext {AnyLoaderContext}
index <number>
Returns: {LoaderItem}
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
markModuleAsErrored ( error ): void
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
restoreFromUnsafeCache ( unsafeCacheData , normalModuleFactory ): void
unsafeCacheData {UnsafeCacheData}
normalModuleFactory {NormalModuleFactory}
Returns: {void}
restore unsafe cache data
serialize ( __namedParameters ): void
shouldPreventParsing ( noParseRule , request ): boolean
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
{NormalModuleCompilationHooks}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new NormalModuleReplacementPlugin ( resourceRegExp , newResource ): NormalModuleReplacementPlugin
Create an instance of the plugin
Apply the plugin
new Parser (): ParserClass
parse ( source , state ): void
new PlatformPlugin ( platform ): void
Apply the plugin
new PrefetchPlugin ( context , request ? ) : PrefetchPlugin
Apply the plugin
new ProgressPlugin ( options ? ) : void
Attributes
{"entries"|"modules"|"dependencies"}
{Required<Omit<ProgressPluginOptions, "handler">>}
new ProvidePlugin ( definitions ): void
definitions {Record<string, string|string[]>}
Apply the plugin
fileSystem {FileSystem}
hooks {KnownHooks}
options {ResolveOptionsResolverFactoryObject1}
doResolve ( hook , request , message , resolveContext , callback ): void
hook {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
request {ResolveRequest}
message <string>
resolveContext {ResolveContext}
callback {object}
Returns: {void}
name {string|AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest, UnsetAdditionalOptions>}
Returns: {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
name {string|AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest, UnsetAdditionalOptions>}
Returns: {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
isDirectory ( path ): boolean
join ( path , request ): string
parse ( identifier ): ParsedIdentifier
resolve ( context , path , request , resolveContext , callback ): void
context {ContextTypes}
path <string>
request <string>
resolveContext {ResolveContext}
callback {object}
Returns: {void}
resolveSync ( context , path , request ): void
{GetChunkFilenameRuntimeModule}
{JsonpChunkLoadingRuntimeModule}
{CssLoadingRuntimeModule}
{ModuleChunkLoadingRuntimeModule}
new RuntimeModule ( name , stage ? ) : RuntimeModule
Attributes
Runtime modules which attach to handlers of other runtime modules
Runtime modules with simple dependencies on other runtime modules
Runtime modules without any dependencies to other runtime modules
Runtime modules which trigger actions on bootstrap
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
attach ( compilation , chunk , chunkGraph ? ) : void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getGeneratedCode (): string
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new SourceMapDevToolPlugin ( options ? ) : void
fallbackModuleFilenameTemplate {DevtoolFallbackModuleFilenameTemplate}
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
options {SourceMapDevToolPluginOptions}
sourceMapFilename <string>
sourceMappingURLComment <string>
Apply the plugin
new Stats ( compilation ): Stats
toJson ( options ? ) : StatsCompilation
toString ( options ? ) : string
modules {WithId[]}
Returns: {false|Tuple<number, number>}
renderContext {ChunkRenderContextJavascriptModulesPlugin}
modules <Module[]>
renderModule {object}
prefix <string>
Returns: {Source}
Attributes
{RenderContextJavascriptModulesPlugin}
Attributes
{RenderContextJavascriptModulesPlugin|object}
new WatchIgnorePlugin ( options ): void
options {WatchIgnorePluginOptions}
Apply the plugin
Attributes
{CallbackWebpackFunction_2<Stats, void>}
callback {object}
Returns: {void}
invalidate ( callback ? ) : void
callback {object}
Returns: {void}
watch ( files , dirs , missing ): void
files {Iterable}
dirs {Iterable}
missing {Iterable}
Returns: {void}
[index: <number> ]: {object}
new WebpackError ( message ? , options ? ) : WebpackError
Creates an instance of WebpackError.
Attributes
{SyntheticDependencyLocation|RealDependencyLocation}
The
Error.stackTraceLimit
property specifies the number of stack frames
collected by a stack trace (whether generated by
new Error().stack
or
Error.captureStackTrace(obj)
).
The default value is
10
but may be set to any valid JavaScript number. Changes
will affect any stack trace captured
after
the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
deserialize ( __namedParameters ): void
serialize ( __namedParameters ): void
targetObject {object}
constructorOpt <Function>
Returns: {void}
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {} ;
Error . captureStackTrace ( myObject ) ;
myObject . stack ; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a () {
b () ;
}
function b () {
c () ;
}
function c () {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error ;
Error . stackTraceLimit = 0 ;
const error = new Error () ;
Error . stackTraceLimit = stackTraceLimit ;
// Capture the stack trace above function b
Error . captureStackTrace ( error , b ) ; // Neither function c, nor b is included in the stack trace
throw error ;
}
a () ;
new WebpackOptionsApply (): WebpackOptionsApply
process ( options , compiler , interception ? ) : void
options {WebpackOptionsNormalizedWithDefaults}
compiler <Compiler>
interception {WebpackOptionsInterception}
Returns: {WebpackOptionsNormalizedWithDefaults}
new WebpackOptionsDefaulter (): WebpackOptionsDefaulter
process ( options ): WebpackOptionsNormalized
new WebpackOptionsValidationError ( errors , schema , configuration ? ) : void
errors {SchemaUtilErrorObject[]} array of error objects
schema {Schema} schema
configuration {ValidationErrorConfiguration} configuration
Returns: {ValidationError}
Attributes
{SchemaUtilErrorObject[]}
The
Error.stackTraceLimit
property specifies the number of stack frames
collected by a stack trace (whether generated by
new Error().stack
or
Error.captureStackTrace(obj)
).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
formatSchema ( schema , logic ? , prevSchemas ? ) : void
schema {Schema} schema
logic <boolean> logic
prevSchemas {object[]} prev schemas
Returns: <string> formatted schema
formatValidationError ( error ): void
error {SchemaUtilErrorObject} error object
Returns: <string> formatted error object
formatValidationErrors ( errors ): void
errors {SchemaUtilErrorObject[]} errors
Returns: <string> formatted errors
getSchemaPart ( path ): Schema
getSchemaPartDescription ( schemaPart ? ) : void
schemaPart {Schema} schema part
Returns: <string> schema part description
getSchemaPartText ( schemaPart ? , additionalPath ? , needDot ? , logic ? ) : void
targetObject {object}
constructorOpt <Function>
Returns: {void}
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {} ;
Error . captureStackTrace ( myObject ) ;
myObject . stack ; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a () {
b () ;
}
function b () {
c () ;
}
function c () {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error ;
Error . stackTraceLimit = 0 ;
const error = new Error () ;
Error . stackTraceLimit = stackTraceLimit ;
// Capture the stack trace above function b
Error . captureStackTrace ( error , b ) ; // Neither function c, nor b is included in the stack trace
throw error ;
}
a () ;
configs {ArgumentConfig[]}
description <string>
multiple <boolean>
simpleType {SimpleType}
Attributes
the filename of the asset
{Source} source of the asset
bgBlack {object}
bgBlackBright {object}
bgBlue {object}
bgBlueBright {object}
bgCyan {object}
bgCyanBright {object}
bgGreen {object}
bgGreenBright {object}
bgMagenta {object}
bgMagentaBright {object}
bgRed {object}
bgRedBright {object}
bgWhite {object}
bgWhiteBright {object}
bgYellow {object}
bgYellowBright {object}
black {object}
blackBright {object}
blue {object}
blueBright {object}
bold {object}
cyan {object}
cyanBright {object}
dim {object}
gray {object}
green {object}
greenBright {object}
hidden {object}
inverse {object}
italic {object}
magenta {object}
magentaBright {object}
red {object}
redBright {object}
reset {object}
strikethrough {object}
underline {object}
white {object}
whiteBright {object}
yellow {object}
yellowBright {object}
Options object as provided by the user.
amd {false|object} Set the value of require.amd and define.amd. Or disable AMD support.
bail <boolean> Report the first error as a hard error instead of tolerating it.
cache <boolean> | <FileCacheOptions> | <MemoryCacheOptions> Cache generated modules and chunks to improve performance for multiple incremental builds.
context <string> The base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
dependencies <string[]> References to other configurations to depend on.
devtool <string> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv <boolean> Enable and configure the Dotenv plugin to load environment variables from .env files.
entry <string> | <string[]> | <EntryObject> The entry point(s) of the compilation.
experiments {Experiments} Enables/Disables experiments (experimental features with relax SemVer compatibility).
extends <string> | <string[]> Extend configuration from another configuration (only works when using webpack-cli).
externals <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown> | <ExternalItem[]> 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.
externalsPresets {ExternalsPresets} Enable presets of externals for specific targets.
externalsType {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings <RegExp> Ignore specific warnings.
infrastructureLogging {InfrastructureLogging} Options for infrastructure level logging.
loader {Loader} Custom values available in the loader context.
mode {"development"|"none"|"production"} Enable production optimizations or development hints.
module <ModuleOptions> Options affecting the normal modules (NormalModuleFactory).
name <string> Name of the configuration. Used when loading multiple configurations.
node {false|NodeOptions} Include polyfills or mocks for various node stuff.
optimization {Optimization} Enables/Disables integrated optimizations.
output {Output} Options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
parallelism <number> The number of parallel processed modules in the compilation.
performance {false|PerformanceOptions} Configuration for web performance recommendations.
plugins <WebpackPluginInstance> Add additional plugins to the compiler.
profile <boolean> Capture timing information for each module.
recordsInputPath <string> Store compiler state to a json file.
recordsOutputPath <string> Load compiler state from a json file.
recordsPath <string> 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.
resolve <ResolveOptions> Options for the resolver.
resolveLoader <ResolveOptions> Options for the resolver when resolving loaders.
snapshot {SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats <boolean> | <StatsOptions> Stats options object or preset name.
target <string> | <string[]> Environment to build for. An array of environments to build for all of them when possible.
validate <boolean> Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch <boolean> Enter watch mode, which rebuilds on file change.
watchOptions {WatchOptions} Options for the watcher.
Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
[index: <string> ]: <string> | <string[]>
Attributes
the directory in which the request is placed
{ModuleFactoryCreateDataContextInfo} contextual information
the category of the referencing dependency
{object} get a resolve function with the current resolver options
the request as written by the user in the require/import expression/statement
If an dependency matches exactly a property of the object, the property value is used as dependency.
byLayer {object|object} Specify externals depending on the layer.
If an dependency matches exactly a property of the object, the property value is used as dependency.
[index: <string> ]: <ExternalItemValue>
Options object for persistent file-based caching.
Attributes
Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.
{object} Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
Base directory for the cache (defaults to node_modules/.cache/webpack).
Locations for the cache (defaults to cacheDirectory / name).
{false|"gzip"|"brotli"} Compression type used for the cache files.
Algorithm used for generation the hash (see node.js crypto package).
Time in ms after which idle period the cache storing should happen.
Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).
Time in ms after which idle period the initial cache storing should happen.
List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).
Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.
Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.
Name for the cache. Different names will lead to different coexisting caches.
Track and log detailed timing information for individual cache items.
Enable/disable readonly mode.
{"pack"} When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
{"filesystem"} Filesystem caching.
Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.
Specify options for each generator.
asset {AssetGeneratorOptions} Generator options for asset modules.
asset/bytes {EmptyGeneratorOptions} No generator options are supported for this module type.
asset/inline {AssetInlineGeneratorOptions} Generator options for asset/inline modules.
asset/resource {AssetResourceGeneratorOptions} Generator options for asset/resource modules.
asset/source {EmptyGeneratorOptions} No generator options are supported for this module type.
css {CssGeneratorOptions} Generator options for css modules.
css/auto {CssModuleGeneratorOptions} Generator options for css/module modules.
css/global {CssModuleGeneratorOptions} Generator options for css/module modules.
css/module {CssModuleGeneratorOptions} Generator options for css/module modules.
javascript {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/auto {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/dynamic {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/esm {EmptyGeneratorOptions} No generator options are supported for this module type.
json {JsonGeneratorOptions} Generator options for json modules.
dirname {object}
join {object}
lstat {LStatFs}
lstatSync {LStatSync}
purge {object}
readdir {ReaddirFs}
readdirSync {ReaddirSync}
readFile {ReadFileFs}
readFileSync {ReadFileSync}
readJson {object}
readJsonSync {object}
readlink {ReadlinkFs}
readlinkSync {ReadlinkSync}
realpath {RealPathFs}
realpathSync {RealPathSync}
relative {object}
stat {StatFs}
statSync {StatSync}
Options for library.
Attributes
Add a container for define/require functions in the AMD module.
Add a comment in the UMD wrapper.
Specify which export should be exposed as library.
The name of the library (some types allow unnamed libraries too).
Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
If
output.libraryTarget
is set to umd and
output.library
is set, setting this to true will name the AMD module.
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
content <string>
sourceMap <string>
additionalData {AdditionalData}
Returns: {string|void|Buffer|Promise<string|Buffer>}
default {RawLoaderDefinitionFunction<OptionsType, ContextAdditions>|LoaderDefinitionFunction<OptionsType, ContextAdditions>}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {false}
Options object for in-memory caching.
Attributes
Additionally cache computation of modules that are unchanged and reference only unchanged modules.
Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).
{"memory"} In memory caching.
Options affecting the normal modules (NormalModuleFactory).
Attributes
An array of rules applied by default for modules.
Enable warnings for full dynamic dependencies.
Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
{GeneratorOptionsByModuleType} Specify options for each generator.
Don't parse files matching. It's matched against the full resolved request.
{ParserOptionsByModuleType} Specify options for each parser.
An array of rules applied for modules.
Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
Cache the resolving of module requests.
Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
Attributes
how many Compilers are allows to run at the same time in parallel
read {object}
setCircularReference {object}
rollback {object}
setCircularReference {object}
snapshot {object}
write {object}
writeLazy {object}
writeSeparate {object}
createReadStream {object}
dirname {object}
join {object}
lstat {LStatFs}
mkdir {Mkdir}
readdir {ReaddirFs}
readFile {ReadFileFs}
relative {object}
rmdir {object}
stat {StatFs}
unlink {object}
writeFile {WriteFile}
Specify options for each parser.
asset {AssetParserOptions} Parser options for asset modules.
asset/bytes {EmptyParserOptions} No parser options are supported for this module type.
asset/inline {EmptyParserOptions} No parser options are supported for this module type.
asset/resource {EmptyParserOptions} No parser options are supported for this module type.
asset/source {EmptyParserOptions} No parser options are supported for this module type.
css {CssParserOptions} Parser options for css modules.
css/auto {CssModuleParserOptions} Parser options for css/module modules.
css/global {CssModuleParserOptions} Parser options for css/module modules.
css/module {CssModuleParserOptions} Parser options for css/module modules.
javascript {JavascriptParserOptions} Parser options for javascript modules.
javascript/auto {JavascriptParserOptions} Parser options for javascript modules.
javascript/dynamic {JavascriptParserOptions} Parser options for javascript modules.
javascript/esm {JavascriptParserOptions} Parser options for javascript modules.
json {JsonParserOptions} Parser options for JSON modules.
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
remainingRequest <string>
previousRequest <string>
data {object}
Returns: {string|void|Buffer|Promise<string|Buffer>}
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
content {Buffer}
sourceMap <string>
additionalData {AdditionalData}
Returns: {string|void|Buffer|Promise<string|Buffer>}
Attributes
{OutputNormalizedWithDefaults}
attributes {ImportAttributes}
cacheable <boolean> allow to use the unsafe cache
context <string>
contextDependencies {LazySet}
contextInfo {ModuleFactoryCreateDataContextInfo}
createData {Partial<NormalModuleCreateData|object>}
dependencies {ModuleDependency[]}
dependencyType <string>
fileDependencies {LazySet}
ignoredModule <Module>
missingDependencies {LazySet}
request <string>
resolveOptions <ResolveOptions>
Options object for resolving requests.
alias {object[]|object} Redirect module requests.
aliasFields <string> Fields in the description file (usually package.json) which are used to redirect requests inside the module.
byDependency {object} Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
cache <boolean> Enable caching of successfully resolved requests (cache entries are revalidated).
cachePredicate {object} Predicate function to decide which requests should be cached.
cacheWithContext <boolean> Include the context information in the cache identifier when caching.
conditionNames <string[]> Condition names for exports field entry point.
descriptionFiles <string[]> Filenames used to find a description file (like a package.json).
enforceExtension <boolean> Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
exportsFields <string[]> Field names from the description file (usually package.json) which are used to provide entry points of a package.
extensionAlias {object} An object which maps extension to extension aliases.
extensions <string[]> Extensions added to the request when trying to find the file.
fallback {object[]|object} Redirect module requests when normal resolving fails.
fileSystem <InputFileSystem> Filesystem for the resolver.
fullySpecified <boolean> Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
importsFields <string[]> Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
mainFields <string> Field names from the description file (package.json) which are used to find the default entry point.
mainFiles <string[]> Filenames used to find the default entry point if there is no description file or main field.
modules <string[]> Folder names or directory paths where to find modules.
plugins <"..."> Plugins for the resolver.
preferAbsolute <boolean> Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
preferRelative <boolean> Prefer to resolve module requests as relative request and fallback to resolving as module.
resolver <Resolver> Custom resolver.
restrictions <string> | <RegExp[]> A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
roots <string[]> A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
symlinks <boolean> Enable resolving symlinks to the original location.
tsconfig <string> | <boolean> TypeScript config for paths mapping. Can be false (disabled), true (use default tsconfig.json), a string path to tsconfig.json, or an object with configFile and references options.
unsafeCache <boolean> Enable caching of successfully resolved requests (cache entries are not revalidated).
useSyncFileSystemCalls <boolean> Use synchronous filesystem calls for the resolver.
A rule description with conditions and effects for modules.
Stats options object.
Attributes
Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
Sort the assets by that field.
Space to display assets (groups will be collapsed to fit this space).
Add built at time information.
Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
Show cached assets (setting this to
false
only shows emitted files).
Add information about cached (not built) modules.
Add children information.
Display auxiliary assets in chunk groups.
Display children of chunk groups.
Limit of assets displayed in chunk groups.
Display all chunk groups with the corresponding bundles.
Add built modules information to chunk information.
Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
Add the origins of chunks and chunk merging info.
Add information about parent, children and sibling chunks to chunk information.
Sort the chunks by that field.
Enables/Disables colorful output.
Context directory for request shortening.
Show chunk modules that are dependencies of other modules of the chunk.
Add module depth in module graph.
Display the entry points with the corresponding bundles.
Add details to errors (like resolving log).
Add nested errors to errors (like in AggregateError).
Space to display errors (value is in number of lines).
Add internal stack trace to errors.
Please use excludeModules instead.
Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
Group assets by how their are related to chunks.
Group assets by their status (emitted, compared for emit or cached).
Group assets by their extension.
Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
Group assets by their path.
Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
Group modules by their status (cached or built and cacheable).
Group modules by their extension.
Group modules by their layer.
Group modules by their path.
Group modules by their type.
Group reasons by their origin module.
Add the hash of the compilation.
Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
Add stack traces to logging output.
Add information about assets inside modules.
Add built modules information.
Sort the modules by that field.
Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
Add dependencies and origin of warnings/errors.
Add information about modules nested in other modules (like with module concatenation).
Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
Show reasons why optimization bailed out for modules.
Add information about orphan modules.
Add output path information.
Add performance hint flags.
Preset for the default values.
Show exports provided by modules.
Add public path information.
Add information about the reasons why modules are included.
Space to display reasons (groups will be collapsed to fit this space).
Add information about assets that are related to other assets (like SourceMaps for assets).
Add information about runtime modules (deprecated: use 'runtimeModules' instead).
Add information about runtime modules.
Add the source code of modules.
Show exports used by modules.
Add webpack version information.
Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
Space to display warnings (value is in number of lines).
Normalized webpack options object.
amd {false|object} Set the value of require.amd and define.amd. Or disable AMD support.
bail <boolean> Report the first error as a hard error instead of tolerating it.
cache {CacheOptionsNormalized} Cache generated modules and chunks to improve performance for multiple incremental builds.
context <string> The base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
dependencies <string[]> References to other configurations to depend on.
devServer {false|object} Options for the webpack-dev-server.
devtool <string> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv <boolean> Enable and configure the Dotenv plugin to load environment variables from .env files.
entry <EntryNormalized> The entry point(s) of the compilation.
experiments {ExperimentsNormalized} Enables/Disables experiments (experimental features with relax SemVer compatibility).
externals <Externals> 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.
externalsPresets {ExternalsPresets} Enable presets of externals for specific targets.
externalsType {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings {object[]} Ignore specific warnings.
infrastructureLogging {InfrastructureLogging} Options for infrastructure level logging.
loader {Loader} Custom values available in the loader context.
mode {"development"|"none"|"production"} Enable production optimizations or development hints.
module {ModuleOptionsNormalized} Options affecting the normal modules (NormalModuleFactory).
name <string> Name of the configuration. Used when loading multiple configurations.
node {Node} Include polyfills or mocks for various node stuff.
optimization {OptimizationNormalized} Enables/Disables integrated optimizations.
output {OutputNormalized} Normalized options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
parallelism <number> The number of parallel processed modules in the compilation.
performance {false|PerformanceOptions} Configuration for web performance recommendations.
plugins <WebpackPluginInstance> Add additional plugins to the compiler.
profile <boolean> Capture timing information for each module.
recordsInputPath <string> Store compiler state to a json file.
recordsOutputPath <string> Load compiler state from a json file.
resolve <ResolveOptions> Options for the resolver.
resolveLoader <ResolveOptions> Options for the resolver when resolving loaders.
snapshot {SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats {StatsValue} Stats options object or preset name.
target <string> | <string[]> Environment to build for. An array of environments to build for all of them when possible.
validate <boolean> Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch <boolean> Enter watch mode, which rebuilds on file change.
watchOptions {WatchOptions} Options for the watcher.
Plugin instance.
[index: <string> ]: <any>
apply {object} The run point of the plugin, required method.
AssetInfo = {KnownAssetInfo|Record<string, any>}
Entry = <string> | <EntryObject> | <string[]>
EntryNormalized = {object|EntryStaticNormalized}
EntryOptions = {object|Omit<EntryDescriptionNormalized, "import">}
ExternalItem = <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown>
ExternalItemFunction = {object|object}
ExternalItemFunctionCallback = {object}
ExternalItemFunctionDataGetResolve = {object}
ExternalItemFunctionDataGetResolveCallbackResult = {object}
ExternalItemFunctionDataGetResolveResult = {object}
ExternalItemFunctionPromise = {object}
ExternalItemValue = <string> | <boolean> | <string[]>
Externals = <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown> | <ExternalItem[]>
LoaderContext <OptionsType> = {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext}
LoaderDefinition <OptionsType, ContextAdditions
= {LoaderDefinitionFunction<OptionsType, ContextAdditions>|object}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {false}
MultiConfiguration = {ReadonlyArray|MultiCompilerOptions}
ParserState = {ParserStateBase|Record<string, any>}
RawLoaderDefinition <OptionsType, ContextAdditions
= {RawLoaderDefinitionFunction<OptionsType, ContextAdditions>|object}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {true}
RenderManifestEntry = {RenderManifestEntryTemplated|RenderManifestEntryStatic}
ResolvePluginInstance = {object|object}
{object}
[index: <string> ]: <any>
apply {object} The run point of the plugin, required method.
{object}
RuleSetCondition = <string> | <RegExp> | <RuleSetCondition[]>
RuleSetConditionAbsolute = <string> | <RegExp> | <RuleSetConditionAbsolute[]>
RuleSetUse = <string> | <undefined> | <null> | <string> | <RuleSetUseFunction> | <RuleSetUseFunction>
<string>
<undefined> | <null> | <string> | <RuleSetUseFunction>
<RuleSetUseFunction>
{object}
Attributes
Unique loader options identifier.
RuleSetUseFunction = {object}
RuleSetUseItem = <string> | <RuleSetUseFunction>
<string>
<RuleSetUseFunction>
{object}
Attributes
Unique loader options identifier.
StatsAsset = {KnownStatsAsset|Record<string, any>}
StatsChunk = {KnownStatsChunk|Record<string, any>}
StatsChunkGroup = {KnownStatsChunkGroup|Record<string, any>}
StatsChunkOrigin = {KnownStatsChunkOrigin|Record<string, any>}
StatsCompilation = {KnownStatsCompilation|Record<string, any>}
StatsError = {KnownStatsError|Record<string, any>}
StatsLogging = {KnownStatsLogging|Record<string, any>}
StatsLoggingEntry = {KnownStatsLoggingEntry|Record<string, any>}
StatsModule = {KnownStatsModule|Record<string, any>}
StatsModuleIssuer = {KnownStatsModuleIssuer|Record<string, any>}
StatsModuleReason = {KnownStatsModuleReason|Record<string, any>}
StatsModuleTraceDependency = {KnownStatsModuleTraceDependency|Record<string, any>}
StatsModuleTraceItem = {KnownStatsModuleTraceItem|Record<string, any>}
StatsProfile = {KnownStatsProfile|Record<string, any>}
TemplatePath = <string>
WebpackPluginFunction = {object}
const UsageState : {Readonly}
const validate : {object}
const validateSchema : {object}
schema {Parameters}
options {Parameters}
validationConfiguration {ValidationErrorConfiguration}
Returns: {void}
const version : <string>
const webpack : {_functionWebpack}
Attributes
{CallbackWebpackFunction_2<Stats, void>}
Attributes
{CallbackWebpackFunction_2<MultiStats, void>}
new AsyncDependenciesBlock ( groupOptions , loc ? , request ? ) : AsyncDependenciesBlock
Attributes
{SyntheticDependencyLocation|RealDependencyLocation}
Attributes
{GroupOptionsAsyncDependenciesBlock}
{SyntheticDependencyLocation|RealDependencyLocation}
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addDependency ( dependency ): void
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
deserialize ( __namedParameters ): void
getRootBlock (): DependenciesBlock
removeDependency ( dependency ): void
serialize ( __namedParameters ): void
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
new AutomaticPrefetchPlugin (): AutomaticPrefetchPlugin
Apply the plugin
new BannerPlugin ( options ): void
banner {object}
options {BannerPluginOptions}
Apply the plugin
callback {CallbackCacheCache}
Returns: {void}
get ( identifier , etag , callback ): void
callback {CallbackCacheCache}
Returns: {void}
store ( identifier , etag , data , callback ): void
storeBuildDependencies ( dependencies , callback ): void
dependencies {Iterable}
callback {CallbackCacheCache}
Returns: {void}
After this method has succeeded the cache can only be restored when build dependencies are
new Chunk ( name ? , backCompat ? ) : Chunk
addGroup ( chunkGroup ): void
addModule ( module ): boolean
canBeIntegrated ( otherChunk ): boolean
compareTo ( otherChunk ): - 1 | 0 | 1
containsModule ( module ): boolean
disconnectFromGroups (): void
getAllAsyncChunks (): Set < Chunk >
getAllInitialChunks (): Set < Chunk >
getAllReferencedAsyncEntrypoints (): Set < Entrypoint >
getAllReferencedChunks (): Set < Chunk >
getChildIdsByOrders ( chunkGraph , filterFn ? ) : Record < string , ChunkId [] >
{Record<string, ChunkId[]>}
getChildIdsByOrdersMap ( chunkGraph , includeDirectChildren ? , filterFn ? ) : ChunkChildIdsByOrdersMapByData
{ChunkChildIdsByOrdersMapByData}
getChildrenOfTypeInOrder ( chunkGraph , type ): ChunkChildOfTypeInOrder []
{ChunkChildOfTypeInOrder[]}
getChunkMaps ( realHash ): ChunkMaps
Stability: 0 Deprecated
getChunkModuleMaps ( filterFn ): void
filterFn {object}
Returns: {ChunkModuleMaps}
getEntryOptions (): EntryOptions
getNumberOfGroups (): number
getNumberOfModules (): number
hasAsyncChunks (): boolean
hasChildByOrder ( chunkGraph , type , includeDirectChildren ? , filterFn ? ) : boolean
hasEntryModule (): boolean
hasModuleInGraph ( filterFn , filterChunkFn ? ) : void
filterFn {object}
filterChunkFn {object}
Returns: <boolean>
integrate ( otherChunk ): boolean
integratedSize ( otherChunk , options ): number
isInGroup ( chunkGroup ): boolean
moveModule ( module , otherChunk ): void
removeGroup ( chunkGroup ): void
removeModule ( module ): void
options {ChunkSizeOptions}
Returns: <number>
updateHash ( hash , chunkGraph ): void
new ChunkGraph ( moduleGraph , hashFunction ? ) : ChunkGraph
addChunkRuntimeRequirements ( chunk , items ): void
addDependentHashModuleToChunk ( chunk , module ): void
addFullHashModuleToChunk ( chunk , module ): void
addModuleRuntimeRequirements ( module , runtime , items , transferOwnership ? ) : void
addTreeRuntimeRequirements ( chunk , items ): void
attachDependentHashModules ( chunk , modules ): void
attachFullHashModules ( chunk , modules ): void
attachModules ( chunk , modules ): void
attachRuntimeModules ( chunk , modules ): void
canChunksBeIntegrated ( chunkA , chunkB ): boolean
compareChunks ( chunkA , chunkB ): - 1 | 0 | 1
connectBlockAndChunkGroup ( depBlock , chunkGroup ): void
connectChunkAndEntryModule ( chunk , module , entrypoint ): void
connectChunkAndModule ( chunk , module ): void
connectChunkAndRuntimeModule ( chunk , module ): void
disconnectChunk ( chunk ): void
disconnectChunkAndEntryModule ( chunk , module ): void
disconnectChunkAndModule ( chunk , module ): void
disconnectChunkAndRuntimeModule ( chunk , module ): void
disconnectChunkGroup ( chunkGroup ): void
disconnectEntries ( chunk ): void
disconnectEntryModule ( module ): void
getBlockChunkGroup ( depBlock ): ChunkGroup
getChunkConditionMap ( chunk , filterFn ): ChunkConditionMap
getChunkDependentHashModulesIterable ( chunk ): Iterable < RuntimeModule , any , any >
{Iterable<RuntimeModule, any, any>}
getChunkEntryDependentChunksIterable ( chunk ): Iterable < Chunk >
getChunkEntryModulesIterable ( chunk ): Iterable < Module >
getChunkEntryModulesWithChunkGroupIterable ( chunk ): Iterable < Tuple < Module , Entrypoint >>
{Iterable<Tuple<Module, Entrypoint>>}
getChunkFullHashModulesIterable ( chunk ): Iterable < RuntimeModule , any , any >
{Iterable<RuntimeModule, any, any>}
getChunkFullHashModulesSet ( chunk ): ReadonlySet < RuntimeModule >
getChunkModuleIdMap ( chunk , filterFn , includeAllChunks ? ) : ChunkModuleIdMapEs5Alias_2
{ChunkModuleIdMapEs5Alias_2}
getChunkModuleRenderedHashMap ( chunk , filterFn , hashLength ? , includeAllChunks ? ) : ChunkModuleHashMap
getChunkModules ( chunk ): Module []
getChunkModulesIterable ( chunk ): Iterable < Module >
getChunkModulesIterableBySourceType ( chunk , sourceType ): Iterable < Module , any , any >
{Iterable<Module, any, any>}
getChunkModuleSourceTypes ( chunk , module ): ReadonlySet < string >
getChunkModulesSize ( chunk ): number
getChunkModulesSizes ( chunk ): Record < string , number >
getChunkRootModules ( chunk ): Module []
getChunkRuntimeModulesInOrder ( chunk ): RuntimeModule []
getChunkRuntimeModulesIterable ( chunk ): Iterable < RuntimeModule >
getChunkRuntimeRequirements ( chunk ): ReadonlySet < string >
getChunkSize ( chunk , options ? ) : number
getIntegratedChunksSize ( chunkA , chunkB , options ? ) : number
getModuleChunks ( module ): Chunk []
getModuleChunksIterable ( module ): Iterable < Chunk >
getModuleGraphHash ( module , runtime , withConnections ? ) : string
getModuleGraphHashBigInt ( module , runtime , withConnections ? ) : bigint
getModuleHash ( module , runtime ): string
getModuleId ( module ): string | number
getModuleRuntimeRequirements ( module , runtime ): ReadonlySet < string >
getModuleRuntimes ( module ): RuntimeSpecSet
getModuleSourceTypes ( module ): ReadonlySet < string >
getNumberOfChunkFullHashModules ( chunk ): number
getNumberOfChunkModules ( chunk ): number
getNumberOfEntryModules ( chunk ): number
getNumberOfModuleChunks ( module ): number
getNumberOfRuntimeModules ( chunk ): number
getOrderedChunkModules ( chunk , comparator ): Module []
getOrderedChunkModulesIterable ( chunk , comparator ): Iterable < Module >
getOrderedChunkModulesIterableBySourceType ( chunk , sourceType , comparator ): Iterable < Module , any , any >
{Iterable<Module, any, any>}
getOrderedModuleChunksIterable ( module , sortFn ): Iterable < Chunk >
getRenderedModuleHash ( module , runtime ): string
getRuntimeChunkDependentChunksIterable ( chunk ): Iterable < Chunk >
getRuntimeId ( runtime ): RuntimeId
getTreeRuntimeRequirements ( chunk ): ReadonlySet < string >
hasChunkEntryDependentChunks ( chunk ): boolean
hasModuleHashes ( module , runtime ): boolean
hasModuleInGraph ( chunk , filterFn , filterChunkFn ? ) : boolean
integrateChunks ( chunkA , chunkB ): void
isEntryModule ( module ): boolean
isEntryModuleInChunk ( module , chunk ): boolean
isModuleInChunk ( module , chunk ): boolean
isModuleInChunkGroup ( module , chunkGroup ): boolean
replaceModule ( oldModule , newModule ): void
setChunkModuleSourceTypes ( chunk , module , sourceTypes ): void
setModuleHashes ( module , runtime , hash , renderedHash ): void
setModuleId ( module , id ): void
setRuntimeId ( runtime , id ): void
upgradeDependentToFullHashModules ( chunk ): void
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
new ChunkGroup (): ChunkGroup
asyncEntrypointsIterable {SortableSet}
blocksIterable {Iterable}
childrenIterable {SortableSet}
chunks <Chunk[]>
debugId <string> get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
getModuleIndex {object}
getModuleIndex2 {object}
groupDebugId <number>
id <string> get a unique id for ChunkGroup, made up of its member Chunk id's
index <number>
name <string> returns the name of current ChunkGroup
sets a new name for current ChunkGroup
options {ChunkGroupOptions}
origins {OriginRecord[]}
parentsIterable {SortableSet}
addAsyncEntrypoint ( entrypoint ): boolean
addOptions ( options ): void
options {ChunkGroupOptions}
Returns: {void}
when a new chunk is added to a chunkGroup, addingOptions will occur.
addOrigin ( module , loc , request ): void
addParent ( parentChunk ): boolean
compareTo ( chunkGraph , otherGroup ): - 1 | 0 | 1
Sorting predicate which allows current ChunkGroup to be compared against another.
Sorting values are based off of number of chunks in ChunkGroup.
getBlocks (): AsyncDependenciesBlock []
getChildren (): ChunkGroup []
getChildrenByOrders ( moduleGraph , chunkGraph ): Record < string , ChunkGroup [] >
{Record<string, ChunkGroup[]>}
getModulePostOrderIndex ( module ): number
Gets the bottom-up index of a module in this ChunkGroup
getModulePreOrderIndex ( module ): number
Gets the top-down index of a module in this ChunkGroup
getNumberOfBlocks (): number
getNumberOfChildren (): number
getNumberOfParents (): number
getParents (): ChunkGroup []
hasParent ( parent ): boolean
insertChunk ( chunk , before ): boolean
inserts a chunk before another existing chunk in group
pushChunk ( chunk ): boolean
add a chunk into ChunkGroup. Is pushed on or prepended
removeChild ( group ): boolean
removeChunk ( chunk ): boolean
removeParent ( chunkGroup ): boolean
replaceChunk ( oldChunk , newChunk ): boolean
setModulePostOrderIndex ( module , index ): void
Sets the bottom-up index of a module in this ChunkGroup
setModulePreOrderIndex ( module , index ): void
Sets the top-down index of a module in this ChunkGroup
unshiftChunk ( chunk ): boolean
Performs an unshift of a specific chunk
new CleanPlugin ( options ? ) : void
Apply the plugin
{CleanPluginCompilationHooks}
new CodeGenerationResults (): CodeGenerationResults
map {Map<Module, RuntimeSpecMap<CodeGenerationResult, CodeGenerationResult>>}
add ( module , runtime , result ): void
get ( module , runtime ): CodeGenerationResult
getData ( module , runtime , key ): any
getHash ( module , runtime ): string
getRuntimeRequirements ( module , runtime ): ReadonlySet < string >
getSource ( module , runtime , sourceType ): Source
has ( module , runtime ): boolean
new Compilation ( compiler , params ): Compilation
Creates an instance of Compilation.
Attributes
{AsyncQueue<Module, string, Module>}
{AsyncQueue<Module, Module, Module>}
{WeakMap<Module, Set
>} Modules in value are building during the build of Module in key.
Means value blocking key from finishing.
Needed to detect build cycles.
{Map<DependencyConstructor, ModuleFactory>}
{Map<string, Entrypoint>}
{AsyncQueue<FactorizeModuleOptions, string, Module|ModuleFactoryResult>}
{Map<string, LogEntry[]>}
{Map<Module, WeakTupleMap<any[], any>>}
{Map<Module, WeakTupleMap<any[], any>>}
{Map<string, ChunkGroup>}
{WebpackOptionsNormalizedWithDefaults}
{OutputNormalizedWithDefaults}
{AsyncQueue<Module, Module, Module>}
{AsyncQueue<Module, Module, Module>}
{Map<string, ValueCacheVersion>}
Add additional assets to the compilation.
Add additional sections to existing assets, like a banner or initialization code.
Derive new assets from existing assets.
Existing assets should not be treated as complete.
Add development tooling to assets, e. g. by extracting a SourceMap.
Optimize existing assets in a general way.
Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
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.
Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
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.
Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
Basic preprocessing of assets.
Creating assets for reporting purposes.
Summarize the list of existing assets
e. g. creating an assets manifest of Service Workers.
addAsyncEntrypoint ( options , module , loc , request ): 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.
addChunkInGroup ( groupOptions , module ? , loc ? , request ? ) : ChunkGroup
Attributes
{SyntheticDependencyLocation|RealDependencyLocation}
If module is passed, loc and request must also be passed.
addEntry ( context , entry , optionsOrName , callback ): void
addInclude ( context , dependency , options , callback ): void
addModule ( module , callback ): void
addModuleChain ( context , dependency , callback ): void
addModuleTree ( __namedParameters , callback ): void
__namedParameters {object}
callback {object}
Returns: {void}
addRuntimeModule ( chunk , module , chunkGraph ? ) : void
assignDepth ( module ): void
Stability: 0 Deprecated
assignDepths ( modules ): void
modules {Set}
Returns: {void}
buildModule ( module , callback ): void
Schedules a build of the module object
codeGeneration ( callback ): void
callback {object}
Returns: {void}
createChildCompiler ( name , outputOptions ? , plugins ? ) : 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 ): void
callback {object}
Returns: {void}
createHash (): CodeGenerationJob []
createModuleAssets (): void
createModuleHashes (): void
createStatsFactory ( options ): void
options {NormalizedStatsOptions}
Returns: {StatsFactory}
createStatsOptions ( optionsOrPreset ? , context ? ) : NormalizedStatsOptions
Attributes
{CreateStatsOptionsContext}
createStatsPrinter ( options ): void
options {NormalizedStatsOptions}
Returns: {StatsPrinter}
emitAsset ( file , source , assetInfo ? ) : void
executeModule ( module , options , callback ): void
factorizeModule ( options , callback ): void
options {FactorizeModuleOptions|object}
callback {object}
Returns: {void}
options {FactorizeModuleOptions|object}
callback {object}
Returns: {void}
findModule ( identifier ): Module
Attempts to search for a module by its identifier
callback {object}
Returns: {void}
getAsset ( name ): Readonly < Asset >
getAssetPath ( filename , data ): string
getAssetPathWithInfo ( filename , data ): InterpolatedPathAndAssetInfo
{InterpolatedPathAndAssetInfo}
getAssets (): Readonly < Asset > []
getCache ( name ): CacheFacade
getDependencyReferencedExports ( dependency , runtime ): string []
getLogger ( name ): WebpackLogger
getModule ( module ): Module
Fetches a module from a compilation by its identifier
getPath ( filename , data ? ) : string
getPathWithInfo ( filename , data ? ) : InterpolatedPathAndAssetInfo
{InterpolatedPathAndAssetInfo}
getRenderManifest ( options ): RenderManifestEntry []
handleModuleCreation ( __namedParameters , callback ): void
__namedParameters {HandleModuleCreationOptions}
callback {object}
Returns: {void}
patchChunksAfterReasonRemoval ( module , chunk ): void
processModuleDependencies ( module , callback ): void
processModuleDependenciesNonRecursive ( module ): void
processRuntimeRequirements ( __namedParameters ? ) : void
__namedParameters {object}
Returns: {void}
rebuildModule ( module , callback ): void
removeChunkFromDependencies ( block , chunk ): void
block {DependenciesBlock}
chunk <Chunk>
Returns: {void}
removeReasonsOfDependencyBlock ( module , block ): void
renameAsset ( file , newFile ): void
reportDependencyErrorsAndWarnings ( module , blocks ): boolean
callback {object}
Returns: {void}
sortItemsWithChunkIds (): void
summarizeDependencies (): void
updateAsset ( file , newSourceOrFunction , assetInfoUpdateOrFunction ? ) : void
new Compiler ( context , options ? ) : Compiler
cache {CacheClass}
compilerPath <string>
context <string>
contextTimestamps {Map<string, "ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>}
fileTimestamps {Map<string, "ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>}
fsStartTime <number>
hooks {Readonly}
idle <boolean>
immutablePaths {Set<string|RegExp>}
infrastructureLogger {object}
inputFileSystem <InputFileSystem>
intermediateFileSystem {IntermediateFileSystem}
managedPaths {Set<string|RegExp>}
modifiedFiles {ReadonlySet}
moduleMemCaches {Map<Module, ModuleMemCachesItem>}
name <string>
options <WebpackOptionsNormalized>
outputFileSystem <OutputFileSystem>
outputPath <string>
parentCompilation <Compilation>
platform {Readonly}
records {Records}
recordsInputPath <string>
recordsOutputPath <string>
removedFiles {ReadonlySet}
requestShortener {RequestShortener}
resolverFactory {ResolverFactory}
root <Compiler>
running <boolean>
unmanagedPaths {Set<string|RegExp>}
watchFileSystem {WatchFileSystem}
watching <Watching>
watchMode <boolean>
webpack {exports}
callback {object}
Returns: {void}
callback {CallbackWebpackFunction_2<Compilation, void>}
Returns: {void}
createChildCompiler ( compilation , compilerName , compilerIndex , outputOptions ? , plugins ? ) : Compiler
createCompilation ( params ): void
createContextModuleFactory (): ContextModuleFactory
createNormalModuleFactory (): NormalModuleFactory
emitAssets ( compilation , callback ): void
emitRecords ( callback ): void
callback {object}
Returns: {void}
getCache ( name ): CacheFacade
getInfrastructureLogger ( name ): WebpackLogger
Compilation ( params ): void
CompilationParams (): object
purgeInputFileSystem (): void
readRecords ( callback ): void
callback {object}
Returns: {void}
callback {CallbackWebpackFunction_2<Stats, void>}
Returns: {void}
runAsChild ( callback ): void
callback {object}
Returns: {void}
validate ( schema , value , options ? , check ? ) : void
schema {JSONSchema4|ExtendedSchema|JSONSchema6|ExtendedSchema|JSONSchema7|ExtendedSchema|object}
value {T}
options {ValidationErrorConfiguration}
check {object}
Returns: {void}
Schema validation function with optional pre-compiled check
watch ( watchOptions , handler ): void
watchOptions {WatchOptions}
handler {CallbackWebpackFunction_2<Stats, void>}
Returns: <Watching>
new ConcatenationScope ( modulesMap , currentModule , usedNames ): void
modulesMap {ModuleInfo[]|Map<Module, ModuleInfo>}
currentModule {ConcatenatedModuleInfo}
usedNames {Set}
Returns: <ConcatenationScope>
createModuleReference ( module , __namedParameters ): string
getRawExport ( exportName ): string
isModuleInScope ( module ): boolean
registerExport ( exportName , symbol ): void
registerNamespaceExport ( symbol ): void
registerRawExport ( exportName , expression ): void
setRawExportMap ( exportName , expression ): void
{ModuleReferenceOptions|object}
new ContextExclusionPlugin ( negativeMatcher ): ContextExclusionPlugin
Apply the plugin
new ContextReplacementPlugin ( resourceRegExp , newContentResource ? , newContentRecursive ? , newContentRegExp ? ) : ContextReplacementPlugin
newContentCallback {object}
newContentCreateContextMap {object}
newContentRecursive <boolean>
newContentRegExp <RegExp>
newContentResource <string>
resourceRegExp <RegExp>
Apply the plugin
new DefinePlugin ( definitions ): void
Create a new define plugin
definitions {Definitions}
Apply the plugin
fn {object}
options <string[]>
Returns: {RuntimeValue}
new DelegatedPlugin ( options ): void
Apply the plugin
{ModuleDependency}
{NullDependency}
new Dependency (): Dependency
couldAffectReferencingModule (): boolean | symbol
createIgnoredModule ( context ): Module
deserialize ( __namedParameters ): void
getCondition ( moduleGraph ): false | object
getErrors ( moduleGraph ): WebpackError []
Returns errors
getExports ( moduleGraph ): ExportsSpec
Returns the exported names
getModuleEvaluationSideEffectsState ( moduleGraph ): ConnectionState
getNumberOfIdOccurrences (): number
implement this method to allow the occurrence order plugin to count correctly
getReference ( moduleGraph ): never
Stability: 0 Deprecated
Returns the referenced module and export
getReferencedExports ( moduleGraph , runtime ): string []
Returns list of exports referenced by this dependency
getResourceIdentifier (): string
getWarnings ( moduleGraph ): WebpackError []
Returns warnings
serialize ( __namedParameters ): void
setLoc ( startLine , startColumn , endLine , endColumn ): void
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Update the hash
new DllPlugin ( options ): void
options {DllPluginOptions}
Apply the plugin
new DllReferencePlugin ( options ): void
options {DllReferencePluginOptions}
Apply the plugin
new DotenvPlugin ( options ? ) : void
options {DotenvPluginOptions}
new DynamicEntryPlugin ( context , entry ): DynamicEntryPlugin
Apply the plugin
new EntryOptionPlugin (): EntryOptionPlugin
Attributes
{EntryDescriptionNormalized}
new EntryPlugin ( context , entry , options ? ) : EntryPlugin
An entry plugin which will handle creation of the EntryDependency
Apply the plugin
new Entrypoint (): Entrypoint
asyncEntrypointsIterable {SortableSet}
blocksIterable {Iterable}
childrenIterable {SortableSet}
chunks <Chunk[]>
debugId <string> get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
getModuleIndex {object}
getModuleIndex2 {object}
groupDebugId <number>
id <string> get a unique id for ChunkGroup, made up of its member Chunk id's
index <number>
name <string> returns the name of current ChunkGroup
sets a new name for current ChunkGroup
options {ChunkGroupOptions}
origins {OriginRecord[]}
parentsIterable {SortableSet}
addAsyncEntrypoint ( entrypoint ): boolean
addDependOn ( entrypoint ): void
addOptions ( options ): void
options {ChunkGroupOptions}
Returns: {void}
when a new chunk is added to a chunkGroup, addingOptions will occur.
addOrigin ( module , loc , request ): void
addParent ( parentChunk ): boolean
compareTo ( chunkGraph , otherGroup ): - 1 | 0 | 1
Sorting predicate which allows current ChunkGroup to be compared against another.
Sorting values are based off of number of chunks in ChunkGroup.
dependOn ( entrypoint ): boolean
getBlocks (): AsyncDependenciesBlock []
getChildren (): ChunkGroup []
getChildrenByOrders ( moduleGraph , chunkGraph ): Record < string , ChunkGroup [] >
{Record<string, ChunkGroup[]>}
getEntrypointChunk (): Chunk
Returns the chunk which contains the entrypoint modules
(or at least the execution of them)
getModulePostOrderIndex ( module ): number
Gets the bottom-up index of a module in this ChunkGroup
getModulePreOrderIndex ( module ): number
Gets the top-down index of a module in this ChunkGroup
getNumberOfBlocks (): number
getNumberOfChildren (): number
getNumberOfParents (): number
getParents (): ChunkGroup []
Fetches the chunk reference containing the webpack bootstrap code
hasParent ( parent ): boolean
insertChunk ( chunk , before ): boolean
inserts a chunk before another existing chunk in group
pushChunk ( chunk ): boolean
add a chunk into ChunkGroup. Is pushed on or prepended
removeChild ( group ): boolean
removeChunk ( chunk ): boolean
removeParent ( chunkGroup ): boolean
replaceChunk ( oldChunk , newChunk ): boolean
setEntrypointChunk ( chunk ): void
Sets the chunk with the entrypoint modules for an entrypoint.
setModulePostOrderIndex ( module , index ): void
Sets the bottom-up index of a module in this ChunkGroup
setModulePreOrderIndex ( module , index ): void
Sets the top-down index of a module in this ChunkGroup
setRuntimeChunk ( chunk ): void
Sets the runtimeChunk for an entrypoint.
unshiftChunk ( chunk ): boolean
Performs an unshift of a specific chunk
new EnvironmentPlugin ( keys ): void
defaultValues {Record<string, any>}
keys <string[]>
Apply the plugin
new EvalDevToolModulePlugin ( options ? ) : void
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
sourceUrlComment <string>
Apply the plugin
new EvalSourceMapDevToolPlugin ( inputOptions ? ) : EvalSourceMapDevToolPlugin
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
options {SourceMapDevToolPluginOptions}
sourceMapComment <string>
Apply the plugin
new ExternalModule ( request , type , userRequest , dependencyMeta ? ) : void
request {ExternalModuleRequest}
type {ExternalsType}
userRequest <string>
dependencyMeta {ImportDependencyMeta|CssImportDependencyMeta|AssetDependencyMeta}
Returns: <ExternalModule>
Attributes
{ImportDependencyMeta|CssImportDependencyMeta|AssetDependencyMeta}
{ModuleExternalInitFragment}
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
restoreFromUnsafeCache ( unsafeCacheData , normalModuleFactory ): void
unsafeCacheData {UnsafeCacheData}
normalModuleFactory {NormalModuleFactory}
Returns: {void}
restore unsafe cache data
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new ExternalsPlugin ( type , externals ): void
type {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"|object}
externals <Externals>
Returns: <ExternalsPlugin>
Attributes
{"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"|object}
Apply the plugin
new Generator (): Generator
generate ( module , __namedParameters ): Source
getConcatenationBailoutReason ( module , context ): string
Attributes
{ConcatenationBailoutReasonContext}
getSize ( module , type ? ) : number
getTypes ( module ): ReadonlySet < string >
updateHash ( hash , __namedParameters ): void
hash {Hash}
__namedParameters {UpdateHashContextGenerator}
Returns: {void}
map {object}
Returns: {ByTypeGenerator}
new HotModuleReplacementPlugin (): HotModuleReplacementPlugin
Apply the plugin
parser {JavascriptParser}
Returns: {HMRJavascriptParserHooks}
new HotUpdateChunk (): HotUpdateChunk
addGroup ( chunkGroup ): void
addModule ( module ): boolean
canBeIntegrated ( otherChunk ): boolean
compareTo ( otherChunk ): - 1 | 0 | 1
containsModule ( module ): boolean
disconnectFromGroups (): void
getAllAsyncChunks (): Set < Chunk >
getAllInitialChunks (): Set < Chunk >
getAllReferencedAsyncEntrypoints (): Set < Entrypoint >
getAllReferencedChunks (): Set < Chunk >
getChildIdsByOrders ( chunkGraph , filterFn ? ) : Record < string , ChunkId [] >
{Record<string, ChunkId[]>}
getChildIdsByOrdersMap ( chunkGraph , includeDirectChildren ? , filterFn ? ) : ChunkChildIdsByOrdersMapByData
{ChunkChildIdsByOrdersMapByData}
getChildrenOfTypeInOrder ( chunkGraph , type ): ChunkChildOfTypeInOrder []
{ChunkChildOfTypeInOrder[]}
getChunkMaps ( realHash ): ChunkMaps
Stability: 0 Deprecated
getChunkModuleMaps ( filterFn ): void
filterFn {object}
Returns: {ChunkModuleMaps}
getEntryOptions (): EntryOptions
getNumberOfGroups (): number
getNumberOfModules (): number
hasAsyncChunks (): boolean
hasChildByOrder ( chunkGraph , type , includeDirectChildren ? , filterFn ? ) : boolean
hasEntryModule (): boolean
hasModuleInGraph ( filterFn , filterChunkFn ? ) : void
filterFn {object}
filterChunkFn {object}
Returns: <boolean>
integrate ( otherChunk ): boolean
integratedSize ( otherChunk , options ): number
isInGroup ( chunkGroup ): boolean
moveModule ( module , otherChunk ): void
removeGroup ( chunkGroup ): void
removeModule ( module ): void
options {ChunkSizeOptions}
Returns: <number>
updateHash ( hash , chunkGraph ): void
new IgnorePlugin ( options ): void
options {IgnorePluginOptions}
Apply the plugin
checkIgnore ( resolveData ): false
Note that if "contextRegExp" is given, both the "resourceRegExp" and "contextRegExp" have to match.
new InitFragment ( content , stage , position , key ? , endContent ? ) : InitFragment < GenerateContext >
deserialize ( context ): void
getContent ( context ): void
context {GenerateContext}
Returns: <string>
getEndContent ( context ): void
context {GenerateContext}
Returns: <string>
source {Source}
initFragments {MaybeMergeableInitFragment[]}
context {Context}
Returns: {Source}
new JavascriptModulesPlugin ( options ? ) : void
options {object}
chunkHasJs {object}
Apply the plugin
renderBootstrap ( renderContext , hooks ): void
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {Bootstrap}
renderChunk ( renderContext , hooks ): void
renderContext {RenderContextJavascriptModulesPlugin}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {Source}
renderMain ( renderContext , hooks , compilation ): void
renderContext {MainRenderContext}
hooks {CompilationHooksJavascriptModulesPlugin}
compilation <Compilation>
Returns: {Source}
renderModule ( module , renderContext , hooks ): Source
Attributes
{CompilationHooksJavascriptModulesPlugin}
renderRequire ( renderContext , hooks ): void
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: <string>
updateHashWithBootstrap ( hash , renderContext , hooks ): void
hash {Hash}
renderContext {RenderBootstrapContext}
hooks {CompilationHooksJavascriptModulesPlugin}
Returns: {void}
Attributes
{OutputNormalizedWithDefaults}
{CompilationHooksJavascriptModulesPlugin}
new LibManifestPlugin ( options ): void
options {LibManifestPluginOptions}
Apply the plugin
new LibraryTemplatePlugin ( name , target , umdNamedDefine , auxiliaryComment , exportProperty ): void
Apply the plugin
new LoaderOptionsPlugin ( options ? ) : void
options {LoaderOptionsPluginOptions|MatchObject}
Apply the plugin
new LoaderTargetPlugin ( target ): LoaderTargetPlugin
Apply the plugin
new ManifestPlugin ( options ? ) : void
options {ManifestPluginOptions}
Apply the plugin
new Module ( type , context ? , layer ? ) : Module
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new ModuleFactory (): ModuleFactory
create ( data , callback ): void
data {ModuleFactoryCreateData}
callback {object}
Returns: {void}
new ModuleGraph (): ModuleGraph
addExplanation ( dependency , explanation ): void
addExtraReason ( module , explanation ): void
fn {object}
args {T}
Returns: {R}
cloneModuleAttributes ( sourceModule , targetModule ): void
copyOutgoingModuleConnections ( oldModule , newModule , filterConnection ): void
dependencyCacheProvide ( dependency , args ): void
dependency {D}
args {Tuple<ARGS, unknown>}
Returns: {R}
finishUpdateParent (): void
freeze ( cacheStage ? ) : void
getConnection ( dependency ): ModuleGraphConnection
getExportInfo ( module , exportName ): ExportInfo
getExportsInfo ( module ): ExportsInfo
getIncomingConnections ( module ): Iterable < ModuleGraphConnection >
getIncomingConnectionsByOriginModule ( module ): ReadonlyMap < Module , ModuleGraphConnection [] >
{ReadonlyMap<Module, ModuleGraphConnection[]>}
getIssuer ( module ): Module
thing {object}
Returns: {Meta}
getMetaIfExisting ( thing ): void
thing {object}
Returns: {Meta}
getModule ( dependency ): Module
getOptimizationBailout ( module ): string
getOrigin ( dependency ): Module
getOutgoingConnections ( module ): Iterable < ModuleGraphConnection >
getOutgoingConnectionsByModule ( module ): ReadonlyMap < Module , ModuleGraphConnection [] >
{ReadonlyMap<Module, ModuleGraphConnection[]>}
getParentBlock ( dependency ): DependenciesBlock
getParentBlockIndex ( dependency ): number
getParentModule ( dependency ): Module
getPostOrderIndex ( module ): number
getPreOrderIndex ( module ): number
getProfile ( module ): ModuleProfile
getProvidedExports ( module ): string []
getReadOnlyExportInfo ( module , exportName ): ExportInfo
getResolvedModule ( dependency ): Module
getResolvedOrigin ( dependency ): Module
getUsedExports ( module , runtime ): boolean | SortableSet < string >
isDeferred ( module ): boolean
isExportProvided ( module , exportName ): boolean
moveModuleConnections ( oldModule , newModule , filterConnection ): void
removeAllModuleAttributes (): void
removeConnection ( dependency ): void
removeModuleAttributes ( module ): void
setDepth ( module , depth ): void
setDepthIfLower ( module , depth ): boolean
setIssuer ( module , issuer ): void
setIssuerIfUnset ( module , issuer ): void
setModuleMemCaches ( moduleMemCaches ): void
moduleMemCaches {Map<Module, WeakTupleMap<any[], any>>}
Returns: {void}
setParentDependenciesBlockIndex ( dependency , index ): void
setParents ( dependency , block , module , indexInBlock ? ) : void
setPostOrderIndex ( module , index ): void
setPostOrderIndexIfUnset ( module , index ): boolean
setPreOrderIndex ( module , index ): void
setPreOrderIndexIfUnset ( module , index ): boolean
setProfile ( module , profile ? ) : void
setResolvedModule ( originModule , dependency , module ): void
updateModule ( dependency , module ): void
updateParent ( dependency , connection ? , parentModule ? ) : void
Stability: 0 Deprecated
Stability: 0 Deprecated
Stability: 0 Deprecated
new ModuleGraphConnection ( originModule , dependency , module , explanation ? , weak ? , condition ? ) : ModuleGraphConnection
addCondition ( condition ): void
condition {object}
Returns: {void}
addExplanation ( explanation ): void
clone (): ModuleGraphConnection
getActiveState ( runtime ): void
runtime {RuntimeSpec}
Returns: {ConnectionState}
isTargetActive ( runtime ): void
new MultiCompiler ( compilers , options ): void
Attributes
{WeakMap<Compiler, string[]>}
callback {object}
Returns: {void}
getInfrastructureLogger ( name ): WebpackLogger
purgeInputFileSystem (): void
callback {CallbackWebpackFunction_2<MultiStats, void>}
Returns: {void}
runWithDependencies ( compilers , fn , callback ): void
Stability: 0 Deprecated
Attributes
{CallbackWebpackFunction_2<Stats[], void>}
This method should have been private
setDependencies ( compiler , dependencies ): void
validateDependencies ( callback ): void
callback {CallbackWebpackFunction_2<MultiStats, void>}
Returns: <boolean>
watch ( watchOptions , handler ): void
watchOptions {WatchOptions|WatchOptions[]}
handler {CallbackWebpackFunction_2<MultiStats, void>}
Returns: {MultiWatching}
new MultiStats (): MultiStats
toJson ( options ? ) : StatsCompilation
toString ( options ? ) : string
new NoEmitOnErrorsPlugin (): NoEmitOnErrorsPlugin
Apply the plugin
new NormalModule ( __namedParameters ): void
Attributes
{ResourceSchemeData|Partial
}
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
applyNoParseRule ( rule , content ): boolean
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
createSource ( context , content , sourceMap ? , associatedObjectForCache ? ) : Source
createSourceForAsset ( context , name , content , sourceMap ? , associatedObjectForCache ? ) : Source
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getCurrentLoader ( loaderContext , index ? ) : void
loaderContext {AnyLoaderContext}
index <number>
Returns: {LoaderItem}
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
markModuleAsErrored ( error ): void
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
restoreFromUnsafeCache ( unsafeCacheData , normalModuleFactory ): void
unsafeCacheData {UnsafeCacheData}
normalModuleFactory {NormalModuleFactory}
Returns: {void}
restore unsafe cache data
serialize ( __namedParameters ): void
shouldPreventParsing ( noParseRule , request ): boolean
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
{NormalModuleCompilationHooks}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new NormalModuleReplacementPlugin ( resourceRegExp , newResource ): NormalModuleReplacementPlugin
Create an instance of the plugin
Apply the plugin
new Parser (): ParserClass
parse ( source , state ): void
new PlatformPlugin ( platform ): void
Apply the plugin
new PrefetchPlugin ( context , request ? ) : PrefetchPlugin
Apply the plugin
new ProgressPlugin ( options ? ) : void
Attributes
{"entries"|"modules"|"dependencies"}
{Required<Omit<ProgressPluginOptions, "handler">>}
new ProvidePlugin ( definitions ): void
definitions {Record<string, string|string[]>}
Apply the plugin
fileSystem {FileSystem}
hooks {KnownHooks}
options {ResolveOptionsResolverFactoryObject1}
doResolve ( hook , request , message , resolveContext , callback ): void
hook {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
request {ResolveRequest}
message <string>
resolveContext {ResolveContext}
callback {object}
Returns: {void}
name {string|AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest, UnsetAdditionalOptions>}
Returns: {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
name {string|AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest, UnsetAdditionalOptions>}
Returns: {AsyncSeriesBailHook<Tuple<ResolveRequest, ResolveContext>, ResolveRequest>}
isDirectory ( path ): boolean
join ( path , request ): string
parse ( identifier ): ParsedIdentifier
resolve ( context , path , request , resolveContext , callback ): void
context {ContextTypes}
path <string>
request <string>
resolveContext {ResolveContext}
callback {object}
Returns: {void}
resolveSync ( context , path , request ): void
{GetChunkFilenameRuntimeModule}
{JsonpChunkLoadingRuntimeModule}
{CssLoadingRuntimeModule}
{ModuleChunkLoadingRuntimeModule}
new RuntimeModule ( name , stage ? ) : RuntimeModule
Attributes
Runtime modules which attach to handlers of other runtime modules
Runtime modules with simple dependencies on other runtime modules
Runtime modules without any dependencies to other runtime modules
Runtime modules which trigger actions on bootstrap
Adds a DependencyBlock to DependencyBlock relationship.
This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
addCacheDependencies ( fileDependencies , contextDependencies , missingDependencies , buildDependencies ): void
fileDependencies {LazySet}
contextDependencies {LazySet}
missingDependencies {LazySet}
buildDependencies {LazySet}
Returns: {void}
addCodeGenerationDependency ( codeGenerationDependency ): void
addDependency ( dependency ): void
addPresentationalDependency ( presentationalDependency ): void
addWarning ( warning ): void
attach ( compilation , chunk , chunkGraph ? ) : void
build ( options , compilation , resolver , fs , callback ): void
options {WebpackOptionsNormalizedWithDefaults}
compilation <Compilation>
resolver {ResolverWithOptions}
fs <InputFileSystem>
callback {object}
Returns: {void}
chunkCondition ( chunk , compilation ): boolean
Assuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks (): void
Removes all dependencies and blocks
clearWarningsAndErrors (): void
removes all warnings and errors
codeGeneration ( context ): void
context {CodeGenerationContext}
Returns: {CodeGenerationResult}
deserialize ( __namedParameters ): void
getConcatenationBailoutReason ( context ): void
context {ConcatenationBailoutReasonContext}
Returns: <string>
getErrors (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
getExportsType ( moduleGraph , strict ? ) : ExportsType
getGeneratedCode (): string
getNumberOfChunks (): number
getNumberOfErrors (): number
getNumberOfWarnings (): number
getRootBlock (): DependenciesBlock
getSideEffectsConnectionState ( moduleGraph ): ConnectionState
getSourceBasicTypes (): ReadonlySet < string >
Basic source types are high-level categories like javascript, css, webassembly, etc.
We only have built-in knowledge about the javascript basic type here; other basic types may be
added or changed over time by generators and do not need to be handled or detected here.
Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
getSourceTypes (): ReadonlySet < string >
getUnsafeCacheData (): UnsafeCacheData
Module should be unsafe cached. Get data that's needed for that.
This data will be passed to restoreFromUnsafeCache later.
getWarnings (): Iterable < WebpackError , any , any >
{Iterable<WebpackError, any, any>}
hasChunkCondition (): boolean
hasReasonForChunk ( chunk , moduleGraph , chunkGraph ): boolean
hasReasons ( moduleGraph , runtime ): boolean
isAccessibleInChunk ( chunkGraph , chunk , ignoreChunk ? ) : boolean
isAccessibleInChunkGroup ( chunkGraph , chunkGroup , ignoreChunk ? ) : boolean
isInChunk ( chunk ): boolean
isOptional ( moduleGraph ): boolean
isProvided ( exportName ): boolean
options {LibIdentOptions}
Returns: <string>
nameForCondition (): string
needBuild ( context , callback ): void
context {NeedBuildContext}
callback {object}
Returns: {void}
needRebuild ( fileTimestamps , contextTimestamps ): void
Stability: 0 Deprecated
fileTimestamps {Map<string, number>}
contextTimestamps {Map<string, number>}
Returns: <boolean>
Use needBuild instead
readableIdentifier ( requestShortener ): void
requestShortener {RequestShortener}
Returns: <string>
removeDependency ( dependency ): void
serialize ( __namedParameters ): void
source ( dependencyTemplates , runtimeTemplate , type ? ) : void
Stability: 0 Deprecated
dependencyTemplates {DependencyTemplates}
runtimeTemplate {RuntimeTemplate}
type <string>
Returns: {Source}
Use codeGeneration() instead
updateCacheModule ( module ): void
Assuming this module is in the cache. Update the (cached) module with
the fresh module from the factory. Usually updates internal references
and properties.
updateHash ( hash , context ): void
hash {Hash}
context {UpdateHashContextDependency}
Returns: {void}
Stability: 0 Deprecated
In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
new SourceMapDevToolPlugin ( options ? ) : void
fallbackModuleFilenameTemplate {DevtoolFallbackModuleFilenameTemplate}
moduleFilenameTemplate {DevtoolModuleFilenameTemplate}
namespace <string>
options {SourceMapDevToolPluginOptions}
sourceMapFilename <string>
sourceMappingURLComment <string>
Apply the plugin
new Stats ( compilation ): Stats
toJson ( options ? ) : StatsCompilation
toString ( options ? ) : string
modules {WithId[]}
Returns: {false|Tuple<number, number>}
renderContext {ChunkRenderContextJavascriptModulesPlugin}
modules <Module[]>
renderModule {object}
prefix <string>
Returns: {Source}
Attributes
{RenderContextJavascriptModulesPlugin}
Attributes
{RenderContextJavascriptModulesPlugin|object}
new WatchIgnorePlugin ( options ): void
options {WatchIgnorePluginOptions}
Apply the plugin
Attributes
{CallbackWebpackFunction_2<Stats, void>}
callback {object}
Returns: {void}
invalidate ( callback ? ) : void
callback {object}
Returns: {void}
watch ( files , dirs , missing ): void
files {Iterable}
dirs {Iterable}
missing {Iterable}
Returns: {void}
[index: <number> ]: {object}
new WebpackError ( message ? , options ? ) : WebpackError
Creates an instance of WebpackError.
Attributes
{SyntheticDependencyLocation|RealDependencyLocation}
The
Error.stackTraceLimit
property specifies the number of stack frames
collected by a stack trace (whether generated by
new Error().stack
or
Error.captureStackTrace(obj)
).
The default value is
10
but may be set to any valid JavaScript number. Changes
will affect any stack trace captured
after
the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
deserialize ( __namedParameters ): void
serialize ( __namedParameters ): void
targetObject {object}
constructorOpt <Function>
Returns: {void}
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {} ;
Error . captureStackTrace ( myObject ) ;
myObject . stack ; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a () {
b () ;
}
function b () {
c () ;
}
function c () {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error ;
Error . stackTraceLimit = 0 ;
const error = new Error () ;
Error . stackTraceLimit = stackTraceLimit ;
// Capture the stack trace above function b
Error . captureStackTrace ( error , b ) ; // Neither function c, nor b is included in the stack trace
throw error ;
}
a () ;
new WebpackOptionsApply (): WebpackOptionsApply
process ( options , compiler , interception ? ) : void
options {WebpackOptionsNormalizedWithDefaults}
compiler <Compiler>
interception {WebpackOptionsInterception}
Returns: {WebpackOptionsNormalizedWithDefaults}
new WebpackOptionsDefaulter (): WebpackOptionsDefaulter
process ( options ): WebpackOptionsNormalized
new WebpackOptionsValidationError ( errors , schema , configuration ? ) : void
errors {SchemaUtilErrorObject[]} array of error objects
schema {Schema} schema
configuration {ValidationErrorConfiguration} configuration
Returns: {ValidationError}
Attributes
{SchemaUtilErrorObject[]}
The
Error.stackTraceLimit
property specifies the number of stack frames
collected by a stack trace (whether generated by
new Error().stack
or
Error.captureStackTrace(obj)
).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
formatSchema ( schema , logic ? , prevSchemas ? ) : void
schema {Schema} schema
logic <boolean> logic
prevSchemas {object[]} prev schemas
Returns: <string> formatted schema
formatValidationError ( error ): void
error {SchemaUtilErrorObject} error object
Returns: <string> formatted error object
formatValidationErrors ( errors ): void
errors {SchemaUtilErrorObject[]} errors
Returns: <string> formatted errors
getSchemaPart ( path ): Schema
getSchemaPartDescription ( schemaPart ? ) : void
schemaPart {Schema} schema part
Returns: <string> schema part description
getSchemaPartText ( schemaPart ? , additionalPath ? , needDot ? , logic ? ) : void
targetObject {object}
constructorOpt <Function>
Returns: {void}
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {} ;
Error . captureStackTrace ( myObject ) ;
myObject . stack ; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a () {
b () ;
}
function b () {
c () ;
}
function c () {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error ;
Error . stackTraceLimit = 0 ;
const error = new Error () ;
Error . stackTraceLimit = stackTraceLimit ;
// Capture the stack trace above function b
Error . captureStackTrace ( error , b ) ; // Neither function c, nor b is included in the stack trace
throw error ;
}
a () ;
configs {ArgumentConfig[]}
description <string>
multiple <boolean>
simpleType {SimpleType}
Attributes
the filename of the asset
{Source} source of the asset
bgBlack {object}
bgBlackBright {object}
bgBlue {object}
bgBlueBright {object}
bgCyan {object}
bgCyanBright {object}
bgGreen {object}
bgGreenBright {object}
bgMagenta {object}
bgMagentaBright {object}
bgRed {object}
bgRedBright {object}
bgWhite {object}
bgWhiteBright {object}
bgYellow {object}
bgYellowBright {object}
black {object}
blackBright {object}
blue {object}
blueBright {object}
bold {object}
cyan {object}
cyanBright {object}
dim {object}
gray {object}
green {object}
greenBright {object}
hidden {object}
inverse {object}
italic {object}
magenta {object}
magentaBright {object}
red {object}
redBright {object}
reset {object}
strikethrough {object}
underline {object}
white {object}
whiteBright {object}
yellow {object}
yellowBright {object}
Options object as provided by the user.
amd {false|object} Set the value of require.amd and define.amd. Or disable AMD support.
bail <boolean> Report the first error as a hard error instead of tolerating it.
cache <boolean> | <FileCacheOptions> | <MemoryCacheOptions> Cache generated modules and chunks to improve performance for multiple incremental builds.
context <string> The base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
dependencies <string[]> References to other configurations to depend on.
devtool <string> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv <boolean> Enable and configure the Dotenv plugin to load environment variables from .env files.
entry <string> | <string[]> | <EntryObject> The entry point(s) of the compilation.
experiments {Experiments} Enables/Disables experiments (experimental features with relax SemVer compatibility).
extends <string> | <string[]> Extend configuration from another configuration (only works when using webpack-cli).
externals <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown> | <ExternalItem[]> 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.
externalsPresets {ExternalsPresets} Enable presets of externals for specific targets.
externalsType {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings <RegExp> Ignore specific warnings.
infrastructureLogging {InfrastructureLogging} Options for infrastructure level logging.
loader {Loader} Custom values available in the loader context.
mode {"development"|"none"|"production"} Enable production optimizations or development hints.
module <ModuleOptions> Options affecting the normal modules (NormalModuleFactory).
name <string> Name of the configuration. Used when loading multiple configurations.
node {false|NodeOptions} Include polyfills or mocks for various node stuff.
optimization {Optimization} Enables/Disables integrated optimizations.
output {Output} Options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
parallelism <number> The number of parallel processed modules in the compilation.
performance {false|PerformanceOptions} Configuration for web performance recommendations.
plugins <WebpackPluginInstance> Add additional plugins to the compiler.
profile <boolean> Capture timing information for each module.
recordsInputPath <string> Store compiler state to a json file.
recordsOutputPath <string> Load compiler state from a json file.
recordsPath <string> 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.
resolve <ResolveOptions> Options for the resolver.
resolveLoader <ResolveOptions> Options for the resolver when resolving loaders.
snapshot {SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats <boolean> | <StatsOptions> Stats options object or preset name.
target <string> | <string[]> Environment to build for. An array of environments to build for all of them when possible.
validate <boolean> Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch <boolean> Enter watch mode, which rebuilds on file change.
watchOptions {WatchOptions} Options for the watcher.
Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
[index: <string> ]: <string> | <string[]>
Attributes
the directory in which the request is placed
{ModuleFactoryCreateDataContextInfo} contextual information
the category of the referencing dependency
{object} get a resolve function with the current resolver options
the request as written by the user in the require/import expression/statement
If an dependency matches exactly a property of the object, the property value is used as dependency.
byLayer {object|object} Specify externals depending on the layer.
If an dependency matches exactly a property of the object, the property value is used as dependency.
[index: <string> ]: <ExternalItemValue>
Options object for persistent file-based caching.
Attributes
Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.
{object} Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
Base directory for the cache (defaults to node_modules/.cache/webpack).
Locations for the cache (defaults to cacheDirectory / name).
{false|"gzip"|"brotli"} Compression type used for the cache files.
Algorithm used for generation the hash (see node.js crypto package).
Time in ms after which idle period the cache storing should happen.
Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).
Time in ms after which idle period the initial cache storing should happen.
List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).
Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.
Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.
Name for the cache. Different names will lead to different coexisting caches.
Track and log detailed timing information for individual cache items.
Enable/disable readonly mode.
{"pack"} When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
{"filesystem"} Filesystem caching.
Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.
Specify options for each generator.
asset {AssetGeneratorOptions} Generator options for asset modules.
asset/bytes {EmptyGeneratorOptions} No generator options are supported for this module type.
asset/inline {AssetInlineGeneratorOptions} Generator options for asset/inline modules.
asset/resource {AssetResourceGeneratorOptions} Generator options for asset/resource modules.
asset/source {EmptyGeneratorOptions} No generator options are supported for this module type.
css {CssGeneratorOptions} Generator options for css modules.
css/auto {CssModuleGeneratorOptions} Generator options for css/module modules.
css/global {CssModuleGeneratorOptions} Generator options for css/module modules.
css/module {CssModuleGeneratorOptions} Generator options for css/module modules.
javascript {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/auto {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/dynamic {EmptyGeneratorOptions} No generator options are supported for this module type.
javascript/esm {EmptyGeneratorOptions} No generator options are supported for this module type.
json {JsonGeneratorOptions} Generator options for json modules.
dirname {object}
join {object}
lstat {LStatFs}
lstatSync {LStatSync}
purge {object}
readdir {ReaddirFs}
readdirSync {ReaddirSync}
readFile {ReadFileFs}
readFileSync {ReadFileSync}
readJson {object}
readJsonSync {object}
readlink {ReadlinkFs}
readlinkSync {ReadlinkSync}
realpath {RealPathFs}
realpathSync {RealPathSync}
relative {object}
stat {StatFs}
statSync {StatSync}
Options for library.
Attributes
Add a container for define/require functions in the AMD module.
Add a comment in the UMD wrapper.
Specify which export should be exposed as library.
The name of the library (some types allow unnamed libraries too).
Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
If
output.libraryTarget
is set to umd and
output.library
is set, setting this to true will name the AMD module.
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
content <string>
sourceMap <string>
additionalData {AdditionalData}
Returns: {string|void|Buffer|Promise<string|Buffer>}
default {RawLoaderDefinitionFunction<OptionsType, ContextAdditions>|LoaderDefinitionFunction<OptionsType, ContextAdditions>}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {false}
Options object for in-memory caching.
Attributes
Additionally cache computation of modules that are unchanged and reference only unchanged modules.
Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).
{"memory"} In memory caching.
Options affecting the normal modules (NormalModuleFactory).
Attributes
An array of rules applied by default for modules.
Enable warnings for full dynamic dependencies.
Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
{GeneratorOptionsByModuleType} Specify options for each generator.
Don't parse files matching. It's matched against the full resolved request.
{ParserOptionsByModuleType} Specify options for each parser.
An array of rules applied for modules.
Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
Cache the resolving of module requests.
Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
Attributes
how many Compilers are allows to run at the same time in parallel
read {object}
setCircularReference {object}
rollback {object}
setCircularReference {object}
snapshot {object}
write {object}
writeLazy {object}
writeSeparate {object}
createReadStream {object}
dirname {object}
join {object}
lstat {LStatFs}
mkdir {Mkdir}
readdir {ReaddirFs}
readFile {ReadFileFs}
relative {object}
rmdir {object}
stat {StatFs}
unlink {object}
writeFile {WriteFile}
Specify options for each parser.
asset {AssetParserOptions} Parser options for asset modules.
asset/bytes {EmptyParserOptions} No parser options are supported for this module type.
asset/inline {EmptyParserOptions} No parser options are supported for this module type.
asset/resource {EmptyParserOptions} No parser options are supported for this module type.
asset/source {EmptyParserOptions} No parser options are supported for this module type.
css {CssParserOptions} Parser options for css modules.
css/auto {CssModuleParserOptions} Parser options for css/module modules.
css/global {CssModuleParserOptions} Parser options for css/module modules.
css/module {CssModuleParserOptions} Parser options for css/module modules.
javascript {JavascriptParserOptions} Parser options for javascript modules.
javascript/auto {JavascriptParserOptions} Parser options for javascript modules.
javascript/dynamic {JavascriptParserOptions} Parser options for javascript modules.
javascript/esm {JavascriptParserOptions} Parser options for javascript modules.
json {JsonParserOptions} Parser options for JSON modules.
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
remainingRequest <string>
previousRequest <string>
data {object}
Returns: {string|void|Buffer|Promise<string|Buffer>}
this {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions}
content {Buffer}
sourceMap <string>
additionalData {AdditionalData}
Returns: {string|void|Buffer|Promise<string|Buffer>}
Attributes
{OutputNormalizedWithDefaults}
attributes {ImportAttributes}
cacheable <boolean> allow to use the unsafe cache
context <string>
contextDependencies {LazySet}
contextInfo {ModuleFactoryCreateDataContextInfo}
createData {Partial<NormalModuleCreateData|object>}
dependencies {ModuleDependency[]}
dependencyType <string>
fileDependencies {LazySet}
ignoredModule <Module>
missingDependencies {LazySet}
request <string>
resolveOptions <ResolveOptions>
Options object for resolving requests.
alias {object[]|object} Redirect module requests.
aliasFields <string> Fields in the description file (usually package.json) which are used to redirect requests inside the module.
byDependency {object} Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
cache <boolean> Enable caching of successfully resolved requests (cache entries are revalidated).
cachePredicate {object} Predicate function to decide which requests should be cached.
cacheWithContext <boolean> Include the context information in the cache identifier when caching.
conditionNames <string[]> Condition names for exports field entry point.
descriptionFiles <string[]> Filenames used to find a description file (like a package.json).
enforceExtension <boolean> Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
exportsFields <string[]> Field names from the description file (usually package.json) which are used to provide entry points of a package.
extensionAlias {object} An object which maps extension to extension aliases.
extensions <string[]> Extensions added to the request when trying to find the file.
fallback {object[]|object} Redirect module requests when normal resolving fails.
fileSystem <InputFileSystem> Filesystem for the resolver.
fullySpecified <boolean> Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
importsFields <string[]> Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
mainFields <string> Field names from the description file (package.json) which are used to find the default entry point.
mainFiles <string[]> Filenames used to find the default entry point if there is no description file or main field.
modules <string[]> Folder names or directory paths where to find modules.
plugins <"..."> Plugins for the resolver.
preferAbsolute <boolean> Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
preferRelative <boolean> Prefer to resolve module requests as relative request and fallback to resolving as module.
resolver <Resolver> Custom resolver.
restrictions <string> | <RegExp[]> A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
roots <string[]> A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
symlinks <boolean> Enable resolving symlinks to the original location.
tsconfig <string> | <boolean> TypeScript config for paths mapping. Can be false (disabled), true (use default tsconfig.json), a string path to tsconfig.json, or an object with configFile and references options.
unsafeCache <boolean> Enable caching of successfully resolved requests (cache entries are not revalidated).
useSyncFileSystemCalls <boolean> Use synchronous filesystem calls for the resolver.
A rule description with conditions and effects for modules.
Stats options object.
Attributes
Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
Sort the assets by that field.
Space to display assets (groups will be collapsed to fit this space).
Add built at time information.
Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
Show cached assets (setting this to
false
only shows emitted files).
Add information about cached (not built) modules.
Add children information.
Display auxiliary assets in chunk groups.
Display children of chunk groups.
Limit of assets displayed in chunk groups.
Display all chunk groups with the corresponding bundles.
Add built modules information to chunk information.
Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
Add the origins of chunks and chunk merging info.
Add information about parent, children and sibling chunks to chunk information.
Sort the chunks by that field.
Enables/Disables colorful output.
Context directory for request shortening.
Show chunk modules that are dependencies of other modules of the chunk.
Add module depth in module graph.
Display the entry points with the corresponding bundles.
Add details to errors (like resolving log).
Add nested errors to errors (like in AggregateError).
Space to display errors (value is in number of lines).
Add internal stack trace to errors.
Please use excludeModules instead.
Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
Group assets by how their are related to chunks.
Group assets by their status (emitted, compared for emit or cached).
Group assets by their extension.
Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
Group assets by their path.
Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
Group modules by their status (cached or built and cacheable).
Group modules by their extension.
Group modules by their layer.
Group modules by their path.
Group modules by their type.
Group reasons by their origin module.
Add the hash of the compilation.
Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
Add stack traces to logging output.
Add information about assets inside modules.
Add built modules information.
Sort the modules by that field.
Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
Add dependencies and origin of warnings/errors.
Add information about modules nested in other modules (like with module concatenation).
Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
Show reasons why optimization bailed out for modules.
Add information about orphan modules.
Add output path information.
Add performance hint flags.
Preset for the default values.
Show exports provided by modules.
Add public path information.
Add information about the reasons why modules are included.
Space to display reasons (groups will be collapsed to fit this space).
Add information about assets that are related to other assets (like SourceMaps for assets).
Add information about runtime modules (deprecated: use 'runtimeModules' instead).
Add information about runtime modules.
Add the source code of modules.
Show exports used by modules.
Add webpack version information.
Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
Space to display warnings (value is in number of lines).
Normalized webpack options object.
amd {false|object} Set the value of require.amd and define.amd. Or disable AMD support.
bail <boolean> Report the first error as a hard error instead of tolerating it.
cache {CacheOptionsNormalized} Cache generated modules and chunks to improve performance for multiple incremental builds.
context <string> The base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
dependencies <string[]> References to other configurations to depend on.
devServer {false|object} Options for the webpack-dev-server.
devtool <string> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv <boolean> Enable and configure the Dotenv plugin to load environment variables from .env files.
entry <EntryNormalized> The entry point(s) of the compilation.
experiments {ExperimentsNormalized} Enables/Disables experiments (experimental features with relax SemVer compatibility).
externals <Externals> 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.
externalsPresets {ExternalsPresets} Enable presets of externals for specific targets.
externalsType {"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings {object[]} Ignore specific warnings.
infrastructureLogging {InfrastructureLogging} Options for infrastructure level logging.
loader {Loader} Custom values available in the loader context.
mode {"development"|"none"|"production"} Enable production optimizations or development hints.
module {ModuleOptionsNormalized} Options affecting the normal modules (NormalModuleFactory).
name <string> Name of the configuration. Used when loading multiple configurations.
node {Node} Include polyfills or mocks for various node stuff.
optimization {OptimizationNormalized} Enables/Disables integrated optimizations.
output {OutputNormalized} Normalized options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
parallelism <number> The number of parallel processed modules in the compilation.
performance {false|PerformanceOptions} Configuration for web performance recommendations.
plugins <WebpackPluginInstance> Add additional plugins to the compiler.
profile <boolean> Capture timing information for each module.
recordsInputPath <string> Store compiler state to a json file.
recordsOutputPath <string> Load compiler state from a json file.
resolve <ResolveOptions> Options for the resolver.
resolveLoader <ResolveOptions> Options for the resolver when resolving loaders.
snapshot {SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats {StatsValue} Stats options object or preset name.
target <string> | <string[]> Environment to build for. An array of environments to build for all of them when possible.
validate <boolean> Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch <boolean> Enter watch mode, which rebuilds on file change.
watchOptions {WatchOptions} Options for the watcher.
Plugin instance.
[index: <string> ]: <any>
apply {object} The run point of the plugin, required method.
AssetInfo = {KnownAssetInfo|Record<string, any>}
Entry = <string> | <EntryObject> | <string[]>
EntryNormalized = {object|EntryStaticNormalized}
EntryOptions = {object|Omit<EntryDescriptionNormalized, "import">}
ExternalItem = <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown>
ExternalItemFunction = {object|object}
ExternalItemFunctionCallback = {object}
ExternalItemFunctionDataGetResolve = {object}
ExternalItemFunctionDataGetResolveCallbackResult = {object}
ExternalItemFunctionDataGetResolveResult = {object}
ExternalItemFunctionPromise = {object}
ExternalItemValue = <string> | <boolean> | <string[]>
Externals = <string> | <RegExp> | <ExternalItemObjectKnown> | <ExternalItemObjectUnknown> | <ExternalItem[]>
LoaderContext <OptionsType> = {NormalModuleLoaderContext|LoaderRunnerLoaderContext|LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext}
LoaderDefinition <OptionsType, ContextAdditions
= {LoaderDefinitionFunction<OptionsType, ContextAdditions>|object}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {false}
MultiConfiguration = {ReadonlyArray|MultiCompilerOptions}
ParserState = {ParserStateBase|Record<string, any>}
RawLoaderDefinition <OptionsType, ContextAdditions
= {RawLoaderDefinitionFunction<OptionsType, ContextAdditions>|object}
pitch {PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}
raw {true}
RenderManifestEntry = {RenderManifestEntryTemplated|RenderManifestEntryStatic}
ResolvePluginInstance = {object|object}
{object}
[index: <string> ]: <any>
apply {object} The run point of the plugin, required method.
{object}
RuleSetCondition = <string> | <RegExp> | <RuleSetCondition[]>
RuleSetConditionAbsolute = <string> | <RegExp> | <RuleSetConditionAbsolute[]>
RuleSetUse = <string> | <undefined> | <null> | <string> | <RuleSetUseFunction> | <RuleSetUseFunction>
<string>
<undefined> | <null> | <string> | <RuleSetUseFunction>
<RuleSetUseFunction>
{object}
Attributes
Unique loader options identifier.
RuleSetUseFunction = {object}
RuleSetUseItem = <string> | <RuleSetUseFunction>
<string>
<RuleSetUseFunction>
{object}
Attributes
Unique loader options identifier.
StatsAsset = {KnownStatsAsset|Record<string, any>}
StatsChunk = {KnownStatsChunk|Record<string, any>}
StatsChunkGroup = {KnownStatsChunkGroup|Record<string, any>}
StatsChunkOrigin = {KnownStatsChunkOrigin|Record<string, any>}
StatsCompilation = {KnownStatsCompilation|Record<string, any>}
StatsError = {KnownStatsError|Record<string, any>}
StatsLogging = {KnownStatsLogging|Record<string, any>}
StatsLoggingEntry = {KnownStatsLoggingEntry|Record<string, any>}
StatsModule = {KnownStatsModule|Record<string, any>}
StatsModuleIssuer = {KnownStatsModuleIssuer|Record<string, any>}
StatsModuleReason = {KnownStatsModuleReason|Record<string, any>}
StatsModuleTraceDependency = {KnownStatsModuleTraceDependency|Record<string, any>}
StatsModuleTraceItem = {KnownStatsModuleTraceItem|Record<string, any>}
StatsProfile = {KnownStatsProfile|Record<string, any>}
TemplatePath = <string>
WebpackPluginFunction = {object}
const UsageState : {Readonly}
const validate : {object}
const validateSchema : {object}
schema {Parameters}
options {Parameters}
validationConfiguration {ValidationErrorConfiguration}
Returns: {void}
const version : <string>
const webpack : {_functionWebpack}
Attributes
{CallbackWebpackFunction_2<Stats, void>}
Attributes
{CallbackWebpackFunction_2<MultiStats, void>}