class webpack.AssetGenerator extends GeneratorRepresents the generator runtime component.
new AssetGenerator(): AssetGeneratorReturns:
AssetGeneratorAttributes
dataUrlOptions:
AssetGeneratorDataUrlOptions | ((source: string | Buffer<ArrayBufferLike>, context: { filename: string; module: Module }) => string)emit:
booleanfilename:
string | TemplatePathFn<PathDataModule>outputPath:
string | TemplatePathFn<PathDataModule>publicPath:
string | TemplatePathFn<PathData>generate(module, generateContext): Source | nullAttributes
Generates generated code for this runtime module.
generateDataUri(module): stringAttributes
module:
NormalModuleReturns:
stringGenerates 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:
NormalModuleReturns:
stringReturns mime type.
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.
updateHash(hash, updateHashContextGenerator): voidAttributes
Updates the hash with the data contributed by this instance.
Attributes
Returns:
ByTypeGeneratorReturns generator by type.