#HMR not working when adding a Route loader in any components

8 messages · Page 1 of 1 (latest)

potent venture
#

Hot module reloading stops working when I use an exported route loader from the page in a component like below:

const data = useHomePageData();
 if (!data.value) return null;

And it starts working when I remove the loader. Any clues as to why? This is happening with the v1.4.5.

"@builder.io/qwik": "^1.4.5",
"@builder.io/qwik-city": "^1.4.5",
potent venture
#

Any clue what could be the fix?

potent venture
#

HMR still works in the CSS files, but not in the component files. Any help would be appreciated. I've been struggling with this since 5-6 hours.

grizzled wyvern
#

Are there any messages? Can you try vite v4 or upgrading to latest vite v5?

potent venture
#

No error messages. Project is on the latest vite -

"vite": "^5.0.12",

Only seeing the following in the terminal:

[vite] hmr update /src/global.css, /src/global.css?direct (x2)
grizzled wyvern
#

Latest vite is 5.1.4. Can you try that, and also with vite@4?

potent venture
grizzled wyvern
#

Ideally you'd now create an issue on the vite repo so it can get fixed in v5. Does it still work in the last v4?