Skip to content

Interface: ResolveFileUrlArgs ​

Argument passed to the resolveFileUrl hook.

Properties ​

chunkId ​

  • Type: string

The preliminary filename of the chunk containing the reference with hash placeholders. Similar to chunk.fileName.


fileName ​

  • Type: string

The filename of the emitted file, relative to the output directory.


format ​

The rendered output format.


moduleId ​

  • Type: string

The id of the original module this file was referenced by using the import.meta.ROLLDOWN_FILE_URL_* reference.


referenceId ​

  • Type: string

The reference id of this file.


relativePath ​

  • Type: string

The path of the emitted file, relative to the chunk the file is referenced from.

This path will contain no leading ./, but may contain a leading ../.


urlId? ​

  • Type: string
  • Optional
  • Experimental

The urlId of an import.meta.ROLLDOWN_FILE_URL_<referenceId>_<urlId> reference, or undefined when the reference has no urlId.

This is a rolldown-specific extension: the Rollup-compatible import.meta.ROLLUP_FILE_URL_<referenceId> form never carries a urlId.

This API may change in minor versions.

Was this page helpful?