prashantpalikhe / nuxt-ssr-lit

SSR support for Lit elements in Nuxt3
Other
48 stars 7 forks source link

Using with dynamic web-components #164

Closed WillH0lt closed 2 weeks ago

WillH0lt commented 2 weeks ago

I'm looking for a way to add web-components dynamically, either through <component :is="..." /> or :v-html="...". Vue renders the html after the plugin runs, so the plugin never sees the dynamically added web-components. Any suggestions to get web-components that are server-side-rendered and dynamic?

prashantpalikhe commented 2 weeks ago

You can place the <LitWrapper /> around the <component :is /> yourself. That should work.

WillH0lt commented 2 weeks ago

That works! Thank you!