class webpack.AssetGenerator extends GeneratorRepresents the generator runtime component.
new AssetGenerator(): AssetGeneratorReturns:
<AssetGenerator>dataUrlOptions{AssetGeneratorDataUrlOptions | ((source: string | Buffer, context: { filename: string; module: Module }) => string)} emit<boolean>filename{string | TemplatePathFn} outputPath{string | TemplatePathFn} publicPath{string | TemplatePathFn}
generate(module, generateContext): Source | nullAttributes
Generates generated code for this runtime module.
generateDataUri(module): stringAttributes
module:
<NormalModule>Returns:
<string>Generates data uri.
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.
getMimeType(module): stringAttributes
module:
<NormalModule>Returns:
<string>Returns mime type.
getSize(module, type?): numberAttributes
Returns the estimated size for the requested source type.
getTypes(module): ReadonlySet<string>Attributes
module:
<NormalModule>Returns:
{ReadonlySet
}
Returns the source types available for this module.
updateHash(hash, updateHashContextGenerator): voidAttributes
Updates the hash with the data contributed by this instance.
map{{ [index: string]: Generator | undefined }}- Returns:
<ByTypeGenerator>
Returns generator by type.