So I have a complex Vue monorepo setup which involves some apps running in Vue2 and some other running in Vue3.
In the monorepo I also got some packages which sometimes expose components (to be consumed by both Vue2 and Vue3 with vue-demi
).
The problem is that for some technical requirements I need to have some components defined as a fragment
within a table (Several nodes under template
), some of it related to a11y . I know that vue3 already allows this but in vue2 is not possible.
So I was tempted to use vue-frag
for the vue2 side. What is the issue? That library is not compatible with vue3.
So my question is, is there a possibility to switch between the template
's vue3 tag and Fragment
from vue-frag
?
Something like:
// This actually does not work, because it try to interpret template as an HTML tag
<component :is="isVue2 ? Fragment : 'template'>
<-- ... --/>
</component>