Nuxt/test/fixtures/basic/pages/client.vue
Daniel Roe df04a665ce
perf(nuxt): tree-shake client-only components from ssr bundle (#5750)
Co-authored-by: Pooya Parsa <pooya@pi0.io>
2022-07-14 19:46:12 +02:00

29 lines
859 B
Vue

<script setup lang="ts">
onMounted(() => import('~/components/BreaksServer'))
onBeforeMount(() => import('~/components/BreaksServer'))
onBeforeUpdate(() => import('~/components/BreaksServer'))
onRenderTracked(() => import('~/components/BreaksServer'))
onRenderTriggered(() => import('~/components/BreaksServer'))
onActivated(() => import('~/components/BreaksServer'))
onDeactivated(() => import('~/components/BreaksServer'))
onBeforeUnmount(() => import('~/components/BreaksServer'))
</script>
<template>
<div>
This page should not crash when rendered.
<ClientOnly class="something">
test
<BreaksServer />
<BreaksServer>Some slot content</BreaksServer>
</ClientOnly>
This should render.
<div>
<ClientOnly class="another">
test
<BreaksServer />
</ClientOnly>
</div>
</div>
</template>