That plugin works really nicely when all of your code is within JavaScript, like Single File Components. In my case, I'm using Vue components in twig/html that isn't processed by the Vue template compiler. So, I have to globally register them on the Vue instance.
So yeah, depends on the use-case but both are good!
This also works totally well in combination. Imagine you no longer have any component imports in your SFCs. Nevertheless, you have "exposable components" that you then register globally, which you can use in Twig/html. The components contained in them are automatically resolved.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice post!
Depending on your setup, you might also be able to use the following plugin:
github.com/antfu/vite-plugin-compo...
It has worked nicely in the few projects where I've added it.
Hey Máximo! Yes, that's a super neat plugin.
That plugin works really nicely when all of your code is within JavaScript, like Single File Components. In my case, I'm using Vue components in twig/html that isn't processed by the Vue template compiler. So, I have to globally register them on the Vue instance.
So yeah, depends on the use-case but both are good!
This also works totally well in combination. Imagine you no longer have any component imports in your SFCs. Nevertheless, you have "exposable components" that you then register globally, which you can use in Twig/html. The components contained in them are automatically resolved.