-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
176 changed files
with
2,847 additions
and
2,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Config } from 'vike/types' | ||
|
||
// https://vike.dev/config | ||
export default { | ||
/* To enable Client-side Routing: | ||
clientRouting: true, | ||
// !! WARNING !! Before doing so, read https://vike.dev/clientRouting */ | ||
|
||
// See https://vike.dev/data-fetching | ||
passToClient: ['pageProps', 'urlPathname'] | ||
} satisfies Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...eact-ts/renderer/_default.page.server.tsx → ...plate-react-ts/renderer/+onRenderHtml.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
boilerplates/boilerplate-react-ts/renderer/_default.page.client.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// https://vike.dev/config | ||
export default { | ||
/* To enable Client-side Routing: | ||
clientRouting: true, | ||
// !! WARNING !! Before doing so, read https://vike.dev/clientRouting */ | ||
|
||
// See https://vike.dev/data-fetching | ||
passToClient: ['pageProps', 'urlPathname'] | ||
} |
20 changes: 20 additions & 0 deletions
20
boilerplates/boilerplate-react/renderer/+onRenderClient.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// https://vike.dev/onRenderClient | ||
export { onRenderClient } | ||
|
||
import { hydrateRoot } from 'react-dom/client' | ||
import { PageShell } from './PageShell' | ||
|
||
// This onRenderClient() hook only supports SSR, see https://vike.dev/render-modes for how to modify onRenderClient() | ||
// to support SPA | ||
async function onRenderClient(pageContext) { | ||
const { Page, pageProps } = pageContext | ||
if (!Page) throw new Error('Client-side onRenderClient() hook expects pageContext.Page to be defined') | ||
const root = document.getElementById('react-root') | ||
if (!root) throw new Error('DOM element #react-root not found') | ||
hydrateRoot( | ||
root, | ||
<PageShell pageContext={pageContext}> | ||
<Page {...pageProps} /> | ||
</PageShell> | ||
) | ||
} |
10 changes: 5 additions & 5 deletions
10
...e-react/renderer/_default.page.server.jsx → ...lerplate-react/renderer/+onRenderHtml.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Config } from 'vike/types' | ||
|
||
// https://vike.dev/config | ||
export default { | ||
/* To enable Client-side Routing: | ||
clientRouting: true, | ||
// !! WARNING !! Before doing so, read https://vike.dev/clientRouting */ | ||
|
||
// See https://vike.dev/data-fetching | ||
passToClient: ['pageProps', 'urlPathname'] | ||
} satisfies Config |
14 changes: 14 additions & 0 deletions
14
boilerplates/boilerplate-vue-ts/renderer/+onRenderClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// https://vike.dev/onRenderClient | ||
export { onRenderClient } | ||
|
||
import { createApp } from './app' | ||
import type { OnRenderClientAsync } from 'vike/types' | ||
|
||
// This onRenderClient() hook only supports SSR, see https://vike.dev/render-modes for how to modify onRenderClient() | ||
// to support SPA | ||
const onRenderClient: OnRenderClientAsync = async (pageContext): ReturnType<OnRenderClientAsync> => { | ||
const { Page, pageProps } = pageContext | ||
if (!Page) throw new Error('Client-side render() hook expects pageContext.Page to be defined') | ||
const app = createApp(Page, pageProps, pageContext) | ||
app.mount('#app') | ||
} |
12 changes: 6 additions & 6 deletions
12
...e-vue-ts/renderer/_default.page.server.ts → ...lerplate-vue-ts/renderer/+onRenderHtml.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
boilerplates/boilerplate-vue-ts/renderer/_default.page.client.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// https://vike.dev/config | ||
export default { | ||
/* To enable Client-side Routing: | ||
clientRouting: true, | ||
// !! WARNING !! Before doing so, read https://vike.dev/clientRouting */ | ||
|
||
// See https://vike.dev/data-fetching | ||
passToClient: ['pageProps', 'urlPathname'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// https://vike.dev/onRenderClient | ||
export { onRenderClient } | ||
|
||
import { createApp } from './app' | ||
|
||
// This onRenderClient() hook only supports SSR, see https://vike.dev/render-modes for how to modify onRenderClient() | ||
// to support SPA | ||
async function onRenderClient(pageContext) { | ||
const { Page, pageProps } = pageContext | ||
if (!Page) throw new Error('Client-side render() hook expects pageContext.Page to be defined') | ||
const app = createApp(Page, pageProps, pageContext) | ||
app.mount('#app') | ||
} |
10 changes: 5 additions & 5 deletions
10
...late-vue/renderer/_default.page.server.js → ...boilerplate-vue/renderer/+onRenderHtml.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
boilerplates/boilerplate-vue/renderer/_default.page.client.js
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.