chore(docs): render repl in ssr
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { inBrowser } from 'vitepress'
|
||||
import { Suspense } from 'vue'
|
||||
|
||||
const DocsRepl = defineAsyncComponent(() => import('./DocsRepl.vue'))
|
||||
|
||||
export default defineComponent({
|
||||
props: ['example'],
|
||||
props: ['example', 'examplesImports', 'dependencies'],
|
||||
setup(props) {
|
||||
return () => {
|
||||
if (!inBrowser) {
|
||||
return null
|
||||
}
|
||||
|
||||
return h(Suspense, h(DocsRepl, props))
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user