Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of build-manifest is Confusing #19575

Closed
1 of 4 tasks
youuss opened this issue Mar 5, 2025 · 0 comments · Fixed by #19582
Closed
1 of 4 tasks

Documentation of build-manifest is Confusing #19575

youuss opened this issue Mar 5, 2025 · 0 comments · Fixed by #19582
Labels
documentation Improvements or additions to documentation

Comments

@youuss
Copy link

youuss commented Mar 5, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant