---
url: /reference/OutputOptions.assetFileNames.md
---
# assetFileNames

* **Type**: `string` | ((`chunkInfo`) => `string`)
* **Optional**

The pattern to use for naming custom emitted assets to include in the build output, or a function that is called per asset with [`PreRenderedAsset`](Interface.PreRenderedAsset.md) to return such a pattern.

Patterns support the following placeholders:

* `[extname]`: The file extension of the asset including a leading dot, e.g. `.css`.
* `[ext]`: The file extension without a leading dot, e.g. css.
* `[hash]`: A hash based on the content of the asset. You can also set a specific hash length via e.g. `[hash:10]`. By default, it will create a base-64 hash. If you need a reduced character set, see [`output.hashCharacters`](./OutputOptions.hashCharacters).
* `[name]`: The file name of the asset excluding any extension.

Forward slashes (`/`) can be used to place files in sub-directories.

See also [`output.chunkFileNames`](./OutputOptions.chunkFileNames), [`output.entryFileNames`](./OutputOptions.entryFileNames).

## Default

```ts
'assets/[name]-[hash][extname]'
```
