-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
HMR not working on Vite + Electron #177
Comments
Hi @danikaze, thank you for reporting this issue. you need probably to add the locales folder to the watcher here Can you make a small repo that reproduces this issue? |
Hi @felixmosh , thanks for your quick response. Probably not the minimum repo to reproduce this... but it's usable and easy to reproduce here: Just running the app (npm run dev) and clicking in the yellowish button to render the |
OK, so I've tested it... Vite of the renderer not watching I've managed to "solve" it by moving locales to Or by changing and... fixing a bug in Screen.Recording.2024-08-22.at.18.03.07.mov |
Thanks @felixmosh ! But uhm, I didn't manage to make it work... I can see in the video that the .json files are still in the original So, I did the same AND updated In any case, my idea was to once I get this working, do not copy the files into the packed But for now, I'd like to at least achieved what you did :P Would you mind, if you still have that repo on your local, to have a commit with those changes and push? or show me a patch so I can apply it here? |
I've made a PR to your repo |
Yeah... still not working for me even with the same changes... (Windows) wait for other tests... BUT Thanks a lot! |
Check paths... |
Even if the same code works in Mac? |
Check that the paths are constructed correctly, maybe there is some issue with it |
Describe the bug
I guess this is more of a question than a bug... but I'm trying to get HMR on i18next on a project based on
@quick-start/electron
.It doesn't use vite directly, but
electron-vvite
. Still, I think I configured it properly based on the vite example from the repo...Loading the page, I get the
[I18NextHMR] Client HMR has started
message meaning client is waiting for updates properly.But in the server side, there's no trigger for changes.
Trying to investigate, I edited the
lib/vite/plugin.js
and added some old-fashioned console logs in both of the functions:which looks ok as it prints when starting the dev build...
and
which doesn't log anything...
So what I understand from this is that Vite is not notifying the plugin about the file having changed? therefore nothing sent through the server websocket...
Is there anything extra needed to "watch" the locales .json for changes?
please complete the following information:
The text was updated successfully, but these errors were encountered: