vike-ripple 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -47,22 +47,10 @@ const onRenderClient = async (pageContext) => {
|
|
|
47
47
|
dispose = null
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
const { mount
|
|
54
|
-
|
|
55
|
-
if (pageContext.isHydration && container.innerHTML !== '') {
|
|
56
|
-
try {
|
|
57
|
-
dispose = hydrate(component, { target: container, props: {} })
|
|
58
|
-
setHydrated()
|
|
59
|
-
return
|
|
60
|
-
} catch (err) {
|
|
61
|
-
console.warn('[vike-ripple] hydrate failed, falling back to mount:', err)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// mount() clears container internally (target.textContent = '')
|
|
50
|
+
// Always use mount() — hydrate() crashes Ripple's hmr wrapper (hydrate_node is null).
|
|
51
|
+
// mount() clears the container (target.textContent = '') and renders fresh.
|
|
52
|
+
// Ripple SSR is used for content delivery; client side always re-renders.
|
|
53
|
+
const { mount } = await import('ripple')
|
|
66
54
|
dispose = mount(component, { target: container, props: {} })
|
|
67
55
|
setHydrated()
|
|
68
56
|
}
|