Possibility to disable wasp reload on UI file changes?
Hey my dudes, is it possible to calm down this guy on the screenshot from reloading everything every time UI files change? The issue is that I get everything hot reloaded thanks to Vite, and the app reloads itself few seconds afterwards again and so it happens on every change
π much love to y'all
15 Replies
Hi @IamIconLiving π,
No way to calm down the guy yet, unfortunately π
Btw, why is this causing you issues. Is it because of the excessive output or because the reloads slow down your workflow? Just asking so we know which part to improve.
Thanks for the feedback!
The same question goes out to @Gwaggli, @kaur and @mindreaderlupoDO. I see you guys liked @IamIconLiving π's post, so... Why is constant reloading a problem for you? π
Thanks for getting back to me! This is just an annoying thing to see entire app reloading after a second or so once a change was made. Like I can see already a change reflected in my UI, thanks to hot reload, but then entire window gets reloaded. I am not even sure if this affects local state or not (havenβt went deep enough), like if the entire app reload does or does not reset local state, but even if it does not - it just visually blinks and reloads entire window is annoying π₯²
Exact same as @IamIconLiving π described. For me the most annoying part is either when i play around with some styling and make multiple changes very quickly to try it out. So it applies each change directly but soon afterwards it start reloading page over and over again. Other annoyance is when having non url reflected state changes being reset. Like form values, open modals or accordions.
Both just minor inconveniences but would be very nice to get rid of them.
Ah, so local state does gets reset. Yeah it would be way more convenient to not do it. Maybe an optional flag to cli, ability to give a path to ignore sdk rebuild maybe π€
When I change just a div className and I hit Ctrl+s, alt-tab to switch from VSCode to the browser, than I see the change for approx. Half a second and then everything reloads which takes another second. It disrupts the workflow and is annoying. Maybe it's especially annoying because of my 1-screen setup
I'm working with input based data, and haven't implemented local storage based saving yet. Currently the reloads mean that the data is wiped each time a reload happens, which probably won't be an issue in prod, but is annoying to deal with in a dev environment.
Agree 100% with this also. App should not be rebuilding after every UI change.
Wohooo @Gwain, you just became a Waspeteer level 3!
That shouldn't happen for Vite + React apps. Usually, Vite HMR works well and keeps the state. This might a new bug that we maybe introduced with 0.12 π€¨
People in the thread, do you have some repo to share so we can try it ourselves? @here
@miho I can reproduce it with a clean
wasp new
with the basic template.
If you change the text on the welcome page it is refreshed directly but the app starts rebuilding and soon after that the page makes a full reload. To experience kind of the pain, make multiple changes quickly (cmd+S after every character for example) or add an input field, make a change, type something into the field quickly and then see it lose its content after page refresh.
Also the whole app rebuilds when editing a test file. (was also able to reproduce this with the basic example and a single test file)reproduced it with open saas template
let me know if you can't repro, I will upload it to a github repo, maybe that will help
Thank you! I'll try it out and see what is happening π
Thanks for all the feedback, fellas. Much appreciated!
As Miho said, we probably have a file watching error. We even have an issue for it but haven't gotten to it yet π
: https://github.com/wasp-lang/wasp/issues/1844
One of us will investigate and get back to you. @miho You got this or should I check it out?
rockstars as always! thanks
Hi guys, happy to let you know that this has been fixed in the newest version of Wasp. You can get Wasp 0.13.1 with:
There are no breaking changes, let us know if this works.
Thanks again for reporting this! π
Btw, version 0.13.1 comes with another improvement: IDE autocomplete for
wasp
imports now works much better. You won't have to guess import paths anymore!
For this one to work, you'll have to add two lines to your project's tsconfig under compilerOptions
:
Full changelog if you're curious: https://github.com/wasp-lang/wasp/releases/tag/v0.13.1
That's all from me, no more messages π