You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vitepress/lib/app/index.js

22 lines
415 B

import { createApp, h } from 'vue'
import { Layout } from '/@theme/index.js'
import { Content } from './Content'
import { useRouter } from './router.js'
const App = {
setup() {
if (typeof window !== 'undefined') {
useRouter()
} else {
// TODO inject static route for SSR
}
return () => h(Layout)
}
}
const app = createApp(App)
app.component('Content', Content)
app.mount('#app')