Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

client.tsx

20 lines790 Bytes

1// DO NOT DELETE THIS FILE!!!
2// This file is a good smoke test to make sure the custom client entry is working
3import { createSSRApp } from 'vue'
4import {
5 StartClient,
6 configureHydrationSuppressions,
7 hydrateStart,
8} from '@tanstack/vue-start/client'
9​
10console.log("[client-entry]: using custom client entry in 'src/client.tsx'")
11​
12hydrateStart().then((router) => {
13 const app = createSSRApp(StartClient, { router })
14 // Suppress expected hydration mismatch warnings for routes with ssr: false or 'data-only'
15 // Must be called before mount() - this uses Vue's warnHandler for dev mode warnings
16 configureHydrationSuppressions(app, router)
17 // Mount to #__app wrapper div for proper Vue hydration
18 // The Body component creates this wrapper on the server
19 app.mount('#__app')
20})