webpack
- Version 5.95.0
- Published
- 5.08 MB
- 23 dependencies
- MIT license
Install
npm i webpack
yarn add webpack
pnpm add webpack
Overview
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Index
Variables
Functions
Classes
Chunk
- addGroup()
- addModule()
- auxiliaryFiles
- canBeInitial()
- canBeIntegrated()
- chunkReason
- compareTo()
- containsModule()
- contentHash
- cssFilenameTemplate
- debugId
- disconnectFromGroups()
- entryModule
- extraAsync
- filenameTemplate
- files
- getAllAsyncChunks()
- getAllInitialChunks()
- getAllReferencedAsyncEntrypoints()
- getAllReferencedChunks()
- getChildIdsByOrders()
- getChildIdsByOrdersMap()
- getChildrenOfTypeInOrder()
- getChunkMaps()
- getChunkModuleMaps()
- getEntryOptions()
- getModules()
- getNumberOfGroups()
- getNumberOfModules()
- groupsIterable
- hasAsyncChunks()
- hasEntryModule()
- hash
- hasModuleInGraph()
- hasRuntime()
- id
- idNameHints
- ids
- integrate()
- integratedSize()
- isEmpty()
- isInGroup()
- isOnlyInitial()
- modulesIterable
- modulesSize()
- moveModule()
- name
- preventIntegration
- remove()
- removeGroup()
- removeModule()
- rendered
- renderedHash
- runtime
- size()
- split()
- updateHash()
ChunkGraph
- addChunkRuntimeRequirements()
- addDependentHashModuleToChunk()
- addFullHashModuleToChunk()
- addModuleRuntimeRequirements()
- addTreeRuntimeRequirements()
- attachDependentHashModules()
- attachFullHashModules()
- attachModules()
- attachRuntimeModules()
- canChunksBeIntegrated()
- clearChunkGraphForChunk()
- clearChunkGraphForModule()
- compareChunks()
- connectBlockAndChunkGroup()
- connectChunkAndEntryModule()
- connectChunkAndModule()
- connectChunkAndRuntimeModule()
- disconnectChunk()
- disconnectChunkAndEntryModule()
- disconnectChunkAndModule()
- disconnectChunkAndRuntimeModule()
- disconnectChunkGroup()
- disconnectEntries()
- disconnectEntryModule()
- getBlockChunkGroup()
- getChunkConditionMap()
- getChunkDependentHashModulesIterable()
- getChunkEntryDependentChunksIterable()
- getChunkEntryModulesIterable()
- getChunkEntryModulesWithChunkGroupIterable()
- getChunkFullHashModulesIterable()
- getChunkFullHashModulesSet()
- getChunkGraphForChunk()
- getChunkGraphForModule()
- getChunkModuleIdMap()
- getChunkModuleRenderedHashMap()
- getChunkModules()
- getChunkModulesIterable()
- getChunkModulesIterableBySourceType()
- getChunkModuleSourceTypes()
- getChunkModulesSize()
- getChunkModulesSizes()
- getChunkRootModules()
- getChunkRuntimeModulesInOrder()
- getChunkRuntimeModulesIterable()
- getChunkRuntimeRequirements()
- getChunkSize()
- getIntegratedChunksSize()
- getModuleChunks()
- getModuleChunksIterable()
- getModuleGraphHash()
- getModuleGraphHashBigInt()
- getModuleHash()
- getModuleId()
- getModuleRuntimeRequirements()
- getModuleRuntimes()
- getModuleSourceTypes()
- getNumberOfChunkFullHashModules()
- getNumberOfChunkModules()
- getNumberOfEntryModules()
- getNumberOfModuleChunks()
- getNumberOfRuntimeModules()
- getOrderedChunkModules()
- getOrderedChunkModulesIterable()
- getOrderedChunkModulesIterableBySourceType()
- getOrderedModuleChunksIterable()
- getRenderedModuleHash()
- getRuntimeId()
- getTreeRuntimeRequirements()
- hasChunkEntryDependentChunks()
- hasModuleHashes()
- hasModuleInGraph()
- integrateChunks()
- isEntryModule()
- isEntryModuleInChunk()
- isModuleInChunk()
- isModuleInChunkGroup()
- moduleGraph
- replaceModule()
- setChunkGraphForChunk()
- setChunkGraphForModule()
- setChunkModuleSourceTypes()
- setModuleHashes()
- setModuleId()
- setRuntimeId()
- upgradeDependentToFullHashModules()
ChunkGroup
- addAsyncEntrypoint()
- addBlock()
- addChild()
- addOptions()
- addOrigin()
- addParent()
- asyncEntrypointsIterable
- blocksIterable
- checkConstraints()
- childrenIterable
- chunks
- compareTo()
- debugId
- getBlocks()
- getChildren()
- getChildrenByOrders()
- getFiles()
- getModuleIndex
- getModuleIndex2
- getModulePostOrderIndex()
- getModulePreOrderIndex()
- getNumberOfBlocks()
- getNumberOfChildren()
- getNumberOfParents()
- getParents()
- groupDebugId
- hasBlock()
- hasParent()
- id
- index
- insertChunk()
- isInitial()
- name
- options
- origins
- parentsIterable
- pushChunk()
- remove()
- removeChild()
- removeChunk()
- removeParent()
- replaceChunk()
- setModulePostOrderIndex()
- setModulePreOrderIndex()
- sortItems()
- unshiftChunk()
Compilation
- addAsyncEntrypoint()
- addChunk()
- addChunkInGroup()
- addEntry()
- addInclude()
- additionalChunkAssets
- addModule()
- addModuleChain()
- addModuleQueue
- addModuleTree()
- addRuntimeModule()
- assets
- assetsInfo
- assignDepth()
- assignDepths()
- assignRuntimeIds()
- asyncEntrypoints
- bail
- buildDependencies
- buildModule()
- buildQueue
- buildTimeExecutedModules
- builtModules
- checkConstraints()
- children
- childrenCounters
- chunkGraph
- chunkGroups
- chunks
- chunkTemplate
- clearAssets()
- codeGeneratedModules
- codeGeneration()
- codeGenerationResults
- comparedForEmitAssets
- compilationDependencies
- compiler
- compilerPath
- contextDependencies
- createChildCompiler()
- createChunkAssets()
- createHash()
- createModuleAssets()
- createModuleHashes()
- createStatsFactory()
- createStatsOptions()
- createStatsPrinter()
- creatingModuleDuringBuild
- deleteAsset()
- dependencyFactories
- dependencyTemplates
- emitAsset()
- emittedAssets
- endTime
- entries
- entrypoints
- errors
- executeModule()
- factorizeModule
- factorizeQueue
- fileDependencies
- fileSystemInfo
- findModule()
- finish()
- fullHash
- getAsset()
- getAssetPath()
- getAssetPathWithInfo()
- getAssets()
- getCache()
- getDependencyReferencedExports()
- getErrors()
- getLogger()
- getModule()
- getPath()
- getPathWithInfo()
- getRenderManifest()
- getStats()
- getWarnings()
- globalEntry
- handleModuleCreation()
- hash
- hooks
- inputFileSystem
- logger
- logging
- mainTemplate
- missingDependencies
- moduleGraph
- moduleMemCaches
- moduleMemCaches2
- modules
- moduleTemplates
- name
- namedChunkGroups
- namedChunks
- needAdditionalPass
- options
- outputOptions
- params
- patchChunksAfterReasonRemoval()
- PROCESS_ASSETS_STAGE_ADDITIONAL
- PROCESS_ASSETS_STAGE_ADDITIONS
- PROCESS_ASSETS_STAGE_ANALYSE
- PROCESS_ASSETS_STAGE_DERIVED
- PROCESS_ASSETS_STAGE_DEV_TOOLING
- PROCESS_ASSETS_STAGE_OPTIMIZE
- PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY
- PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT
- PROCESS_ASSETS_STAGE_OPTIMIZE_HASH
- PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
- PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE
- PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER
- PROCESS_ASSETS_STAGE_PRE_PROCESS
- PROCESS_ASSETS_STAGE_REPORT
- PROCESS_ASSETS_STAGE_SUMMARIZE
- processDependenciesQueue
- processModuleDependencies()
- processModuleDependenciesNonRecursive()
- processRuntimeRequirements()
- profile
- rebuildModule()
- rebuildQueue
- records
- removeChunkFromDependencies()
- removeReasonsOfDependencyBlock()
- renameAsset()
- reportDependencyErrorsAndWarnings()
- requestShortener
- resolverFactory
- runtimeTemplate
- seal()
- sortItemsWithChunkIds()
- startTime
- summarizeDependencies()
- unseal()
- updateAsset()
- usedChunkIds
- usedModuleIds
- valueCacheVersions
- warnings
Compiler
- cache
- close()
- compile()
- compilerPath
- context
- contextTimestamps
- createChildCompiler()
- createCompilation()
- createContextModuleFactory()
- createNormalModuleFactory()
- emitAssets()
- emitRecords()
- fileTimestamps
- fsStartTime
- getCache()
- getInfrastructureLogger()
- hooks
- idle
- immutablePaths
- infrastructureLogger
- inputFileSystem
- intermediateFileSystem
- isChild()
- managedPaths
- modifiedFiles
- moduleMemCaches
- name
- newCompilation()
- newCompilationParams()
- options
- outputFileSystem
- outputPath
- parentCompilation
- platform
- purgeInputFileSystem()
- readRecords()
- records
- recordsInputPath
- recordsOutputPath
- removedFiles
- requestShortener
- resolverFactory
- root
- run()
- runAsChild()
- running
- unmanagedPaths
- watch()
- watchFileSystem
- watching
- watchMode
- webpack
Dependency
- category
- couldAffectReferencingModule()
- createIgnoredModule()
- deserialize()
- disconnect
- EXPORTS_OBJECT_REFERENCED
- getCondition()
- getContext()
- getErrors()
- getExports()
- getModuleEvaluationSideEffectsState()
- getNumberOfIdOccurrences()
- getReference()
- getReferencedExports()
- getResourceIdentifier()
- getWarnings()
- loc
- module
- NO_EXPORTS_REFERENCED
- optional
- serialize()
- setLoc()
- TRANSITIVE
- type
- updateHash()
- weak
Module
- addCacheDependencies()
- addChunk()
- addCodeGenerationDependency()
- addError()
- addPresentationalDependency()
- addWarning()
- build()
- buildInfo
- buildMeta
- chunkCondition()
- chunksIterable
- cleanupForCache()
- clearWarningsAndErrors()
- codeGeneration()
- codeGenerationDependencies
- context
- debugId
- depth
- errors
- exportsArgument
- factoryMeta
- getChunks()
- getConcatenationBailoutReason()
- getErrors()
- getExportsType()
- getNumberOfChunks()
- getNumberOfErrors()
- getNumberOfWarnings()
- getSideEffectsConnectionState()
- getSourceTypes()
- getUnsafeCacheData()
- getWarnings()
- hasChunkCondition()
- hasEqualsChunks
- hash
- hasReasonForChunk()
- hasReasons()
- id
- identifier()
- index
- index2
- invalidateBuild()
- isAccessibleInChunk()
- isAccessibleInChunkGroup()
- isEntryModule()
- isInChunk()
- isOptional()
- isProvided()
- issuer
- isUsed
- layer
- libIdent()
- moduleArgument
- nameForCondition()
- needBuild()
- needId
- needRebuild()
- optimizationBailout
- optional
- originalSource()
- presentationalDependencies
- profile
- readableIdentifier()
- removeChunk()
- renderedHash
- resolveOptions
- size()
- source()
- type
- updateCacheModule()
- used
- usedExports
- useSimpleSourceMap
- useSourceMap
- warnings
ModuleGraph
- addExplanation()
- addExtraReason()
- cached()
- clearModuleGraphForModule()
- cloneModuleAttributes()
- copyOutgoingModuleConnections()
- dependencyCacheProvide()
- freeze()
- getConnection()
- getDepth()
- getExportInfo()
- getExportsInfo()
- getIncomingConnections()
- getIncomingConnectionsByOriginModule()
- getIssuer()
- getMeta()
- getMetaIfExisting()
- getModule()
- getModuleGraphForModule()
- getOptimizationBailout()
- getOrigin()
- getOutgoingConnections()
- getOutgoingConnectionsByModule()
- getParentBlock()
- getParentBlockIndex()
- getParentModule()
- getPostOrderIndex()
- getPreOrderIndex()
- getProfile()
- getProvidedExports()
- getReadOnlyExportInfo()
- getResolvedModule()
- getResolvedOrigin()
- getUsedExports()
- isAsync()
- isExportProvided()
- ModuleGraphConnection
- moveModuleConnections()
- removeAllModuleAttributes()
- removeConnection()
- removeModuleAttributes()
- setAsync()
- setDepth()
- setDepthIfLower()
- setIssuer()
- setIssuerIfUnset()
- setModuleGraphForModule()
- setModuleMemCaches()
- setParents()
- setPostOrderIndex()
- setPostOrderIndexIfUnset()
- setPreOrderIndex()
- setPreOrderIndexIfUnset()
- setProfile()
- setResolvedModule()
- unfreeze()
- updateModule()
NormalModule
- applyNoParseRule()
- binary
- createSource()
- createSourceForAsset()
- deserialize()
- error
- generator
- generatorOptions
- getCompilationHooks()
- getCurrentLoader()
- loaders
- markModuleAsErrored()
- matchResource
- parser
- parserOptions
- rawRequest
- request
- resource
- resourceResolveData
- restoreFromUnsafeCache()
- shouldPreventParsing()
- userRequest
Template
- asString()
- getFunctionContent()
- getModulesArrayBounds()
- indent()
- NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS
- NUMBER_OF_IDENTIFIER_START_CHARS
- numberToIdentifier()
- numberToIdentifierContinuation()
- prefix()
- renderChunkModules()
- renderChunkRuntimeModules()
- renderRuntimeModules()
- toComment()
- toIdentifier()
- toNormalComment()
- toPath()
Interfaces
Configuration
- amd
- bail
- cache
- context
- dependencies
- devtool
- entry
- experiments
- extends
- externals
- externalsPresets
- externalsType
- ignoreWarnings
- infrastructureLogging
- loader
- mode
- module
- name
- node
- optimization
- output
- parallelism
- performance
- plugins
- profile
- recordsInputPath
- recordsOutputPath
- recordsPath
- resolve
- resolveLoader
- snapshot
- stats
- target
- watch
- watchOptions
ModuleOptions
- defaultRules
- exprContextCritical
- exprContextRecursive
- exprContextRegExp
- exprContextRequest
- generator
- noParse
- parser
- rules
- strictExportPresence
- strictThisContextOnImports
- unknownContextCritical
- unknownContextRecursive
- unknownContextRegExp
- unknownContextRequest
- unsafeCache
- wrappedContextCritical
- wrappedContextRecursive
- wrappedContextRegExp
ResolveOptions
- alias
- aliasFields
- byDependency
- cache
- cachePredicate
- cacheWithContext
- conditionNames
- descriptionFiles
- enforceExtension
- exportsFields
- extensionAlias
- extensions
- fallback
- fileSystem
- fullySpecified
- importsFields
- mainFields
- mainFiles
- modules
- plugins
- preferAbsolute
- preferRelative
- resolver
- restrictions
- roots
- symlinks
- unsafeCache
- useSyncFileSystemCalls
StatsOptions
- all
- assets
- assetsSort
- assetsSpace
- builtAt
- cached
- cachedAssets
- cachedModules
- children
- chunkGroupAuxiliary
- chunkGroupChildren
- chunkGroupMaxAssets
- chunkGroups
- chunkModules
- chunkModulesSpace
- chunkOrigins
- chunkRelations
- chunks
- chunksSort
- colors
- context
- dependentModules
- depth
- entrypoints
- env
- errorDetails
- errors
- errorsCount
- errorsSpace
- errorStack
- exclude
- excludeAssets
- excludeModules
- groupAssetsByChunk
- groupAssetsByEmitStatus
- groupAssetsByExtension
- groupAssetsByInfo
- groupAssetsByPath
- groupModulesByAttributes
- groupModulesByCacheStatus
- groupModulesByExtension
- groupModulesByLayer
- groupModulesByPath
- groupModulesByType
- groupReasonsByOrigin
- hash
- ids
- logging
- loggingDebug
- loggingTrace
- moduleAssets
- modules
- modulesSort
- modulesSpace
- moduleTrace
- nestedModules
- nestedModulesSpace
- optimizationBailout
- orphanModules
- outputPath
- performance
- preset
- providedExports
- publicPath
- reasons
- reasonsSpace
- relatedAssets
- runtime
- runtimeModules
- source
- timings
- usedExports
- version
- warnings
- warningsCount
- warningsFilter
- warningsSpace
WebpackOptionsNormalized
- amd
- bail
- cache
- context
- dependencies
- devServer
- devtool
- entry
- experiments
- externals
- externalsPresets
- externalsType
- ignoreWarnings
- infrastructureLogging
- loader
- mode
- module
- name
- node
- optimization
- output
- parallelism
- performance
- plugins
- profile
- recordsInputPath
- recordsOutputPath
- resolve
- resolveLoader
- snapshot
- stats
- target
- watch
- watchOptions
Type Aliases
- AssetInfo
- Entry
- EntryNormalized
- EntryOptions
- ExternalItemValue
- Externals
- LoaderContext
- LoaderDefinition
- ParserState
- RawLoaderDefinition
- ResolvePluginInstance
- RuleSetCondition
- RuleSetConditionAbsolute
- RuleSetUse
- RuleSetUseItem
- StatsAsset
- StatsChunk
- StatsChunkGroup
- StatsChunkOrigin
- StatsCompilation
- StatsError
- StatsLogging
- StatsLoggingEntry
- StatsModule
- StatsModuleIssuer
- StatsModuleReason
- StatsModuleTraceDependency
- StatsModuleTraceItem
- StatsProfile
- WebpackPluginFunction
Namespaces
ModuleFilenameHelpers
- ABSOLUTE_RESOURCE_PATH
- ALL_LOADERS
- ALL_LOADERS_RESOURCE
- createFilename()
- HASH
- ID
- LOADERS
- LOADERS_RESOURCE
- matchObject()
- matchPart()
- NAMESPACE
- QUERY
- REGEXP_ABSOLUTE_RESOURCE_PATH
- REGEXP_ALL_LOADERS
- REGEXP_ALL_LOADERS_RESOURCE
- REGEXP_HASH
- REGEXP_ID
- REGEXP_LOADERS
- REGEXP_LOADERS_RESOURCE
- REGEXP_NAMESPACE
- REGEXP_QUERY
- REGEXP_RESOURCE
- REGEXP_RESOURCE_PATH
- replaceDuplicates()
- RESOURCE
- RESOURCE_PATH
RuntimeGlobals
- amdDefine
- amdOptions
- asyncModule
- baseURI
- chunkCallback
- chunkName
- compatGetDefaultExport
- createFakeNamespaceObject
- createScript
- createScriptUrl
- currentRemoteGetScope
- definePropertyGetters
- ensureChunk
- ensureChunkHandlers
- ensureChunkIncludeEntries
- entryModuleId
- exports
- externalInstallChunk
- getChunkCssFilename
- getChunkScriptFilename
- getChunkUpdateCssFilename
- getChunkUpdateScriptFilename
- getFullHash
- getTrustedTypesPolicy
- getUpdateManifestFilename
- global
- harmonyModuleDecorator
- hasCssModules
- hasFetchPriority
- hasOwnProperty
- hmrDownloadManifest
- hmrDownloadUpdateHandlers
- hmrInvalidateModuleHandlers
- hmrModuleData
- hmrRuntimeStatePrefix
- initializeSharing
- instantiateWasm
- interceptModuleExecution
- loadScript
- makeNamespaceObject
- module
- moduleCache
- moduleFactories
- moduleFactoriesAddOnly
- moduleId
- moduleLoaded
- nodeModuleDecorator
- onChunksLoaded
- prefetchChunk
- prefetchChunkHandlers
- preloadChunk
- preloadChunkHandlers
- publicPath
- relativeUrl
- require
- requireScope
- returnExportsFromRuntime
- runtimeId
- scriptNonce
- shareScopeMap
- startup
- startupEntrypoint
- startupNoDefault
- startupOnlyAfter
- startupOnlyBefore
- system
- systemContext
- thisAsExports
- uncaughtErrorHandler
- wasmInstances
util.comparators
- compareChunkGroupsByIndex()
- compareChunks
- compareChunksById()
- compareChunksNatural()
- compareIds()
- compareIterables()
- compareLocations()
- compareModulesById
- compareModulesByIdentifier()
- compareModulesByIdOrIdentifier
- compareModulesByPostOrderIndexOrIdentifier
- compareModulesByPreOrderIndexOrIdentifier
- compareNumbers()
- compareSelect()
- compareStrings()
- compareStringsNumeric()
- concatComparators()
- keepOriginalOrder()
util.runtime
- compareRuntime()
- filterRuntime()
- forEachRuntime()
- getEntryRuntime()
- getRuntimeKey()
- intersectRuntime()
- keyToRuntime()
- mergeRuntime()
- mergeRuntimeCondition()
- mergeRuntimeConditionNonFalse()
- mergeRuntimeOwned()
- runtimeConditionToString()
- runtimeEqual()
- RuntimeSpecMap
- RuntimeSpecSet
- runtimeToString()
- subtractRuntime()
- subtractRuntimeCondition()
Variables
variable CIRCULAR_CONNECTION
const CIRCULAR_CONNECTION: Symbol;
variable MEASURE_END_OPERATION
const MEASURE_END_OPERATION: Symbol;
variable MEASURE_START_OPERATION
const MEASURE_START_OPERATION: Symbol;
variable TOMBSTONE
const TOMBSTONE: Symbol;
variable topLevelSymbolTag
const topLevelSymbolTag: Symbol;
variable TRANSITIVE
const TRANSITIVE: Symbol;
variable TRANSITIVE_ONLY
const TRANSITIVE_ONLY: Symbol;
variable UNDEFINED_MARKER
const UNDEFINED_MARKER: Symbol;
variable UsageState
const UsageState: Readonly<{ Unused: 0; OnlyPropertiesUsed: 1; NoInfo: 2; Unknown: 3; Used: 4;}>;
variable version
const version: string;
variable webpack
const webpack: { (options: Configuration, callback?: CallbackWebpack<Stats>): Compiler; ( options: ReadonlyArray<Configuration> & MultiCompilerOptions, callback?: CallbackWebpack<MultiStats> ): MultiCompiler;};
Functions
function exports
exports: typeof exports;
function validate
validate: (options?: any) => void;
function validateSchema
validateSchema: ( schema: Parameters<typeof validateFunction>[0], options: Parameters<typeof validateFunction>[1], validationConfiguration?: ValidationErrorConfiguration) => void;
Classes
class AsyncDependenciesBlock
class AsyncDependenciesBlock extends DependenciesBlock {}
constructor
constructor( groupOptions: RawChunkGroupOptions & { name?: string } & { entryOptions?: EntryOptions; }, loc?: SyntheticDependencyLocation | RealDependencyLocation, request?: string);
property chunkName
chunkName?: string;
property groupOptions
groupOptions: RawChunkGroupOptions & { name?: string } & { entryOptions?: EntryOptions;};
property loc
loc?: SyntheticDependencyLocation | RealDependencyLocation;
property module
module: any;
property request
request?: string;
class AutomaticPrefetchPlugin
class AutomaticPrefetchPlugin {}
constructor
constructor();
method apply
apply: (compiler: Compiler) => void;
Apply the plugin
class BannerPlugin
class BannerPlugin {}
constructor
constructor(options: BannerPluginArgument);
property banner
banner: (data: { hash?: string; chunk: Chunk; filename: string }) => string;
property options
options: BannerPluginOptions;
method apply
apply: (compiler: Compiler) => void;
Apply the plugin
class Cache
class Cache {}
constructor
constructor();
property hooks
hooks: { get: AsyncSeriesBailHook< [ string, Etag, ((result: any, callback: (arg0?: Error) => void) => void)[] ], any >; store: AsyncParallelHook<[string, Etag, any]>; storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>; beginIdle: SyncHook<[]>; endIdle: AsyncParallelHook<[]>; shutdown: AsyncParallelHook<[]>;};
property STAGE_DEFAULT
static STAGE_DEFAULT: number;
property STAGE_DISK
static STAGE_DISK: number;
property STAGE_MEMORY
static STAGE_MEMORY: number;
property STAGE_NETWORK
static STAGE_NETWORK: number;
method beginIdle
beginIdle: () => void;
method endIdle
endIdle: (callback: CallbackCacheCache<void>) => void;
method get
get: <T>( identifier: string, etag: null | Etag, callback: CallbackCacheCache<T>) => void;
method shutdown
shutdown: (callback: CallbackCacheCache<void>) => void;
method store
store: <T>( identifier: string, etag: null | Etag, data: T, callback: CallbackCacheCache<void>) => void;
method storeBuildDependencies
storeBuildDependencies: ( dependencies: Iterable<string>, callback: CallbackCacheCache<void>) => void;
After this method has succeeded the cache can only be restored when build dependencies are
class Chunk
class Chunk {}
constructor
constructor(name?: string, backCompat?: boolean);
property auxiliaryFiles
auxiliaryFiles: Set<string>;
property chunkReason
chunkReason?: string;
property contentHash
contentHash: Record<string, string>;
property cssFilenameTemplate
cssFilenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
property debugId
debugId: number;
property entryModule
readonly entryModule: Module;
property extraAsync
extraAsync: boolean;
property filenameTemplate
filenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
property files
files: Set<string>;
property groupsIterable
readonly groupsIterable: SortableSet<ChunkGroup>;
property hash
hash?: string;
property id
id: string | number;
property idNameHints
idNameHints: SortableSet<string>;
property ids
ids: ChunkId[];
property modulesIterable
readonly modulesIterable: Iterable<Module>;
property name
name?: string;
property preventIntegration
preventIntegration: boolean;
property rendered
rendered: boolean;
property renderedHash
renderedHash?: string;
property runtime
runtime: RuntimeSpec;
method addGroup
addGroup: (chunkGroup: ChunkGroup) => void;
method addModule
addModule: (module: Module) => boolean;
method canBeInitial
canBeInitial: () => boolean;
method canBeIntegrated
canBeIntegrated: (otherChunk: Chunk) => boolean;
method compareTo
compareTo: (otherChunk: Chunk) => 0 | 1 | -1;
method containsModule
containsModule: (module: Module) => boolean;
method disconnectFromGroups
disconnectFromGroups: () => void;
method getAllAsyncChunks
getAllAsyncChunks: () => Set<Chunk>;
method getAllInitialChunks
getAllInitialChunks: () => Set<Chunk>;
method getAllReferencedAsyncEntrypoints
getAllReferencedAsyncEntrypoints: () => Set<Entrypoint>;
method getAllReferencedChunks
getAllReferencedChunks: () => Set<Chunk>;
method getChildIdsByOrders
getChildIdsByOrders: ( chunkGraph: ChunkGraph, filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean) => Record<string, (string | number)[]>;
method getChildIdsByOrdersMap
getChildIdsByOrdersMap: ( chunkGraph: ChunkGraph, includeDirectChildren?: boolean, filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean) => Record<string | number, Record<string, (string | number)[]>>;
method getChildrenOfTypeInOrder
getChildrenOfTypeInOrder: ( chunkGraph: ChunkGraph, type: string) => undefined | { onChunks: Chunk[]; chunks: Set<Chunk> }[];
method getChunkMaps
getChunkMaps: (realHash: boolean) => ChunkMaps;
method getChunkModuleMaps
getChunkModuleMaps: (filterFn: (m: Module) => boolean) => ChunkModuleMaps;
method getEntryOptions
getEntryOptions: () => undefined | EntryOptions;
method getModules
getModules: () => Module[];
method getNumberOfGroups
getNumberOfGroups: () => number;
method getNumberOfModules
getNumberOfModules: () => number;
method hasAsyncChunks
hasAsyncChunks: () => boolean;
method hasEntryModule
hasEntryModule: () => boolean;
method hasModuleInGraph
hasModuleInGraph: ( filterFn: (m: Module) => boolean, filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean) => boolean;
method hasRuntime
hasRuntime: () => boolean;
method integrate
integrate: (otherChunk: Chunk) => boolean;
method integratedSize
integratedSize: (otherChunk: Chunk, options: ChunkSizeOptions) => number;
method isEmpty
isEmpty: () => boolean;
method isInGroup
isInGroup: (chunkGroup: ChunkGroup) => boolean;
method isOnlyInitial
isOnlyInitial: () => boolean;
method modulesSize
modulesSize: () => number;
method moveModule
moveModule: (module: Module, otherChunk: Chunk) => void;
method remove
remove: () => void;
method removeGroup
removeGroup: (chunkGroup: ChunkGroup) => void;
method removeModule
removeModule: (module: Module) => void;
method size
size: (options?: ChunkSizeOptions) => number;
method split
split: (newChunk: Chunk) => void;
method updateHash
updateHash: (hash: Hash, chunkGraph: ChunkGraph) => void;
class ChunkGraph
class ChunkGraph {}
constructor
constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
property moduleGraph
moduleGraph: ModuleGraph;
method addChunkRuntimeRequirements
addChunkRuntimeRequirements: (chunk: Chunk, items: Set<string>) => void;
method addDependentHashModuleToChunk
addDependentHashModuleToChunk: (chunk: Chunk, module: RuntimeModule) => void;
method addFullHashModuleToChunk
addFullHashModuleToChunk: (chunk: Chunk, module: RuntimeModule) => void;
method addModuleRuntimeRequirements
addModuleRuntimeRequirements: ( module: Module, runtime: RuntimeSpec, items: Set<string>, transferOwnership?: boolean) => void;
method addTreeRuntimeRequirements
addTreeRuntimeRequirements: (chunk: Chunk, items: Iterable<string>) => void;
method attachDependentHashModules
attachDependentHashModules: ( chunk: Chunk, modules: Iterable<RuntimeModule>) => void;
method attachFullHashModules
attachFullHashModules: (chunk: Chunk, modules: Iterable<RuntimeModule>) => void;
method attachModules
attachModules: (chunk: Chunk, modules: Iterable<Module>) => void;
method attachRuntimeModules
attachRuntimeModules: (chunk: Chunk, modules: Iterable<RuntimeModule>) => void;
method canChunksBeIntegrated
canChunksBeIntegrated: (chunkA: Chunk, chunkB: Chunk) => boolean;
method clearChunkGraphForChunk
static clearChunkGraphForChunk: (chunk: Chunk) => void;
method clearChunkGraphForModule
static clearChunkGraphForModule: (module: Module) => void;
method compareChunks
compareChunks: (chunkA: Chunk, chunkB: Chunk) => 0 | 1 | -1;
method connectBlockAndChunkGroup
connectBlockAndChunkGroup: ( depBlock: AsyncDependenciesBlock, chunkGroup: ChunkGroup) => void;
method connectChunkAndEntryModule
connectChunkAndEntryModule: ( chunk: Chunk, module: Module, entrypoint: Entrypoint) => void;
method connectChunkAndModule
connectChunkAndModule: (chunk: Chunk, module: Module) => void;
method connectChunkAndRuntimeModule
connectChunkAndRuntimeModule: (chunk: Chunk, module: RuntimeModule) => void;
method disconnectChunk
disconnectChunk: (chunk: Chunk) => void;
method disconnectChunkAndEntryModule
disconnectChunkAndEntryModule: (chunk: Chunk, module: Module) => void;
method disconnectChunkAndModule
disconnectChunkAndModule: (chunk: Chunk, module: Module) => void;
method disconnectChunkAndRuntimeModule
disconnectChunkAndRuntimeModule: (chunk: Chunk, module: RuntimeModule) => void;
method disconnectChunkGroup
disconnectChunkGroup: (chunkGroup: ChunkGroup) => void;
method disconnectEntries
disconnectEntries: (chunk: Chunk) => void;
method disconnectEntryModule
disconnectEntryModule: (module: Module) => void;
method getBlockChunkGroup
getBlockChunkGroup: (depBlock: AsyncDependenciesBlock) => undefined | ChunkGroup;
method getChunkConditionMap
getChunkConditionMap: ( chunk: Chunk, filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean) => Record<string | number, boolean>;
method getChunkDependentHashModulesIterable
getChunkDependentHashModulesIterable: ( chunk: Chunk) => undefined | Iterable<RuntimeModule>;
method getChunkEntryDependentChunksIterable
getChunkEntryDependentChunksIterable: (chunk: Chunk) => Iterable<Chunk>;
method getChunkEntryModulesIterable
getChunkEntryModulesIterable: (chunk: Chunk) => Iterable<Module>;
method getChunkEntryModulesWithChunkGroupIterable
getChunkEntryModulesWithChunkGroupIterable: ( chunk: Chunk) => Iterable<[Module, undefined | Entrypoint]>;
method getChunkFullHashModulesIterable
getChunkFullHashModulesIterable: ( chunk: Chunk) => undefined | Iterable<RuntimeModule>;
method getChunkFullHashModulesSet
getChunkFullHashModulesSet: ( chunk: Chunk) => undefined | ReadonlySet<RuntimeModule>;
method getChunkGraphForChunk
static getChunkGraphForChunk: ( chunk: Chunk, deprecateMessage: string, deprecationCode: string) => ChunkGraph;
method getChunkGraphForModule
static getChunkGraphForModule: ( module: Module, deprecateMessage: string, deprecationCode: string) => ChunkGraph;
method getChunkModuleIdMap
getChunkModuleIdMap: ( chunk: Chunk, filterFn: (m: Module) => boolean, includeAllChunks?: boolean) => Record<string | number, (string | number)[]>;
method getChunkModuleRenderedHashMap
getChunkModuleRenderedHashMap: ( chunk: Chunk, filterFn: (m: Module) => boolean, hashLength?: number, includeAllChunks?: boolean) => Record<string | number, Record<string | number, string>>;
method getChunkModules
getChunkModules: (chunk: Chunk) => Module[];
method getChunkModulesIterable
getChunkModulesIterable: (chunk: Chunk) => Iterable<Module>;
method getChunkModulesIterableBySourceType
getChunkModulesIterableBySourceType: ( chunk: Chunk, sourceType: string) => undefined | Iterable<Module>;
method getChunkModuleSourceTypes
getChunkModuleSourceTypes: (chunk: Chunk, module: Module) => Set<string>;
method getChunkModulesSize
getChunkModulesSize: (chunk: Chunk) => number;
method getChunkModulesSizes
getChunkModulesSizes: (chunk: Chunk) => Record<string, number>;
method getChunkRootModules
getChunkRootModules: (chunk: Chunk) => Module[];
method getChunkRuntimeModulesInOrder
getChunkRuntimeModulesInOrder: (chunk: Chunk) => RuntimeModule[];
method getChunkRuntimeModulesIterable
getChunkRuntimeModulesIterable: (chunk: Chunk) => Iterable<RuntimeModule>;
method getChunkRuntimeRequirements
getChunkRuntimeRequirements: (chunk: Chunk) => ReadonlySet<string>;
method getChunkSize
getChunkSize: (chunk: Chunk, options?: ChunkSizeOptions) => number;
method getIntegratedChunksSize
getIntegratedChunksSize: ( chunkA: Chunk, chunkB: Chunk, options?: ChunkSizeOptions) => number;
method getModuleChunks
getModuleChunks: (module: Module) => Chunk[];
method getModuleChunksIterable
getModuleChunksIterable: (module: Module) => Iterable<Chunk>;
method getModuleGraphHash
getModuleGraphHash: ( module: Module, runtime: RuntimeSpec, withConnections?: boolean) => string;
method getModuleGraphHashBigInt
getModuleGraphHashBigInt: ( module: Module, runtime: RuntimeSpec, withConnections?: boolean) => bigint;
method getModuleHash
getModuleHash: (module: Module, runtime: RuntimeSpec) => string;
method getModuleId
getModuleId: (module: Module) => null | string | number;
method getModuleRuntimeRequirements
getModuleRuntimeRequirements: ( module: Module, runtime: RuntimeSpec) => ReadonlySet<string>;
method getModuleRuntimes
getModuleRuntimes: (module: Module) => RuntimeSpecSet;
method getModuleSourceTypes
getModuleSourceTypes: (module: Module) => Set<string>;
method getNumberOfChunkFullHashModules
getNumberOfChunkFullHashModules: (chunk: Chunk) => number;
method getNumberOfChunkModules
getNumberOfChunkModules: (chunk: Chunk) => number;
method getNumberOfEntryModules
getNumberOfEntryModules: (chunk: Chunk) => number;
method getNumberOfModuleChunks
getNumberOfModuleChunks: (module: Module) => number;
method getNumberOfRuntimeModules
getNumberOfRuntimeModules: (chunk: Chunk) => number;
method getOrderedChunkModules
getOrderedChunkModules: ( chunk: Chunk, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1) => Module[];
method getOrderedChunkModulesIterable
getOrderedChunkModulesIterable: ( chunk: Chunk, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1) => Iterable<Module>;
method getOrderedChunkModulesIterableBySourceType
getOrderedChunkModulesIterableBySourceType: ( chunk: Chunk, sourceType: string, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1) => undefined | Iterable<Module>;
method getOrderedModuleChunksIterable
getOrderedModuleChunksIterable: ( module: Module, sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1) => Iterable<Chunk>;
method getRenderedModuleHash
getRenderedModuleHash: (module: Module, runtime: RuntimeSpec) => string;
method getRuntimeId
getRuntimeId: (runtime: string) => string | number;
method getTreeRuntimeRequirements
getTreeRuntimeRequirements: (chunk: Chunk) => ReadonlySet<string>;
method hasChunkEntryDependentChunks
hasChunkEntryDependentChunks: (chunk: Chunk) => boolean;
method hasModuleHashes
hasModuleHashes: (module: Module, runtime: RuntimeSpec) => boolean;
method hasModuleInGraph
hasModuleInGraph: ( chunk: Chunk, filterFn: (m: Module) => boolean, filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean) => boolean;
method integrateChunks
integrateChunks: (chunkA: Chunk, chunkB: Chunk) => void;
method isEntryModule
isEntryModule: (module: Module) => boolean;
method isEntryModuleInChunk
isEntryModuleInChunk: (module: Module, chunk: Chunk) => boolean;
method isModuleInChunk
isModuleInChunk: (module: Module, chunk: Chunk) => boolean;
method isModuleInChunkGroup
isModuleInChunkGroup: (module: Module, chunkGroup: ChunkGroup) => boolean;
method replaceModule
replaceModule: (oldModule: Module, newModule: Module) => void;
method setChunkGraphForChunk
static setChunkGraphForChunk: (chunk: Chunk, chunkGraph: ChunkGraph) => void;
method setChunkGraphForModule
static setChunkGraphForModule: (module: Module, chunkGraph: ChunkGraph) => void;
method setChunkModuleSourceTypes
setChunkModuleSourceTypes: ( chunk: Chunk, module: Module, sourceTypes: Set<string>) => void;
method setModuleHashes
setModuleHashes: ( module: Module, runtime: RuntimeSpec, hash: string, renderedHash: string) => void;
method setModuleId
setModuleId: (module: Module, id: ModuleId) => void;
method setRuntimeId
setRuntimeId: (runtime: string, id: string | number) => void;
method upgradeDependentToFullHashModules
upgradeDependentToFullHashModules: (chunk: Chunk) => void;
class ChunkGroup
abstract class ChunkGroup {}
property asyncEntrypointsIterable
readonly asyncEntrypointsIterable: SortableSet<ChunkGroup>;
property blocksIterable
readonly blocksIterable: Iterable<AsyncDependenciesBlock>;
property childrenIterable
readonly childrenIterable: SortableSet<ChunkGroup>;
property chunks
chunks: Chunk[];
property debugId
readonly debugId: string;
get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
property getModuleIndex
getModuleIndex: (module: Module) => undefined | number;
property getModuleIndex2
getModuleIndex2: (module: Module) => undefined | number;
property groupDebugId
groupDebugId: number;
property id
readonly id: string;
get a unique id for ChunkGroup, made up of its member Chunk id's
property index
index?: number;
property name
name?: string;
returns the name of current ChunkGroup sets a new name for current ChunkGroup
property options
options: ChunkGroupOptions;
property origins
origins: OriginRecord[];
property parentsIterable
readonly parentsIterable: SortableSet<ChunkGroup>;
method addAsyncEntrypoint
addAsyncEntrypoint: (entrypoint: Entrypoint) => boolean;
method addBlock
addBlock: (block: AsyncDependenciesBlock) => boolean;
method addChild
addChild: (group: ChunkGroup) => boolean;
method addOptions
addOptions: (options: ChunkGroupOptions) => void;
when a new chunk is added to a chunkGroup, addingOptions will occur.
method addOrigin
addOrigin: ( module: null | Module, loc: DependencyLocation, request: string) => void;
method addParent
addParent: (parentChunk: ChunkGroup) => boolean;
method checkConstraints
checkConstraints: () => void;
method compareTo
compareTo: (chunkGraph: ChunkGraph, otherGroup: ChunkGroup) => 0 | 1 | -1;
Sorting predicate which allows current ChunkGroup to be compared against another. Sorting values are based off of number of chunks in ChunkGroup.
method getBlocks
getBlocks: () => AsyncDependenciesBlock[];
method getChildren
getChildren: () => ChunkGroup[];
method getChildrenByOrders
getChildrenByOrders: ( moduleGraph: ModuleGraph, chunkGraph: ChunkGraph) => Record<string, ChunkGroup[]>;
method getFiles
getFiles: () => string[];
method getModulePostOrderIndex
getModulePostOrderIndex: (module: Module) => undefined | number;
Gets the bottom-up index of a module in this ChunkGroup
method getModulePreOrderIndex
getModulePreOrderIndex: (module: Module) => undefined | number;
Gets the top-down index of a module in this ChunkGroup
method getNumberOfBlocks
getNumberOfBlocks: () => number;
method getNumberOfChildren
getNumberOfChildren: () => number;
method getNumberOfParents
getNumberOfParents: () => number;
method getParents
getParents: () => ChunkGroup[];
method hasBlock
hasBlock: (block: AsyncDependenciesBlock) => boolean;
method hasParent
hasParent: (parent: ChunkGroup) => boolean;
method insertChunk
insertChunk: (chunk: Chunk, before: Chunk) => boolean;
inserts a chunk before another existing chunk in group
method isInitial
isInitial: () => boolean;
method pushChunk
pushChunk: (chunk: Chunk) => boolean;
add a chunk into ChunkGroup. Is pushed on or prepended
method remove
remove: () => void;
method removeChild
removeChild: (group: ChunkGroup) => boolean;
method removeChunk
removeChunk: (chunk: Chunk) => boolean;
method removeParent
removeParent: (chunkGroup: ChunkGroup) => boolean;
method replaceChunk
replaceChunk: (oldChunk: Chunk, newChunk: Chunk) => undefined | boolean;
method setModulePostOrderIndex
setModulePostOrderIndex: (module: Module, index: number) => void;
Sets the bottom-up index of a module in this ChunkGroup
method setModulePreOrderIndex
setModulePreOrderIndex: (module: Module, index: number) => void;
Sets the top-down index of a module in this ChunkGroup
method sortItems
sortItems: () => void;
method unshiftChunk
unshiftChunk: (chunk: Chunk) => boolean;
Performs an unshift of a specific chunk
class CleanPlugin
class CleanPlugin {}
constructor
constructor(options?: CleanOptions);
property options
options: { dry: boolean; keep?: string | RegExp | ((filename: string) => boolean);};
method apply
apply: (compiler: Compiler) => void;
Apply the plugin
method getCompilationHooks
static getCompilationHooks: ( compilation: Compilation) => CleanPluginCompilationHooks;
class Compilation
class Compilation {}
constructor
constructor(compiler: Compiler, params: CompilationParams);
Creates an instance of Compilation.
property additionalChunkAssets
additionalChunkAssets: string[];
property addModuleQueue
addModuleQueue: AsyncQueue<Module, string, Module>;
property assets
assets: CompilationAssets;
property assetsInfo
assetsInfo: Map<string, AssetInfo>;
property asyncEntrypoints
asyncEntrypoints: Entrypoint[];
property bail
bail: boolean;
property buildDependencies
buildDependencies: LazySet<string>;
property buildQueue
buildQueue: AsyncQueue<Module, Module, Module>;
property buildTimeExecutedModules
buildTimeExecutedModules: WeakSet<Module>;
property builtModules
builtModules: WeakSet<Module>;
property children
children: Compilation[];
property childrenCounters
childrenCounters: Record<string, number>;
property chunkGraph
chunkGraph: ChunkGraph;
property chunkGroups
chunkGroups: ChunkGroup[];
property chunks
chunks: Set<Chunk>;
property chunkTemplate
chunkTemplate: ChunkTemplate;
property codeGeneratedModules
codeGeneratedModules: WeakSet<Module>;
property codeGenerationResults
codeGenerationResults: CodeGenerationResults;
property comparedForEmitAssets
comparedForEmitAssets: Set<string>;
property compilationDependencies
compilationDependencies: { add: (item: string) => LazySet<string> };
property compiler
compiler: Compiler;
property compilerPath
compilerPath: string;
property contextDependencies
contextDependencies: LazySet<string>;
property creatingModuleDuringBuild
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
Modules in value are building during the build of Module in key. Means value blocking key from finishing. Needed to detect build cycles.
property dependencyFactories
dependencyFactories: Map<DepConstructor, ModuleFactory>;
property dependencyTemplates
dependencyTemplates: DependencyTemplates;
property emittedAssets
emittedAssets: Set<string>;
property endTime
endTime?: number;
property entries
entries: Map<string, EntryData>;
property entrypoints
entrypoints: Map<string, Entrypoint>;
property errors
errors: WebpackError[];
property factorizeModule
factorizeModule: { ( options: FactorizeModuleOptions & { factoryResult?: false }, callback: (err?: null | WebpackError, result?: null | Module) => void ): void; ( options: FactorizeModuleOptions & { factoryResult: true }, callback: ( err?: null | WebpackError, result?: ModuleFactoryResult ) => void ): void;};
property factorizeQueue
factorizeQueue: AsyncQueue< FactorizeModuleOptions, string, Module | ModuleFactoryResult>;
property fileDependencies
fileDependencies: LazySet<string>;
property fileSystemInfo
fileSystemInfo: FileSystemInfo;
property fullHash
fullHash?: string;
property globalEntry
globalEntry: EntryData;
property hash
hash?: string;
property hooks
hooks: Readonly<{ buildModule: SyncHook<[Module]>; rebuildModule: SyncHook<[Module]>; failedModule: SyncHook<[Module, WebpackError]>; succeedModule: SyncHook<[Module]>; stillValidModule: SyncHook<[Module]>; addEntry: SyncHook<[Dependency, EntryOptions]>; failedEntry: SyncHook<[Dependency, EntryOptions, Error]>; succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>; dependencyReferencedExports: SyncWaterfallHook< [(string[] | ReferencedExport)[], Dependency, RuntimeSpec] >; executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>; prepareModuleExecution: AsyncParallelHook< [ExecuteModuleArgument, ExecuteModuleContext] >; finishModules: AsyncSeriesHook<[Iterable<Module>]>; finishRebuildingModule: AsyncSeriesHook<[Module]>; unseal: SyncHook<[]>; seal: SyncHook<[]>; beforeChunks: SyncHook<[]>; afterChunks: SyncHook<[Iterable<Chunk>]>; optimizeDependencies: SyncBailHook<[Iterable<Module>], boolean | void>; afterOptimizeDependencies: SyncHook<[Iterable<Module>]>; optimize: SyncHook<[]>; optimizeModules: SyncBailHook<[Iterable<Module>], boolean | void>; afterOptimizeModules: SyncHook<[Iterable<Module>]>; optimizeChunks: SyncBailHook< [Iterable<Chunk>, ChunkGroup[]], boolean | void >; afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>; optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>; afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>; optimizeChunkModules: AsyncSeriesBailHook< [Iterable<Chunk>, Iterable<Module>], void >; afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>; shouldRecord: SyncBailHook<[], boolean>; additionalChunkRuntimeRequirements: SyncHook< [Chunk, Set<string>, RuntimeRequirementsContext] >; runtimeRequirementInChunk: HookMap< SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void> >; additionalModuleRuntimeRequirements: SyncHook< [Module, Set<string>, RuntimeRequirementsContext] >; runtimeRequirementInModule: HookMap< SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], void> >; additionalTreeRuntimeRequirements: SyncHook< [Chunk, Set<string>, RuntimeRequirementsContext] >; runtimeRequirementInTree: HookMap< SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void> >; runtimeModule: SyncHook<[RuntimeModule, Chunk]>; reviveModules: SyncHook<[Iterable<Module>, any]>; beforeModuleIds: SyncHook<[Iterable<Module>]>; moduleIds: SyncHook<[Iterable<Module>]>; optimizeModuleIds: SyncHook<[Iterable<Module>]>; afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>; reviveChunks: SyncHook<[Iterable<Chunk>, any]>; beforeChunkIds: SyncHook<[Iterable<Chunk>]>; chunkIds: SyncHook<[Iterable<Chunk>]>; optimizeChunkIds: SyncHook<[Iterable<Chunk>]>; afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>; recordModules: SyncHook<[Iterable<Module>, any]>; recordChunks: SyncHook<[Iterable<Chunk>, any]>; optimizeCodeGeneration: SyncHook<[Iterable<Module>]>; beforeModuleHash: SyncHook<[]>; afterModuleHash: SyncHook<[]>; beforeCodeGeneration: SyncHook<[]>; afterCodeGeneration: SyncHook<[]>; beforeRuntimeRequirements: SyncHook<[]>; afterRuntimeRequirements: SyncHook<[]>; beforeHash: SyncHook<[]>; contentHash: SyncHook<[Chunk]>; afterHash: SyncHook<[]>; recordHash: SyncHook<[any]>; record: SyncHook<[Compilation, any]>; beforeModuleAssets: SyncHook<[]>; shouldGenerateChunkAssets: SyncBailHook<[], boolean>; beforeChunkAssets: SyncHook<[]>; additionalChunkAssets: FakeHook< Pick< AsyncSeriesHook<[Set<Chunk>]>, 'name' | 'tap' | 'tapAsync' | 'tapPromise' > >; additionalAssets: FakeHook< Pick<AsyncSeriesHook<[]>, 'name' | 'tap' | 'tapAsync' | 'tapPromise'> >; optimizeChunkAssets: FakeHook< Pick< AsyncSeriesHook<[Set<Chunk>]>, 'name' | 'tap' | 'tapAsync' | 'tapPromise' > >; afterOptimizeChunkAssets: FakeHook< Pick< AsyncSeriesHook<[Set<Chunk>]>, 'name' | 'tap' | 'tapAsync' | 'tapPromise' > >; optimizeAssets: AsyncSeriesHook< [CompilationAssets], ProcessAssetsAdditionalOptions >; afterOptimizeAssets: SyncHook<[CompilationAssets]>; processAssets: AsyncSeriesHook< [CompilationAssets], ProcessAssetsAdditionalOptions >; afterProcessAssets: SyncHook<[CompilationAssets]>; processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>; needAdditionalSeal: SyncBailHook<[], boolean>; afterSeal: AsyncSeriesHook<[]>; renderManifest: SyncWaterfallHook< [RenderManifestEntry[], RenderManifestOptions] >; fullHash: SyncHook<[Hash]>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>; moduleAsset: SyncHook<[Module, string]>; chunkAsset: SyncHook<[Chunk, string]>; assetPath: SyncWaterfallHook<[string, object, AssetInfo]>; needAdditionalPass: SyncBailHook<[], boolean>; childCompiler: SyncHook<[Compiler, string, number]>; log: SyncBailHook<[string, LogEntry], true>; processWarnings: SyncWaterfallHook<[WebpackError[]]>; processErrors: SyncWaterfallHook<[WebpackError[]]>; statsPreset: HookMap< SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]> >; statsNormalize: SyncHook< [Partial<NormalizedStatsOptions>, CreateStatsOptionsContext] >; statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>; statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>; readonly normalModuleLoader: SyncHook< [LoaderContextNormalModule<any>, NormalModule] >;}>;
property inputFileSystem
inputFileSystem: InputFileSystem;
property logger
logger: WebpackLogger;
property logging
logging: Map<string, LogEntry[]>;
property mainTemplate
mainTemplate: MainTemplate;
property missingDependencies
missingDependencies: LazySet<string>;
property moduleGraph
moduleGraph: ModuleGraph;
property moduleMemCaches
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
property moduleMemCaches2
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
property modules
modules: Set<Module>;
property moduleTemplates
moduleTemplates: ModuleTemplates;
property name
name?: string;
property namedChunkGroups
namedChunkGroups: Map<string, ChunkGroup>;
property namedChunks
namedChunks: Map<string, Chunk>;
property needAdditionalPass
needAdditionalPass: boolean;
property options
options: WebpackOptionsNormalized;
property outputOptions
outputOptions: OutputNormalized;
property params
params: CompilationParams;
property PROCESS_ASSETS_STAGE_ADDITIONAL
static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
Add additional assets to the compilation.
property PROCESS_ASSETS_STAGE_ADDITIONS
static PROCESS_ASSETS_STAGE_ADDITIONS: number;
Add additional sections to existing assets, like a banner or initialization code.
property PROCESS_ASSETS_STAGE_ANALYSE
static PROCESS_ASSETS_STAGE_ANALYSE: number;
Analyse existing assets.
property PROCESS_ASSETS_STAGE_DERIVED
static PROCESS_ASSETS_STAGE_DERIVED: number;
Derive new assets from existing assets. Existing assets should not be treated as complete.
property PROCESS_ASSETS_STAGE_DEV_TOOLING
static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
Add development tooling to assets, e. g. by extracting a SourceMap.
property PROCESS_ASSETS_STAGE_OPTIMIZE
static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
Optimize existing assets in a general way.
property PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY
static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
property PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT
static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
Optimize the count of existing assets, e. g. by merging them. Only assets of the same type should be merged. For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
property PROCESS_ASSETS_STAGE_OPTIMIZE_HASH
static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
property PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
Optimize the count of existing assets, e. g. by inlining assets of into other assets. Only assets of different types should be inlined. For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
property PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE
static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
property PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER
static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
property PROCESS_ASSETS_STAGE_PRE_PROCESS
static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
Basic preprocessing of assets.
property PROCESS_ASSETS_STAGE_REPORT
static PROCESS_ASSETS_STAGE_REPORT: number;
Creating assets for reporting purposes.
property PROCESS_ASSETS_STAGE_SUMMARIZE
static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
Summarize the list of existing assets e. g. creating an assets manifest of Service Workers.
property processDependenciesQueue
processDependenciesQueue: AsyncQueue<Module, Module, Module>;
property profile
profile: boolean;
property rebuildQueue
rebuildQueue: AsyncQueue<Module, Module, Module>;
property records
records: any;
property requestShortener
requestShortener: RequestShortener;
property resolverFactory
resolverFactory: ResolverFactory;
property runtimeTemplate
runtimeTemplate: RuntimeTemplate;
property startTime
startTime?: number;
property usedChunkIds
usedChunkIds: Set<string | number>;
property usedModuleIds
usedModuleIds: Set<number>;
property valueCacheVersions
valueCacheVersions: Map<string, ValueCacheVersion>;
property warnings
warnings: WebpackError[];
method addAsyncEntrypoint
addAsyncEntrypoint: ( options: EntryOptions, module: Module, loc: DependencyLocation, request: string) => Entrypoint;
method addChunk
addChunk: (name?: string) => Chunk;
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.
method addChunkInGroup
addChunkInGroup: ( groupOptions: string | ChunkGroupOptions, module?: Module, loc?: SyntheticDependencyLocation | RealDependencyLocation, request?: string) => ChunkGroup;
If
module
is passed,loc
andrequest
must also be passed.
method addEntry
addEntry: ( context: string, entry: Dependency, optionsOrName: string | EntryOptions, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method addInclude
addInclude: ( context: string, dependency: Dependency, options: EntryOptions, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method addModule
addModule: ( module: Module, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method addModuleChain
addModuleChain: ( context: string, dependency: Dependency, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method addModuleTree
addModuleTree: ( __0: { context: string; dependency: Dependency; contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>; }, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method addRuntimeModule
addRuntimeModule: ( chunk: Chunk, module: RuntimeModule, chunkGraph?: ChunkGraph) => void;
method assignDepth
assignDepth: (module: Module) => void;
method assignDepths
assignDepths: (modules: Set<Module>) => void;
method assignRuntimeIds
assignRuntimeIds: () => void;
method buildModule
buildModule: ( module: Module, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
Schedules a build of the module object
method checkConstraints
checkConstraints: () => void;
method clearAssets
clearAssets: () => void;
method codeGeneration
codeGeneration: (callback: (err?: null | WebpackError) => void) => void;
method createChildCompiler
createChildCompiler: ( name: string, outputOptions?: OutputNormalized, plugins?: ( | ((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance )[]) => 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
method createChunkAssets
createChunkAssets: (callback: (err?: null | WebpackError) => void) => void;
method createHash
createHash: () => { module: Module; hash: string; runtime: RuntimeSpec; runtimes: RuntimeSpec[];}[];
method createModuleAssets
createModuleAssets: () => void;
method createModuleHashes
createModuleHashes: () => void;
method createStatsFactory
createStatsFactory: (options: NormalizedStatsOptions) => StatsFactory;
method createStatsOptions
createStatsOptions: ( optionsOrPreset?: string | boolean | StatsOptions, context?: CreateStatsOptionsContext) => NormalizedStatsOptions;
method createStatsPrinter
createStatsPrinter: (options: NormalizedStatsOptions) => StatsPrinter;
method deleteAsset
deleteAsset: (file: string) => void;
method emitAsset
emitAsset: (file: string, source: Source, assetInfo?: AssetInfo) => void;
method executeModule
executeModule: ( module: Module, options: ExecuteModuleOptions, callback: (err: null | WebpackError, result?: ExecuteModuleResult) => void) => void;
method findModule
findModule: (identifier: string) => undefined | Module;
Attempts to search for a module by its identifier
method finish
finish: (callback: (err?: null | WebpackError) => void) => void;
method getAsset
getAsset: (name: string) => undefined | Readonly<Asset>;
method getAssetPath
getAssetPath: (filename: TemplatePath, data: PathData) => string;
method getAssetPathWithInfo
getAssetPathWithInfo: ( filename: TemplatePath, data: PathData) => InterpolatedPathAndAssetInfo;
method getAssets
getAssets: () => Readonly<Asset>[];
method getCache
getCache: (name: string) => CacheFacade;
method getDependencyReferencedExports
getDependencyReferencedExports: ( dependency: Dependency, runtime: RuntimeSpec) => (string[] | ReferencedExport)[];
method getErrors
getErrors: () => WebpackError[];
method getLogger
getLogger: (name: string | (() => string)) => WebpackLogger;
method getModule
getModule: (module: Module) => Module;
Fetches a module from a compilation by its identifier
method getPath
getPath: (filename: TemplatePath, data?: PathData) => string;
method getPathWithInfo
getPathWithInfo: ( filename: TemplatePath, data?: PathData) => InterpolatedPathAndAssetInfo;
method getRenderManifest
getRenderManifest: (options: RenderManifestOptions) => RenderManifestEntry[];
method getStats
getStats: () => Stats;
method getWarnings
getWarnings: () => WebpackError[];
method handleModuleCreation
handleModuleCreation: ( __0: HandleModuleCreationOptions, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method patchChunksAfterReasonRemoval
patchChunksAfterReasonRemoval: (module: Module, chunk: Chunk) => void;
method processModuleDependencies
processModuleDependencies: ( module: Module, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method processModuleDependenciesNonRecursive
processModuleDependenciesNonRecursive: (module: Module) => void;
method processRuntimeRequirements
processRuntimeRequirements: (__0?: { chunkGraph?: ChunkGraph; modules?: Iterable<Module>; chunks?: Iterable<Chunk>; codeGenerationResults?: CodeGenerationResults; chunkGraphEntries?: Iterable<Chunk>;}) => void;
method rebuildModule
rebuildModule: ( module: Module, callback: (err?: null | WebpackError, result?: null | Module) => void) => void;
method removeChunkFromDependencies
removeChunkFromDependencies: (block: DependenciesBlock, chunk: Chunk) => void;
method removeReasonsOfDependencyBlock
removeReasonsOfDependencyBlock: ( module: Module, block: DependenciesBlockLike) => void;
method renameAsset
renameAsset: (file: string, newFile: string) => void;
method reportDependencyErrorsAndWarnings
reportDependencyErrorsAndWarnings: ( module: Module, blocks: DependenciesBlock[]) => boolean;
method seal
seal: (callback: (err?: null | WebpackError) => void) => void;
method sortItemsWithChunkIds
sortItemsWithChunkIds: () => void;
method summarizeDependencies
summarizeDependencies: () => void;
method unseal
unseal: () => void;
method updateAsset
updateAsset: ( file: string, newSourceOrFunction: Source | ((arg0: Source) => Source), assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)) => void;
class Compiler
class Compiler {}
constructor
constructor(context: string, options?: WebpackOptionsNormalized);
property cache
cache: Cache;
property compilerPath
compilerPath: string;
property context
context: string;
property contextTimestamps
contextTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | 'ignore'>;
property fileTimestamps
fileTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | 'ignore'>;
property fsStartTime
fsStartTime?: number;
property hooks
hooks: Readonly<{ initialize: SyncHook<[]>; shouldEmit: SyncBailHook<[Compilation], boolean>; done: AsyncSeriesHook<[Stats]>; afterDone: SyncHook<[Stats]>; additionalPass: AsyncSeriesHook<[]>; beforeRun: AsyncSeriesHook<[Compiler]>; run: AsyncSeriesHook<[Compiler]>; emit: AsyncSeriesHook<[Compilation]>; assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>; afterEmit: AsyncSeriesHook<[Compilation]>; thisCompilation: SyncHook<[Compilation, CompilationParams]>; compilation: SyncHook<[Compilation, CompilationParams]>; normalModuleFactory: SyncHook<[NormalModuleFactory]>; contextModuleFactory: SyncHook<[ContextModuleFactory]>; beforeCompile: AsyncSeriesHook<[CompilationParams]>; compile: SyncHook<[CompilationParams]>; make: AsyncParallelHook<[Compilation]>; finishMake: AsyncParallelHook<[Compilation]>; afterCompile: AsyncSeriesHook<[Compilation]>; readRecords: AsyncSeriesHook<[]>; emitRecords: AsyncSeriesHook<[]>; watchRun: AsyncSeriesHook<[Compiler]>; failed: SyncHook<[Error]>; invalid: SyncHook<[string, number]>; watchClose: SyncHook<[]>; shutdown: AsyncSeriesHook<[]>; infrastructureLog: SyncBailHook<[string, string, any[]], true>; environment: SyncHook<[]>; afterEnvironment: SyncHook<[]>; afterPlugins: SyncHook<[Compiler]>; afterResolvers: SyncHook<[Compiler]>; entryOption: SyncBailHook<[string, EntryNormalized], boolean>;}>;
property idle
idle: boolean;
property immutablePaths
immutablePaths: Set<string | RegExp>;
property infrastructureLogger
infrastructureLogger?: (arg0: string, arg1: LogTypeEnum, arg2?: any[]) => void;
property inputFileSystem
inputFileSystem: InputFileSystem;
property intermediateFileSystem
intermediateFileSystem: IntermediateFileSystem;
property managedPaths
managedPaths: Set<string | RegExp>;
property modifiedFiles
modifiedFiles?: ReadonlySet<string>;
property moduleMemCaches
moduleMemCaches?: Map< Module, { buildInfo: BuildInfo; references?: WeakMap<Dependency, Module>; memCache: WeakTupleMap<any, any>; }>;
property name
name?: string;
property options
options: WebpackOptionsNormalized;
property outputFileSystem
outputFileSystem: OutputFileSystem;
property outputPath
outputPath: string;
property parentCompilation
parentCompilation?: Compilation;
property platform
platform: Readonly<PlatformTargetProperties>;
property records
records: Record<string, any>;