mattelen / vue3-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
47 stars 12 forks source link

Updates README for Nuxt v3. #5

Closed ijpatricio closed 2 years ago

ijpatricio commented 2 years ago

Addresses #4

It can now work in Nuxt3 with SSR.

This was a tough one! Feels good!

@mattelen I'm curious, what was your motivation to do this? As for me, that's the case, with Laravel. It's very nice for me because then I have all translations and authorization simplified.

Do you also have a backend, where you render pages?

The next logical step would be to be able to import and register components after Vue initialization.

Say, you go ajax for a template, and it comes in HTML with markup having components not still registered in Vue, and it's js file available to download, of course.

Is this hard to achieve??

Meanwhile, I hope you enjoy the PR 👍

Thanks again for the package, it's great!

mattelen commented 2 years ago

This looks great @ijpatricio. I'll merge it.

I got this library working with Vue 3 as I use ajax to load templates in. With having components not registered, the components in the templates I was loading are already globally registered to help get around this issue.

Hope that helps