vike-ripple 0.4.5 → 0.4.6

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.5",
3
+ "version": "0.4.6",
4
4
  "description": "Vike extension for Ripple TS — SSR, streaming, Layout, Head, SEO configs, hooks",
5
5
  "type": "module",
6
6
  "exports": {
@@ -4,15 +4,30 @@ import { setPageContext } from '../hooks/usePageContext.js'
4
4
  import { setHydrated } from '../hooks/useHydrated.js'
5
5
 
6
6
  const onRenderClient = async (pageContext) => {
7
+ console.log('[vike-ripple] onRenderClient called', {
8
+ isHydration: pageContext.isHydration,
9
+ isFirstRender: 'isFirstRender' in pageContext,
10
+ hasPage: !!pageContext.Page,
11
+ url: pageContext.urlOriginal,
12
+ location: window.location.href,
13
+ })
14
+
7
15
  const { Page } = pageContext
8
16
  if (!Page) return
9
17
 
10
18
  setPageContext(pageContext)
11
19
  const container = document.getElementById('root')
12
- if (!container) return
20
+ if (!container) {
21
+ console.warn('[vike-ripple] no #root container')
22
+ return
23
+ }
24
+
25
+ console.log('[vike-ripple] container child count before:', container.childElementCount)
13
26
 
14
- // mount() clears container (target.textContent = '') and renders fresh
27
+ // Just mount — mount() clears container (target.textContent = '') and renders
15
28
  const { mount } = await import('ripple')
16
29
  mount(Page, { target: container, props: {} })
17
30
  setHydrated()
31
+
32
+ console.log('[vike-ripple] container child count after:', container.childElementCount)
18
33
  }