diff --git a/packages/core/src/index.js b/packages/core/src/index.js index c4b48b7b..6c80ef4e 100644 --- a/packages/core/src/index.js +++ b/packages/core/src/index.js @@ -59,7 +59,6 @@ function replaceComponent(OldType, NewType, resetHookState) { vnode.type = NewType; if (vnode[VNODE_COMPONENT]) { - let oldHooks = vnode[VNODE_COMPONENT][COMPONENT_HOOKS]; vnode[VNODE_COMPONENT].constructor = vnode.type; try { @@ -99,9 +98,6 @@ function replaceComponent(OldType, NewType, resetHookState) { vnode[VNODE_COMPONENT].constructor = NewType; } - vnode[VNODE_COMPONENT].__v = vnode; - vnode[VNODE_COMPONENT][COMPONENT_HOOKS] = oldHooks; - if (resetHookState) { if ( vnode[VNODE_COMPONENT][COMPONENT_HOOKS] && diff --git a/packages/vite/src/index.js b/packages/vite/src/index.js index d7164596..ab5cbfba 100644 --- a/packages/vite/src/index.js +++ b/packages/vite/src/index.js @@ -91,6 +91,8 @@ module.exports = function prefreshPlugin(options = {}) { try { flushUpdates(); } catch (e) { + // TODO: remove debugging code + console.log(e); self.location.reload(); } });