new ModuleChunkLoadingRuntimeModule(runtimeRequirements): voidruntimeRequirements{ReadonlySet} - Returns:
<ModuleChunkLoadingRuntimeModule>
Creates an instance of ModuleChunkLoadingRuntimeModule.
<AsyncDependenciesBlock[]><Chunk><ChunkGraph><Dependency[]><Compilation><number><Dependency[]><boolean><any><string><boolean><any><string><boolean><any><string><string><boolean><string>
|
<object[]><boolean><Dependency[]><string><ResolveOptions><number><string><any><boolean><boolean><any><number><number><number><number>addBlock(block): void<AsyncDependenciesBlock>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): voidfileDependencies{LazySet} contextDependencies{LazySet} missingDependencies{LazySet} buildDependencies{LazySet} - Returns: {void}
Adds the provided file dependencies to the module.
addChunk(chunk): boolean<Chunk><boolean>Adds the provided chunk to the module.
addCodeGenerationDependency(codeGenerationDependency): void<Dependency>Adds code generation dependency.
addDependency(dependency): void<Dependency>Adds the provided dependency to the dependencies block.
addError(error): void<Error>Adds the provided error to the module.
addPresentationalDependency(presentationalDependency): void<Dependency>Adds presentational dependency.
addWarning(warning): void<Error>Adds the provided warning to the module.
attach(compilation, chunk, chunkGraph?): voidProcesses the provided compilation.
build(options, compilation, resolver, fs, callback): voidoptions{WebpackOptionsNormalizedWithDefaults}compilation<Compilation>resolver{ResolverWithOptions}fs<InputFileSystem>callback<object>- Returns: {void}
Builds the module using the provided compilation context.
chunkCondition(chunk, compilation): boolean<Chunk><Compilation><boolean>Returns true if the module can be placed in the chunk.
cleanupForCache(): voidAssuming this module is in the cache. Remove internal references to allow freeing some memory.
clearDependenciesAndBlocks(): voidClear dependencies and blocks.
clearWarningsAndErrors(): voidremoves all warnings and errors
codeGeneration(context): voidcontext{CodeGenerationContext}- Returns: {CodeGenerationResult}
Generates code and runtime requirements for this module.
deserialize(__namedParameters): void<ObjectDeserializerContext>Restores this instance from the provided deserializer context.
generate(): string | nullGenerates runtime code for this runtime module.
getChunks(): Chunk[]<Chunk[]>getConcatenationBailoutReason(context): voidcontext{ConcatenationBailoutReasonContext}- Returns:
<string>|<undefined>
Returns the reason this module cannot be concatenated, when one exists.
getErrors(): Error[] | undefined<Error[]>
|
<undefined>Returns list of errors if any.
getExportsType(moduleGraph, strict?): ExportsType<ModuleGraph><boolean>Returns export type.
getGeneratedCode(): string | nullGets generated code.
getNumberOfChunks(): number<number>getNumberOfErrors(): number<number>Gets number of errors.
getNumberOfWarnings(): number<number>Gets number of warnings.
getRootBlock(): DependenciesBlockgetSideEffectsConnectionState(moduleGraph): ConnectionState<ModuleGraph>Gets side effects connection state.
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>Returns the source types this module can generate.
getUnsafeCacheData(): UnsafeCacheDataModule should be unsafe cached. Get data that's needed for that. This data will be passed to restoreFromUnsafeCache later.
getWarnings(): Error[] | undefined<Error[]>
|
<undefined>Returns list of warnings if any.
hasChunkCondition(): boolean<boolean>hasReasonForChunk(chunk, moduleGraph, chunkGraph): boolean<boolean>Checks whether this module contains the chunk.
hasReasons(moduleGraph, runtime): boolean<ModuleGraph><boolean>Checks whether this module contains the module graph.
identifier(): string<string>Returns the unique identifier used to reference this module.
invalidateBuild(): voidInvalidates the cached state associated with this value.
isAccessibleInChunk(chunkGraph, chunk, ignoreChunk?): boolean<boolean>Checks whether this module is accessible in chunk.
isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk?): boolean<boolean>Checks whether this module is accessible in chunk group.
isEntryModule(): boolean<boolean>isInChunk(chunk): boolean<Chunk><boolean>Checks whether this module is in the provided chunk.
isOptional(moduleGraph): boolean<ModuleGraph><boolean>Checks whether this module is optional.
isProvided(exportName): boolean | null<string>Checks whether this module provides the specified export.
libIdent(options): voidGets the library identifier.
nameForCondition(): string | nullReturns the path used when matching this module against rule conditions.
needBuild(context, callback): voidcontext{NeedBuildContext}callback<object>- Returns: {void}
Checks whether the module needs to be rebuilt for the current build state.
needRebuild(fileTimestamps, contextTimestamps): voidfileTimestamps{Map<string, number|null>}contextTimestamps{Map<string, number|null>}- Returns:
<boolean>
Checks whether it needs rebuild.
originalSource(): Source | nullGets the original source.
readableIdentifier(requestShortener): voidrequestShortener{RequestShortener}- Returns:
<string>
Returns a human-readable identifier for this module.
removeChunk(chunk): void<Chunk>Removes the provided chunk from the module.
removeDependency(dependency): void<Dependency>Removes dependency.
serialize(__namedParameters): void<ObjectSerializerContext>Serializes this instance into the provided serializer context.
shouldIsolate(): boolean<boolean>Returns true, if the runtime module should get it's own scope.
size
size(type?): number<string><number>Returns the estimated size for the requested source type.
source(dependencyTemplates, runtimeTemplate, type?): voiddependencyTemplates{DependencyTemplates}runtimeTemplate{RuntimeTemplate}type<string>- Returns:
<Source>
Returns generated source.
updateCacheModule(module): void<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.
updateHash(hash, context): voidhash{Hash}context{UpdateHashContextDependency}- Returns: {void}
Updates the hash with the data contributed by this instance.
<Compilation>Returns hooks.
<Module>Gets source basic types.