On this page

These types are not exported by webpack, but they are available to TypeScript consumers.

Attributes
info about the asset
the filename of the asset
source:<Source>
source of the asset

  • sourceType {"css-url"}

Attributes
compilation:<Compilation>
content:
{Buffer}
outputPath:<string>
source:<Source>
targetPath:<string>

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.
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
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 an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
filename:<string> | <object>
Specifies the filename template of output files on disk. You must  not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
outputPath:<string> | <object>
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> | <object>
The 'publicPath' specifies the public URL address of the output files when referenced in a browser.

Attributes

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 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>}