On this page

class GetChunkFilenameRuntimeModule extends RuntimeModule
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L21

DependenciesBlock is the base class for all Module classes in webpack. It describes a "block" of dependencies which are pointers to other DependenciesBlock instances. For example when a Module has a CommonJs require statement, the DependencyBlock for the CommonJs module would be added as a dependency to the Module. DependenciesBlock is inherited by two types of classes: Module subclasses and AsyncDependenciesBlock subclasses. The only difference between the two is that AsyncDependenciesBlock subclasses are used for code-splitting (async boundary) and Module subclasses are not.

new GetChunkFilenameRuntimeModule(contentType, name, global, getFilenameForChunk, allChunks, usesFullHashDigest?): GetChunkFilenameRuntimeModule
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L30
Attributes
contentType:string
name:string
global:string
getFilenameForChunk:(chunk: Chunk) => string | false | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string)
allChunks:boolean
usesFullHashDigest:boolean
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L46
Type:boolean
Source Code: lib/DependenciesBlock.js#L32
Source Code: lib/Module.js#L290
Source Code: lib/Module.js#L288
Source Code: lib/RuntimeModule.js#L56
Type:Chunk
Source Code: lib/RuntimeModule.js#L58
Source Code: lib/Module.js#L294
Type:Dependency[]
Source Code: lib/RuntimeModule.js#L54
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L40
Type:string
Source Code: lib/Module.js#L259
Type:string | null
Source Code: lib/Module.js#L267
Type:number
Source Code: lib/DependenciesBlock.js#L30
Type:Dependency[]
Source Code: lib/RuntimeModule.js#L62
Type:boolean
Source Code: lib/Module.js#L436
Stability: 0Deprecated
Type:number | null

Returns the depth. Updates the depth using the provided value.

Source Code: lib/Module.js#L273
Source Code: lib/RuntimeModule.js#L60
Type:boolean
getChunkFilenameRuntimeModule.getFilenameForChunk(chunk): string | false | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string)
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L44
Attributes
chunk:Chunk
Returns:string | false | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string)
Source Code: lib/runtime/GetChunkFilenameRuntimeModule.js#L42
Type:string
Source Code: lib/Module.js#L304
Stability: 0Deprecated
Type:string | number | null

Returns the module id assigned by the chunk graph. Updates the module id using the provided value.

Source Code: lib/Module.js#L384
Stability: 0Deprecated
Type:number | null

Returns the pre-order index. Updates the pre-order index using the provided value.

Source Code: lib/Module.js#L410
Stability: 0Deprecated
Type:number | null

Returns the post-order index. Updates the post-order index using the provided value.

Source Code: lib/Module.js#L462
Stability: 0Deprecated
Type:Module | null

Returns the issuer. Updates the issuer using the provided value.

Source Code: lib/Module.js#L261
Type:string | null
Source Code: lib/RuntimeModule.js#L46
Type:string
Source Code: lib/Module.js#L263
Type:boolean
Source Code: lib/DependenciesBlock.js#L34
Source Code: lib/Module.js#L292
Type:Dependency[]
Source Code: lib/Module.js#L359
Stability: 0Deprecated
Source Code: lib/Module.js#L271
Source Code: lib/RuntimeModule.js#L48
Type:number
Source Code: lib/Module.js#L257
Type:string
Type:any
Source Code: lib/Module.js#L279
Type:boolean
Source Code: lib/Module.js#L277
Type:boolean
Type:number

Runtime modules which attach to handlers of other runtime modules

Type:number

Runtime modules with simple dependencies on other runtime modules

Type:number

Runtime modules without any dependencies to other runtime modules

Type:number

Runtime modules which trigger actions on bootstrap

Source Code: lib/Module.js#L607
Stability: 0Deprecated
Type:any
Source Code: lib/Module.js#L636
Type:string

Gets exports argument.

Type:any
Source Code: lib/Module.js#L334
Stability: 0Deprecated
Type:string

Returns the hash of the module.

Type:any
Source Code: lib/Module.js#L644
Type:string

Gets module argument.

Stability: 0Deprecated
Type:(string | ((requestShortener: RequestShortener) => string))[]

Gets optimization bailout.

Source Code: lib/Module.js#L512
Stability: 0Deprecated
Type:boolean
Source Code: lib/Module.js#L347
Stability: 0Deprecated
Type:string

Returns the rendered hash of the module.

Stability: 0Deprecated
Type:any
getChunkFilenameRuntimeModule.addBlock(block): void
Source Code: lib/DependenciesBlock.js#L50
Attributes

Adds a DependencyBlock to DependencyBlock relationship. This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)

getChunkFilenameRuntimeModule.addCacheDependencies(fileDependencies, contextDependencies, missingDependencies, buildDependencies): void
Source Code: lib/Module.js#L1268
Attributes
fileDependencies:LazySet<string>
contextDependencies:LazySet<string>
missingDependencies:LazySet<string>
buildDependencies:LazySet<string>

Adds the provided file dependencies to the module.

getChunkFilenameRuntimeModule.addChunk(chunk): boolean
Source Code: lib/Module.js#L528
Stability: 0Deprecated
Attributes
chunk:Chunk
Returns:boolean

Adds the provided chunk to the module.

getChunkFilenameRuntimeModule.addCodeGenerationDependency(codeGenerationDependency): void
Source Code: lib/Module.js#L739
Attributes
codeGenerationDependency:Dependency

Adds code generation dependency.

getChunkFilenameRuntimeModule.addDependency(dependency): void
Source Code: lib/DependenciesBlock.js#L61
Attributes
dependency:Dependency

Adds the provided dependency to the dependencies block.

getChunkFilenameRuntimeModule.addError(error): void
Source Code: lib/Module.js#L793
Attributes
error:Error

Adds the provided error to the module.

getChunkFilenameRuntimeModule.addPresentationalDependency(presentationalDependency): void
Source Code: lib/Module.js#L725
Attributes
presentationalDependency:Dependency

Adds presentational dependency.

getChunkFilenameRuntimeModule.addWarning(warning): void
Source Code: lib/Module.js#L765
Attributes
warning:Error

Adds the provided warning to the module.

getChunkFilenameRuntimeModule.attach(compilation, chunk, chunkGraph?): void
Source Code: lib/RuntimeModule.js#L74
Attributes
compilation:Compilation
chunk:Chunk
chunkGraph:ChunkGraph

Processes the provided compilation.

getChunkFilenameRuntimeModule.build(options, compilation, resolver, fs, callback): void
Source Code: lib/Module.js#L1036
Attributes

Builds the module using the provided compilation context.

getChunkFilenameRuntimeModule.chunkCondition(chunk, compilation): boolean
Source Code: lib/Module.js#L1200
Attributes
chunk:Chunk
compilation:Compilation
Returns:boolean

Returns true if the module can be placed in the chunk.

getChunkFilenameRuntimeModule.cleanupForCache(): void
Source Code: lib/Module.js#L1248

Assuming this module is in the cache. Remove internal references to allow freeing some memory.

getChunkFilenameRuntimeModule.clearDependenciesAndBlocks(): void
Source Code: lib/DependenciesBlock.js#L81

Clear dependencies and blocks.

getChunkFilenameRuntimeModule.clearWarningsAndErrors(): void
Source Code: lib/Module.js#L820

removes all warnings and errors

getChunkFilenameRuntimeModule.codeGeneration(context): CodeGenerationResult
Source Code: lib/Module.js#L1168
Attributes

Generates code and runtime requirements for this module.

getChunkFilenameRuntimeModule.deserialize(__namedParameters): void
Source Code: lib/DependenciesBlock.js#L114
Attributes

Restores this instance from the provided deserializer context.

getChunkFilenameRuntimeModule.generate(): string | null
Source Code: lib/RuntimeModule.js#L211
Returns:string | null

Generates runtime code for this runtime module.

getChunkFilenameRuntimeModule.getChunks(): Chunk[]
Source Code: lib/Module.js#L583
Stability: 0Deprecated
Returns:Chunk[]
getChunkFilenameRuntimeModule.getConcatenationBailoutReason(context): string | undefined
Source Code: lib/Module.js#L1150
Attributes

Returns the reason this module cannot be concatenated, when one exists.

getChunkFilenameRuntimeModule.getErrors(): Error[] | undefined
Source Code: lib/Module.js#L804
Returns:Error[] | undefined

Returns list of errors if any.

getChunkFilenameRuntimeModule.getExportsType(moduleGraph, strict?): ExportsType
Source Code: lib/Module.js#L658
Attributes
moduleGraph:ModuleGraph
strict:boolean
Returns:ExportsType

Returns export type.

getChunkFilenameRuntimeModule.getGeneratedCode(): string | null
Source Code: lib/RuntimeModule.js#L221
Returns:string | null

Gets generated code.

getChunkFilenameRuntimeModule.getNumberOfChunks(): number
Source Code: lib/Module.js#L595
Stability: 0Deprecated
Returns:number
getChunkFilenameRuntimeModule.getNumberOfErrors(): number
Source Code: lib/Module.js#L812
Returns:number

Gets number of errors.

getChunkFilenameRuntimeModule.getNumberOfWarnings(): number
Source Code: lib/Module.js#L784
Returns:number

Gets number of warnings.

getChunkFilenameRuntimeModule.getReferencedSourceTypes(): ReadonlySet<string> | undefined
Source Code: lib/Module.js#L1059
Returns:ReadonlySet<string> | undefined

Freshly recomputed source types when they depend on incoming connections, for chunk-graph cache invalidation; undefined otherwise. #20800

getChunkFilenameRuntimeModule.getRootBlock(): DependenciesBlock
Source Code: lib/DependenciesBlock.js#L37
getChunkFilenameRuntimeModule.getSideEffectsConnectionState(moduleGraph): ConnectionState
Source Code: lib/Module.js#L1159
Attributes
moduleGraph:ModuleGraph

Gets side effects connection state.

getChunkFilenameRuntimeModule.getSourceBasicTypes(): ReadonlySet<string>
Source Code: lib/Module.js#L1072
Returns: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.

getChunkFilenameRuntimeModule.getSourceTypes(): ReadonlySet<string>
Source Code: lib/Module.js#L1047
Returns:ReadonlySet<string>

Returns the source types this module can generate.

getChunkFilenameRuntimeModule.getUnsafeCacheData(): UnsafeCacheData
Source Code: lib/Module.js#L1228

Module should be unsafe cached. Get data that's needed for that. This data will be passed to restoreFromUnsafeCache later.

getChunkFilenameRuntimeModule.getWarnings(): Error[] | undefined
Source Code: lib/Module.js#L776
Returns:Error[] | undefined

Returns list of warnings if any.

getChunkFilenameRuntimeModule.hasChunkCondition(): boolean
Source Code: lib/Module.js#L1204
Returns:boolean
getChunkFilenameRuntimeModule.hasReasonForChunk(chunk, moduleGraph, chunkGraph): boolean
Source Code: lib/Module.js#L899
Attributes
chunk:Chunk
moduleGraph:ModuleGraph
chunkGraph:ChunkGraph
Returns:boolean

Checks whether this module contains the chunk.

getChunkFilenameRuntimeModule.hasReasons(moduleGraph, runtime): boolean
Source Code: lib/Module.js#L924
Attributes
moduleGraph:ModuleGraph
runtime:RuntimeSpec
Returns:boolean

Checks whether this module contains the module graph.

getChunkFilenameRuntimeModule.identifier(): string
Source Code: lib/Module.js#L1006
Returns:string

Returns the unique identifier used to reference this module.

getChunkFilenameRuntimeModule.invalidateBuild(): void
Source Code: lib/Module.js#L996

Invalidates the cached state associated with this value.

getChunkFilenameRuntimeModule.isAccessibleInChunk(chunkGraph, chunk, ignoreChunk?): boolean
Source Code: lib/Module.js#L856
Attributes
chunkGraph:ChunkGraph
chunk:Chunk
ignoreChunk:Chunk
Returns:boolean

Checks whether this module is accessible in chunk.

getChunkFilenameRuntimeModule.isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk?): boolean
Source Code: lib/Module.js#L871
Attributes
chunkGraph:ChunkGraph
chunkGroup:ChunkGroup
ignoreChunk:Chunk
Returns:boolean

Checks whether this module is accessible in chunk group.

getChunkFilenameRuntimeModule.isEntryModule(): boolean
Source Code: lib/Module.js#L571
Stability: 0Deprecated
Returns:boolean
getChunkFilenameRuntimeModule.isInChunk(chunk): boolean
Source Code: lib/Module.js#L559
Stability: 0Deprecated
Attributes
chunk:Chunk
Returns:boolean

Checks whether this module is in the provided chunk.

getChunkFilenameRuntimeModule.isOptional(moduleGraph): boolean
Source Code: lib/Module.js#L834
Attributes
moduleGraph:ModuleGraph
Returns:boolean

Checks whether this module is optional.

getChunkFilenameRuntimeModule.isProvided(exportName): boolean | null
Source Code: lib/Module.js#L623
Stability: 0Deprecated
Attributes
exportName:string
Returns:boolean | null

Checks whether this module provides the specified export.

getChunkFilenameRuntimeModule.libIdent(options): string | null
Source Code: lib/Module.js#L1133
Attributes
Returns:string | null

Gets the library identifier.

getChunkFilenameRuntimeModule.nameForCondition(): string | null
Source Code: lib/Module.js#L1141
Returns:string | null

Returns the path used when matching this module against rule conditions.

getChunkFilenameRuntimeModule.needBuild(context, callback): void
Source Code: lib/Module.js#L945
Attributes
callback:(err?: WebpackError | null, needBuild?: boolean) => void

Checks whether the module needs to be rebuilt for the current build state.

getChunkFilenameRuntimeModule.needRebuild(fileTimestamps, contextTimestamps): boolean
Source Code: lib/Module.js#L961
Stability: 0Deprecated: Use needBuild instead
Attributes
fileTimestamps:Map<string, number | null>
contextTimestamps:Map<string, number | null>
Returns:boolean

Checks whether it needs rebuild.

getChunkFilenameRuntimeModule.originalSource(): Source | null
Source Code: lib/Module.js#L1257
Returns:Source | null

Gets the original source.

getChunkFilenameRuntimeModule.readableIdentifier(requestShortener): string
Source Code: lib/Module.js#L1019
Attributes
requestShortener:RequestShortener
Returns:string

Returns a human-readable identifier for this module.

getChunkFilenameRuntimeModule.removeChunk(chunk): void
Source Code: lib/Module.js#L545
Stability: 0Deprecated
Attributes
chunk:Chunk

Removes the provided chunk from the module.

getChunkFilenameRuntimeModule.removeDependency(dependency): void
Source Code: lib/DependenciesBlock.js#L70
Attributes
dependency:Dependency

Removes dependency.

getChunkFilenameRuntimeModule.serialize(__namedParameters): void
Source Code: lib/DependenciesBlock.js#L105
Attributes

Serializes this instance into the provided serializer context.

getChunkFilenameRuntimeModule.shouldIsolate(): boolean
Source Code: lib/RuntimeModule.js#L232
Returns:boolean

Returns true, if the runtime module should get it's own scope.

getChunkFilenameRuntimeModule.size(type?): number
Source Code: lib/Module.js#L1122
Attributes
type:string
Returns:number

Returns the estimated size for the requested source type.

getChunkFilenameRuntimeModule.source(dependencyTemplates, runtimeTemplate, type?): Source
Source Code: lib/Module.js#L1085
Stability: 0Deprecated: Use codeGeneration() instead
Attributes
dependencyTemplates:DependencyTemplates
runtimeTemplate:RuntimeTemplate
type:string
Returns:Source

Returns generated source.

getChunkFilenameRuntimeModule.updateCacheModule(module): void
Source Code: lib/Module.js#L1215
Attributes
module:Module

Assuming this module is in the cache. Update the (cached) module with the fresh module from the factory. Usually updates internal references and properties.

getChunkFilenameRuntimeModule.updateHash(hash, context): void
Source Code: lib/DependenciesBlock.js#L92
Attributes

Updates the hash with the data contributed by this instance.

GetChunkFilenameRuntimeModule.getSourceBasicTypes(module): ReadonlySet<string>
Stability: 0Deprecated: In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.
Attributes
module:Module
Returns:ReadonlySet<string>

Gets source basic types.