maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

Slots not working with importWrappers when migrating to v2.x #75

Closed kkukelka closed 3 years ago

kkukelka commented 3 years ago

Hey, we are using vue-lazy-hydration very extensively and started migrating to version 2.0. However, when using named slots like this while the components are imported via importWrappers

<CustomComponent>
    <template #headline>Text</template>
    <template #button>Text</template>
</CustomComponent>
//
CustomComponent: hydrateWhenIdle(() => import('@package/components/CustomComponent.vue'))

the content doesn't seem to get rendered.

Using it via <LazyHydrate /> fixed the issue for us. But we would like to know why.

maoberlehner commented 3 years ago

Hello Kilian! Thanks for reporting this issue! I just realized that I made a mistake when I implemented the import wrappers. I'm working on it. In the meantime you can stick to v1 or use <LazyHydrate/>