Open
Description
With scoped slots, this works:
<x-counter>
<template lwc:slot-data="data">
<span>{data.id} - {data.name}</span>
</template>
</x-counter>
However, if that same <x-counter>
component is used with <lwc:component>
(aka dynamic components):
<lwc:component lwc:is={customCtor}>
<template lwc:slot-data="data">
<span>{data.id} - {data.name}</span>
</template>
</lwc:component>
... then you get an error at compile time:
Error: LWC1178: <template> tag with lwc:slot-data directive must be the direct child of a custom element.
Activity