These types are not exported by webpack, but they are available to TypeScript consumers.
Attributes
info:
<AssetInfo>info about the asset
name:
<string>the filename of the asset
source:
<Source>source of the asset
sourceType{"asset-url"|"css-url"}
Checks whether this object is sorted.
Attributes
Options object for data url generation.
encoding{false|"base64"} Asset encoding (defaults to base64).mimetype<string>Asset mimetype (getting from file extension by default).
Generator options for asset/inline modules.
Attributes
binary:
<boolean>Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
dataUrl:
<AssetGeneratorDataUrlOptions>
|
<object>The options for data url generator.
Options object for DataUrl condition.
Attributes
maxSize:
<number>Maximum size of asset that should be inline as modules. Default: 8kb.
Parser options for asset modules.
Attributes
dataUrlCondition:
<AssetParserDataUrlOptions>
|
<object>The condition for inlining the asset as DataUrl.
Generator options for asset/resource modules.
Attributes
binary:
<boolean>Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
emit:
<boolean>Emit 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
info:
<AssetInfo>path:
<string>Attributes
chunkhash:
<string>
|
<string[]>the value(s) of the chunk hash used for this asset
contenthash:
<string>
|
<string[]>the value(s) of the content hash used for this asset
development:
<boolean>true, when asset is only used for development and doesn't count towards user-facing assets
fullhash:
<string>
|
<string[]>the value(s) of the full hash used for this asset
hotModuleReplacement:
<boolean>true, when asset ships data for updating an existing application (HMR)
immutable:
<boolean>true, if the asset can be long term cached forever (contains a hash)
javascriptModule:
<boolean>true, when asset is javascript and an ESM
manifest:
<boolean>true, when file is a manifest
minimized:
<boolean>whether the asset is minimized
modulehash:
<string>
|
<string[]>the value(s) of the module hash used for this asset
related:
{Record< string, string|string[]|null >} object of pointers to other assets, keyed by type of relation (only points from parent to child)
size:
<number>size in bytes, only set after asset has been emitted
sourceFilename:
<string>when asset was created from a source file (potentially transformed), the original filename relative to compilation context
Type:
{KnownAssetInfo|Record< string, any >}