Skip to content

Interface: EmittedAsset

Either a name or a fileName can be supplied. If a fileName is provided, it will be used unmodified as the name of the generated file, throwing an error if this causes a conflict. Otherwise, if a name is supplied, this will be used as substitution for [name] in the corresponding output.assetFileNames pattern, possibly adding a unique number to the end of the file name to avoid conflicts. If neither a name nor fileName is supplied, a default name will be used.

Properties

fileName?

  • Type: string
  • Optional

name?

  • Type: string
  • Optional

originalFileName?

  • Type: string
  • Optional

An absolute path to the original file if this asset corresponds to a file on disk.

This property will be passed on to subsequent plugin hooks that receive a PreRenderedAsset or an OutputAsset like generateBundle. In watch mode, Rolldown will also automatically watch this file for changes and trigger a rebuild if it changes. Therefore, it is not necessary to call this.addWatchFile for this file.


source

  • Type: string | Uint8Array<ArrayBufferLike>

type

  • Type: "asset"