You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hot reloading doesn't work, the application is always fully reloading even on minor changes.
Reproduction setup
Bundler: Webpack
The setup is a bit complex, we want to develop Preact components over a pre-existing backend. The Preact component is wrapped into a custom component using preact-custom-element, then injected into the backend as plain HTML.
After investigating, we found the error by patching
Analysis: this is an unsafe deep access. Patching to if (!vnode.__c || !vnode.__c.__P) return; keeps the error from throwing, and allow the hot reload process to continue.
I have not fully understood the full cause of why vnode.__c is null, however by patching this I managed to get hot reloading working.
Description
Hot reloading doesn't work, the application is always fully reloading even on minor changes.
Reproduction setup
Bundler: Webpack
The setup is a bit complex, we want to develop Preact components over a pre-existing backend. The Preact component is wrapped into a custom component using
preact-custom-element
, then injected into the backend as plain HTML.After investigating, we found the error by patching
prefresh/packages/vite/src/index.js
Line 94 in a6c9be9
The faulty line:
prefresh/packages/core/src/index.js
Line 57 in a6c9be9
Analysis: this is an unsafe deep access. Patching to
if (!vnode.__c || !vnode.__c.__P) return;
keeps the error from throwing, and allow the hot reload process to continue.I have not fully understood the full cause of why
vnode.__c
is null, however by patching this I managed to get hot reloading working.A PR with this patch is created #514
The text was updated successfully, but these errors were encountered: