You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Vite 5.0.6, a map of the public files was implemented for performance (#15195).
The map is supposed to be updated when files are added or deleted, but this doesn't happen on windows.
NOTE: due to the nature of the bug, this can only be reproduced in windows (hence my including of a bare-bones repo instead of using stackblitz).
clone repo
run npm i
run npm run dev
The index has an img tag with /vite.svg as the src. Initially, the image will be broken, as the file in /public is named vite2.svg. When renaming the file to vite.svg and reloading the page, we would expect the image to show, but it doesn't. The same thing happens if the file isn't there at all, and is moved into the public dir after starting vite.
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.
Describe the bug
In Vite 5.0.6, a map of the public files was implemented for performance (#15195).
The map is supposed to be updated when files are added or deleted, but this doesn't happen on windows.
I'll be submitting a PR to fix this shortly.
Reproduction
https://github.com/jmlee2k/vite-publicfile-bug-reproduction
Steps to reproduce
NOTE: due to the nature of the bug, this can only be reproduced in windows (hence my including of a bare-bones repo instead of using stackblitz).
npm i
npm run dev
The index has an img tag with
/vite.svg
as the src. Initially, the image will be broken, as the file in/public
is namedvite2.svg
. When renaming the file tovite.svg
and reloading the page, we would expect the image to show, but it doesn't. The same thing happens if the file isn't there at all, and is moved into the public dir after starting vite.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: