we want to build an application with svelte but are stuck at using our components that we built with stenciljs. At first it looked like it worked like a charm but as stencil components use the term “slot” and svelte does too, i am reveiving an error when using this component on svelte
Element with a slot=’…’ attribute must be a child of a component or a descendant of a custom element
. I understand this issue, the question is how to ignore it or to tell svelte to ignore certain elements. Is there a function for that?
The component i try to use looks like that:
JavaScript
x
8
1
<my-ui-image
2
slot="image"
3
src="/images/image.png"
4
shadow-on-image="false"
5
alt="image alt"
6
title="Image title"
7
/>
8
Advertisement
Answer
So i tried this again and the issue is gone.