Real time change in UI
Hey guys, so when I make any changes in the code. I have to do wasp start everytime. And it's taking lot of time for me. When I change anything in code I want it to be reflected real-time in the website. Is there anyway to do this???
12 Replies
Hi @Mrr. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, Wasp does support real-time changes in the UI without having to restart the application every time you make changes. This feature is known as hot reloading. When you run
wasp start
, it launches the Wasp app in development mode. It automatically opens a browser tab with your application running and watches for any changes to .wasp or files in src/
to automatically reflect in the browser.
However, there have been some issues reported by the community where the entire app reloads after a UI change, which can disrupt the workflow. The Wasp team is aware of this issue and is working on a fix. You can follow the progress on this Github issue (https://github.com/wasp-lang/wasp/issues/1844).
If you're still having trouble with hot reloading, it might be a good idea to check if there are any errors in your code that could be causing the hot reloading to fail. If the problem persists, I recommend reaching out to the Wasp community on their Discord server (https://discord.com/channels/686873244791210014/1223304305206099969) for further assistance.
Sources:
- Wasp CLI Reference (https://wasp-lang.dev/docs/general/cli#project-commands)
- Discord support thread: Possibility to disable wasp reload on UI file changes? (https://discord.com/channels/686873244791210014/1223304305206099969)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Mrr, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Ok
Wasp does hot reload, but sometimes changes need to rebuild app. It sounds like my recent issue with WSL 2, my projects didn't have hot reload and I though thye don't have it
I heard it has hot reload but don't know why it's not happening. Like when I make any changes in ui I have to do wasp start every time
@Mrr are you on Windows?
Yes
Hot reloading won't work on WSL if your project is on the Windows file system, instead of the Linux file system. SO it should be on the Linux file system. This is an issue in WSL2, has nothing to do with Wasp actually.I'll refer you to this article for the best set up on Windows: https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl
Thanks @miho but I tried. In first step I got an issue. Mine is windows 10 home. But to follow the above guide I must have pro or enterprise. So there any other way?
@Boris might know the answer to this one 🙏
Sadly, in order to have all the features, you have to have the Windows Pro/Enterprise. Although I suggest Windows 11 Pro, especially since Win 10 support is ending soon
@Mrr might you still be able to ensure your files of your Wasp project are on the Linux file system, and not Windows file system? If I remmeber correctly, that is what messes up the hot reload.
Reddit
From the bashonubuntuonwindows community on Reddit: Is WSL 2 Availa...
Explore this post and more from the bashonubuntuonwindows community