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

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

The pattern to use for chunks created from entry points, or a function that is called per entry chunk with [`PreRenderedChunk`](Interface.PreRenderedChunk.md) to return such a pattern.

Patterns support the following placeholders:

* `[format]`: The rendering format defined in the output options. The value is any of [`InternalModuleFormat`](TypeAlias.InternalModuleFormat.md).
* `[hash]`: A hash based only on the content of the final generated chunk, including transformations in `renderChunk` and any referenced file hashes. 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 (without extension) of the entry point, unless the object form of input was used to define a different name.

Forward slashes (`/`) can be used to place files in sub-directories. This pattern will also be used for every file when setting the [`output.preserveModules`](./OutputOptions.preserveModules) option.

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

## Default

```ts
'[name].js'
```
