-
Notifications
You must be signed in to change notification settings - Fork 153
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
No HMR in weird symlink scenario #284
Comments
Very strange! Thanks for the repo - it helped me replicate the issue. Regarding the I also found that the symlink needs to be in the root directory of the project, but the file name doesn't seem to matter (e.g. a We're using https://github.com/ElMassimo/vite-plugin-full-reload behind the scenes for the reload feature. After following the rabbit hole, the paths ultimately get passed to the I think the fix is to filter out non-existing refresh paths before passing them to |
Closing now that a fix PR (#285) is open. |
Vite Plugin Version
1.0.1
Laravel Version
10.44.0
Node Version
21.6.2
NPM Version
10.2.4
Operating System
Linux
OS Version
Ubuntu 20.04.6
Web browser and version
Safari Version 17.3 (19617.2.4.11.8)
Running in Sail?
No
Description
Certain symlinks break hmr file changes from being recognised. So far, I have only noticed
pint.json
but I presume it's other similar type config that Vite might recognise?The weird thing here is that if I explicitly pass to the
refresh
option therefreshPaths
array instead oftrue
, but I remove"resources/lang/**"
from that list, it works again.Another possibly relevant point is that if I start
npm run dev
with a valid configuration/set of file then change them while it's running, the hmr file changes are still detected, so must be something at initial run.FYI, the reason we had a
pint.json
symlink in the first place was to share Pint configuration across multiple projects.Steps To Reproduce
https://github.com/legecha/vite-plugin-bug-report
See commits for examples of working and non-working states.
The text was updated successfully, but these errors were encountered: