class AssetGenerator extends Generator
new AssetGenerator(): AssetGenerator
Returns:
AssetGeneratorType:
AssetGeneratorDataUrlOptions | ((source: string | Buffer<ArrayBufferLike>, context: { filename: string; module: Module }) => string)Type:
booleanType:
string | TemplatePathFn<PathDataModule>Type:
string | TemplatePathFn<PathDataModule>Type:
string | TemplatePathFn<PathData>assetGenerator.generate(module, __namedParameters): Source | null
Attributes
Generates generated code for this runtime module.
assetGenerator.generateDataUri(module): string
Attributes
module:
NormalModuleReturns:
stringGenerates data uri.
assetGenerator.generateError(error, module, generateContext): Source | null
Attributes
Generates fallback output for the provided error condition.
assetGenerator.getConcatenationBailoutReason(module, context): string | undefined
Attributes
Returns the reason this module cannot be concatenated, when one exists.
assetGenerator.getMimeType(module): string
Attributes
module:
NormalModuleReturns:
stringReturns mime type.
assetGenerator.getSize(module, type?): number
Attributes
Returns the estimated size for the requested source type.
assetGenerator.getTypes(module): ReadonlySet<string>
Attributes
module:
NormalModuleReturns:
ReadonlySet<string>Returns the source types available for this module.
assetGenerator.getTypesDependOnIncomingConnections(): boolean
Returns:
booleanassetGenerator.updateHash(hash, __namedParameters): void
Attributes
hash:
Hash__namedParameters:
UpdateHashContextGeneratorUpdates the hash with the data contributed by this instance.
AssetGenerator.byType(map): ByTypeGenerator
Attributes
Returns:
ByTypeGeneratorReturns generator by type.