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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-ripple",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "Vike extension for Ripple TS — SSR, streaming, Layout, Head, SEO configs, hooks",
5
5
  "type": "module",
6
6
  "exports": {
@@ -47,22 +47,10 @@ const onRenderClient = async (pageContext) => {
47
47
  dispose = null
48
48
  }
49
49
 
50
- // ── Hydrate or mount ──
51
- // Hydrate preserves SSR HTML; mount clears and re-renders.
52
- // mount() is the stable fallback when hydration fails (e.g. during HMR reload).
53
- const { mount, hydrate } = await import('ripple')
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
  }