create-vike 0.0.387 → 0.0.389
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/boilerplate-react/package.json +1 -1
- package/boilerplate-react/renderer/+onRenderClient.jsx +2 -2
- package/boilerplate-react/renderer/+onRenderHtml.jsx +1 -1
- package/boilerplate-react-ts/package.json +1 -1
- package/boilerplate-react-ts/renderer/+onRenderClient.tsx +2 -2
- package/boilerplate-react-ts/renderer/+onRenderHtml.tsx +1 -1
- package/boilerplate-vue/package.json +1 -1
- package/boilerplate-vue-ts/package.json +1 -1
- package/package.json +1 -1
|
@@ -13,8 +13,8 @@ function onRenderClient(pageContext) {
|
|
|
13
13
|
// to support SPA
|
|
14
14
|
if (!Page) throw new Error('My onRenderClient() hook expects pageContext.Page to be defined')
|
|
15
15
|
|
|
16
|
-
const container = document.getElementById('
|
|
17
|
-
if (!container) throw new Error('DOM element #
|
|
16
|
+
const container = document.getElementById('root')
|
|
17
|
+
if (!container) throw new Error('DOM element #root not found')
|
|
18
18
|
|
|
19
19
|
const page = (
|
|
20
20
|
<Layout pageContext={pageContext}>
|
|
@@ -14,8 +14,8 @@ const onRenderClient: OnRenderClientAsync = async (pageContext): ReturnType<OnRe
|
|
|
14
14
|
// to support SPA
|
|
15
15
|
if (!Page) throw new Error('My onRenderClient() hook expects pageContext.Page to be defined')
|
|
16
16
|
|
|
17
|
-
const container = document.getElementById('
|
|
18
|
-
if (!container) throw new Error('DOM element #
|
|
17
|
+
const container = document.getElementById('root')
|
|
18
|
+
if (!container) throw new Error('DOM element #root not found')
|
|
19
19
|
|
|
20
20
|
const page = (
|
|
21
21
|
<Layout pageContext={pageContext}>
|
|
@@ -35,7 +35,7 @@ const onRenderHtml: OnRenderHtmlAsync = async (pageContext): ReturnType<OnRender
|
|
|
35
35
|
<title>${title}</title>
|
|
36
36
|
</head>
|
|
37
37
|
<body>
|
|
38
|
-
<div id="
|
|
38
|
+
<div id="root">${dangerouslySkipEscape(pageHtml)}</div>
|
|
39
39
|
</body>
|
|
40
40
|
</html>`
|
|
41
41
|
|