`manifest.json` file collision
See original GitHub issueDescribe the bug
If you set build.manifest: true and have a file named manifest.json in the publicDir then the manifest.json file will be overwritten.
As a framework, we can set the name of build.manifest to something else, but it’s impossible to know in advance all the possible file names our users may have.
Originally reported in https://github.com/sveltejs/kit/issues/5803
Reproduction
git clone git@github.com:sveltejs/kit.git
cd kit/sites/kit.svelte.dev
git reset --hard 0801e8e942534d3f6c614523f0ee4fe10b602b26
pnpm install
pnpm run dev
Visit http://localhost:5173/manifest.json in the browser and see the Vite manifest rather than the file in static/manifest.json
System Info
Vite 3.0.5
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (12 by maintainers)
Top Results From Across the Web
manifest.json - Mozilla - MDN Web Docs
Chrome Edge
action Full support. Chrome88. footnote. Toggle history Full support. Edge88...
action.browser_style Full support. Chrome88. Toggle history Full support. Edge88...
action.default_area Full support. Chrome88. Toggle...
Read more >How can I use php to populate a manifest.json file?
I've tried switching the name of my manifest to manifest.php and used header('Content-Type: application/json') within it. Inside my index file ...
Read more >The Manifest - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >SMAPI can't see manifest.json even though it is clearly there.
I'm having a problem where SMAPI can't load mods in a folder "because it contains files, but none of them are manifest.json.
Read more >Locating your inventory list - Amazon Simple Storage Service
It is added to prevent collisions when multiple inventory reports from different ... Example Inventory manifest in a manifest.json file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Making that exception when it contains a slash might make it harder for tooling to infer the correct location.
I prefer the simpler proposal of using
${outDir}/.vite/manifest.json, which would make it easier for the ecosystem to upgrade:${outDir}/.vite/manifest.json:vite@4), use itvite@3), look for the manifest in the old location,${outDir}/manifest.jsonI was thinking of only one top-level hidden folder for Vite artifacts:
And maybe others in the future. This is independent of the way users do their dist setup.