Skip to content

Documentation of build-manifest is Confusing #19575

Description

@youuss

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

On the build-manifest part deal with the manifest.json file.

When this option is set to true, the build process generates a manifest file at the default location (.vite/manifest.json), which contains a mapping of unhashed asset filenames to their hashed versions for use by server frameworks. However, when the option is set to a string, that string is not only used as the manifest file name but also changes the entire output file path. In this case, the default .vite directory and its contents will not be generated; instead, the files are output to a new path defined by the provided string. This behavior may confuse users who expect only the manifest file name to change.

Your Suggestion for Changes

I suggest updating the documentation as follows:

When set to true, the build will also generate a .vite/manifest.json file that contains a mapping of non-hashed asset filenames to their hashed versions, which can then be used by a server framework to render the correct asset links. When the value is a string, it will be used as the manifest file name.

::: tip Note: When this option is set to a string, that string will be used as the manifest file name, and the default .vite directory along with its contents will not be generated. Instead, the files will be output to a new path as defined by the string. :::

This clarification will help ensure users fully understand the impact of using a string value for this configuration option.

Reproduction

No response

Steps to reproduce

set manifest of true

Image

set manifest of manifest.json

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions