Hydration fail to retrieve hoisted el
in HMR
#5405
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: hmr
scope: ssr
Version
3.2.30
Reproduction link
stackblitz.com
Steps to reproduce
npm run dev
in StackblitzWhat is expected?
No error, and the HMR works
What is actually happening?
Error in console, and HMR does not work.
This has originally reported in Nuxt nuxt/nuxt#11956
After some investigation, we managed to reproduce that in plain Vite (see the repro).
The error will disappear by changing one of the following conditions:
createApp
instead ofcreateSSRApp
to do a client renderI guess the root cause might be during the hydration. The
el
of text nodes aren't retrieved correctly to the vnode, casuing thevnode.el
getnull
and HMR failed to update the DOM.The text was updated successfully, but these errors were encountered: