Skip to content

entryFileNames

  • Type: optional entryFileNames: string | (chunkInfo) => string

The pattern to use for chunks created from entry points, or a function that is called per entry chunk to return such a pattern.

Patterns support the following placeholders:

  • [format]: The rendering format defined in the output options, e.g. es or cjs.
  • [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.
  • [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 option.

See also output.assetFileNames, output.chunkFileNames.

Default

ts
'[name].js'

Released under the MIT License.