QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.84k stars 1.31k forks source link

[🐞] useVisibleTask modules are not refreshing in 1.6.0 #6634

Closed manucorporat closed 4 months ago

manucorporat commented 4 months ago

Which component is affected?

Qwik Rollup / Vite plugin

Describe the bug

In the latest release 1.6.0, changes to useVisibleTask$ are not refreshing, no HMR. I requires to restart the server.

Reproduction

https://stackblitz.com/edit/qwik-starter-kr1cpt?file=src%2Froutes%2Findex.tsx,package.json

Steps to reproduce

Change the body of useVisibleTask, changes are not reflected on HMR, a full server restart is needed.

System Info

Command does not work.

Additional Information

In development the same issue also causes:

Failed to fetch dynamically imported module: 

and

Missing Qwik City Env Data

which might be related to the latest issues reported in https://github.com/QwikDev/qwik/issues/6237

frankroc2022 commented 4 months ago

I tried very old qwik versions and also older vite versions. JS changes are not visible anymore, I think it's a general browser problem. (HTML and CSS changes are visible). The following problems I don't have in a fresh 1.6.0. install (and even can't reproduce them, tried useVisibleTask, UseOnDocument and get data from another server): Failed to fetch dynamically imported module: Missing Qwik City Env Data

DustinJSilk commented 4 months ago

Downgrading to 1.5.7 works for now.

devcaeg commented 4 months ago

The error is also caused by "useOnDocument".

frankroc2022 commented 4 months ago

I started my real project with qwik 0.11.0. now it's 1.6.0.

Since I readded the row in root.tsx and restarted dev server useOnDocument is working again. (I deleted the row a long time ago because it made problems while developing with vite and I mean chrome. I also changed in root.tsx body lang=de" back to "en", but I don't think that matters. Now I have only the problem with my get data from another server. But in fresh 1.6.0 it works.

I get the data from the other server with useResource$(async ({ cleanup })

Edit: UseOn is also still a problem in the fresh install at components but not in root.tsx. I think all use functions in components make problems.

Edit2: Downgrade the fresh install to 1.5.7 and also useOnDocument works in components again. But not in my real project (now also 1.5.7 and same other versions like in fresh install of 1.6.0.) Since downgrade the real project to 1.5.7 the useOnDocument in components works agian but not the useResource.

wmertens commented 4 months ago

I think I fixed it in #6629

manucorporat commented 4 months ago

Happy to give it a try, do we have a dev release?

wmertens commented 4 months ago

@manucorporat yes check out https://github.com/QwikDev/qwik/pull/6629#issuecomment-2201091318

wmertens commented 4 months ago

but this problem still exists https://github.com/QwikDev/qwik/issues/6237#issuecomment-2205966207

shairez commented 4 months ago

Fixed in #6629

Thanks @wmertens !