jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
555 stars 59 forks source link

Component won't show: `Component is missing template or render function` #65

Closed ThaDaVos closed 1 year ago

ThaDaVos commented 1 year ago

I am using https://github.com/antfu/unplugin-vue-components to automatically load all my components, including the SVG ones - but when I use it - it won't show and my console shows the following warning: Component is missing template or render function

jpkleemans commented 1 year ago

Hi, did you load viteSvgLoader() in your vite.config.js file? If yes, then I think unplugin-vue-components doesn't pipe components through the loaded vite plugins. Maybe it's best then to contact them about this.

ThaDaVos commented 1 year ago

It does work with other loaders, like the markdown one - and this other one works: https://github.com/antfu/unplugin-vue-components/issues/9

Also, I am not even loading it through that plugin and it doesn't work: image

Logo in question: image