jpkleemans / vite-svg-loader

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

`?url` results in object with `__file` property instead of an actual url #72

Closed ThaDaVos closed 1 year ago

ThaDaVos commented 1 year ago

I noticed that if I use ?url (or not, if it's the defaultthe resulting thing is not a string but a object with a__file` property instead - I guess this is a bug?

jpkleemans commented 1 year ago

Hi, can you share a code sandbox with the problem? So I can see what's going wrong.

ThaDaVos commented 1 year ago

I am happy to tell you that it's already fixed - I added .svg to the Vue plugin's include list (the same as is done with .md files, at least I saw it done in a tutorial) - but due to that, the ?url got handled by the vue vite plugin and ended in such strange object - so I am closing this now