On this page

class AssetGenerator extends Generator
Source Code: lib/asset/AssetGenerator.js#L219
new AssetGenerator(): AssetGenerator
Source Code: lib/asset/AssetGenerator.js#L241
Type:AssetGeneratorDataUrlOptions | ((source: string | Buffer<ArrayBufferLike>, context: { filename: string; module: Module }) => string)
Source Code: lib/asset/AssetGenerator.js#L249
Type:boolean
Source Code: lib/asset/AssetGenerator.js#L243
Source Code: lib/asset/AssetGenerator.js#L247
Source Code: lib/asset/AssetGenerator.js#L245
assetGenerator.generate(module, __namedParameters): Source | null
Source Code: lib/Generator.js#L111
Attributes
__namedParameters:GenerateContext
Returns:Source | null

Generates generated code for this runtime module.

assetGenerator.generateDataUri(module): string
Source Code: lib/asset/AssetGenerator.js#L518
Attributes
Returns:string

Generates data uri.

assetGenerator.generateError(error, module, generateContext): Source | null
Source Code: lib/asset/AssetGenerator.js#L705
Attributes
error:Error
generateContext:GenerateContext
Returns:Source | null

Generates fallback output for the provided error condition.

assetGenerator.getConcatenationBailoutReason(module, context): string | undefined
Source Code: lib/Generator.js#L126
Attributes

Returns the reason this module cannot be concatenated, when one exists.

assetGenerator.getMimeType(module): string
Source Code: lib/asset/AssetGenerator.js#L465
Attributes
Returns:string

Returns mime type.

assetGenerator.getSize(module, type?): number
Source Code: lib/Generator.js#L97
Attributes
type:string
Returns:number

Returns the estimated size for the requested source type.

assetGenerator.getTypes(module): ReadonlySet<string>
Source Code: lib/Generator.js#L76
Attributes
Returns:ReadonlySet<string>

Returns the source types available for this module.

assetGenerator.getTypesDependOnIncomingConnections(): boolean
Source Code: lib/Generator.js#L85
Returns:boolean
assetGenerator.updateHash(hash, __namedParameters): void
Source Code: lib/Generator.js#L135
Attributes
hash:Hash
__namedParameters:UpdateHashContextGenerator

Updates the hash with the data contributed by this instance.

AssetGenerator.byType(map): ByTypeGenerator
Source Code: lib/Generator.js#L65
Attributes
map:{ [index: string]: Generator | undefined }

Returns generator by type.