class webpack.JavascriptGenerator extends GeneratorRepresents the generator runtime component.
new JavascriptGenerator(): JavascriptGeneratorReturns:
JavascriptGeneratorgenerate(module, generateContext): Source | nullAttributes
Generates generated code for this runtime module.
generateError(error, module, generateContext): Source | nullAttributes
Generates fallback output for the provided error condition.
getConcatenationBailoutReason(module, context): string | undefinedAttributes
Returns the reason this module cannot be concatenated, when one exists.
getSize(module, type?): numberAttributes
Returns the estimated size for the requested source type.
getTypes(module): ReadonlySet<string>Attributes
module:
NormalModuleReturns:
ReadonlySet<string>Returns the source types available for this module.
getTypesDependOnIncomingConnections(): booleanReturns:
booleanwhether getTypes() depends on the module's incoming connections
sourceBlock(module, block, templateContext, source, generateContext): voidAttributes
module:
Moduleblock:
DependenciesBlocktemplateContext:
DependencyTemplateContextsource:
ReplaceSourcegenerateContext:
GenerateContextReturns:
voidProcesses the provided module.
sourceDependency(dependency, source, templateContext, generateContext): voidAttributes
dependency:
Dependencysource:
ReplaceSourcetemplateContext:
DependencyTemplateContextgenerateContext:
GenerateContextReturns:
voidProcesses the provided module.
sourceModule(module, initFragments, source, generateContext): voidAttributes
module:
ModuleinitFragments:
InitFragment<GenerateContext>[]source:
ReplaceSourcegenerateContext:
GenerateContextReturns:
voidProcesses the provided module.
updateHash(hash, updateHashContextGenerator): voidAttributes
Updates the hash with the data contributed by this instance.
Attributes
Returns:
ByTypeGeneratorReturns generator by type.