mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-24 09:28:41 +00:00
17 lines
361 B
TypeScript
17 lines
361 B
TypeScript
|
import { defineComponent, h } from 'vue'
|
||
|
// @ts-expect-error virtual import
|
||
|
import { NuxtIsland } from '#components'
|
||
|
|
||
|
export const createServerComponent = (name: string) => {
|
||
|
return defineComponent({
|
||
|
name,
|
||
|
inheritAttrs: false,
|
||
|
setup (_props, { attrs }) {
|
||
|
return () => h(NuxtIsland, {
|
||
|
name,
|
||
|
props: attrs
|
||
|
})
|
||
|
}
|
||
|
})
|
||
|
}
|