These types are not exported by webpack, but they are available to TypeScript consumers.
Attributes
Options object for data url generation.
Attributes
encoding:
false | "base64"Asset encoding (defaults to base64).
mimetype:
stringAsset mimetype (getting from file extension by default).
Generator options for asset/inline modules.
Attributes
binary:
booleanWhether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
dataUrl:
AssetGeneratorDataUrlOptions | ((source: string | Buffer<ArrayBufferLike>, context: { filename: string; module: Module }) => string)The options for data url generator.
Options object for DataUrl condition.
Attributes
maxSize:
numberMaximum size of asset that should be inline as modules. Default: 8kb.
Parser options for asset modules.
Attributes
dataUrlCondition:
AssetParserDataUrlOptions | ((source: string | Buffer<ArrayBufferLike>, context: { filename: string; module: Module }) => boolean)The condition for inlining the asset as DataUrl.
Generator options for asset/resource modules.
Attributes
binary:
booleanWhether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
emit:
booleanEmit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
filename:
string | TemplatePathFn<PathDataModule>The filename of asset modules as relative path inside the 'output.path' directory.
outputPath:
string | TemplatePathFn<PathDataModule>Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
publicPath:
string | TemplatePathFn<PathData>The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
Attributes
Attributes
development:
booleantrue, when asset is only used for development and doesn't count towards user-facing assets
hotModuleReplacement:
booleantrue, when asset ships data for updating an existing application (HMR)
immutable:
booleantrue, if the asset can be long term cached forever (contains a hash)
javascriptModule:
booleantrue, when asset is javascript and an ESM
manifest:
booleantrue, when file is a manifest
minimized:
booleanwhether the asset is minimized
object of pointers to other assets, keyed by type of relation (only points from parent to child)
size:
numbersize in bytes, only set after asset has been emitted
sourceFilename:
stringwhen asset was created from a source file (potentially transformed), the original filename relative to compilation context
Type:
string | RegExp | ((name: string, asset: StatsAsset) => boolean)Type:
KnownAssetInfo & Record<string, any>