mirror of https://github.com/vuejs/vitepress
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.
22 lines
415 B
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')
|