Skip to content

Commit

Permalink
fix: hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 20, 2021
1 parent ae1327d commit b553763
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client/index.ts
@@ -1,4 +1,4 @@
import { createSSRApp, Component } from 'vue'
import { createSSRApp, Component, createApp as createClientApp } from 'vue'
import { createMemoryHistory, createRouter, createWebHistory } from 'vue-router'
import { createHead, HeadClient } from '@vueuse/head'
import { deserializeState, serializeState } from '../utils/state'
Expand All @@ -22,7 +22,9 @@ export function ViteSSG(
const isClient = typeof window !== 'undefined'

async function createApp(client = false, routePath?: string) {
const app = createSSRApp(App)
const app = client
? createClientApp(App)
: createSSRApp(App)

let head: HeadClient | undefined

Expand Down

0 comments on commit b553763

Please sign in to comment.