|
|
|
@ -52,7 +52,7 @@ const VitePressApp = defineComponent({
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export function createApp() {
|
|
|
|
|
export async function createApp() {
|
|
|
|
|
const router = newRouter()
|
|
|
|
|
|
|
|
|
|
const app = newApp()
|
|
|
|
@ -77,7 +77,7 @@ export function createApp() {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (Theme.enhanceApp) {
|
|
|
|
|
Theme.enhanceApp({
|
|
|
|
|
await Theme.enhanceApp({
|
|
|
|
|
app,
|
|
|
|
|
router,
|
|
|
|
|
siteData: siteDataRef
|
|
|
|
@ -127,12 +127,12 @@ function newRouter(): Router {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (inBrowser) {
|
|
|
|
|
const { app, router, data } = createApp()
|
|
|
|
|
|
|
|
|
|
// wait until page component is fetched before mounting
|
|
|
|
|
router.go().then(() => {
|
|
|
|
|
// dynamically update head tags
|
|
|
|
|
useUpdateHead(router.route, data.site)
|
|
|
|
|
app.mount('#app')
|
|
|
|
|
createApp().then(({ app, router, data }) => {
|
|
|
|
|
// wait until page component is fetched before mounting
|
|
|
|
|
router.go().then(() => {
|
|
|
|
|
// dynamically update head tags
|
|
|
|
|
useUpdateHead(router.route, data.site)
|
|
|
|
|
app.mount('#app')
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|