Im trying to upgrade a project from Vue 2 to Vue 3 and there is a component in there with collections of different Vue components.
The way it worked in Vue 2 is by calling a Twig template (for example: field.twig) in Twig and sending that to Vue to compile using the :is attribute and Vue.compile method (<div :is"compile(element.content) ..."
).
This is what the Twig templates sends to Vue:
However in Vue 3 this doesnt seem to work anymore. There is nothing getting rendered and if I just use {{ element.content }}
in the template it returns the raw code.
I have tried multiple things to get the html mixed with Vue to render (v-html, v-runtime-template) but none of these seemed to fix the issue.
Vue Component: Collections Component
Twig Template: Collections Template