jpkleemans / vite-svg-loader

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

Nuxt component auto-import #95

Closed mrleblanc101 closed 1 year ago

mrleblanc101 commented 1 year ago

Hi, Is it possible to make this work with Nuxt component auto-import ? If I use <SvgName>, it would generate import SvgName from '@/assets/svg/SvgName.svg?component'; It would be nice to be able to prefix the SVG too, like <ISvgName>. We use the capital i prefix for all "icons"

ExEr7um commented 1 year ago

Check out https://github.com/cpsoinos/nuxt-svgo.

gkatsanos commented 1 year ago

We should keep this rather generic, you can use a more nuxt-specific module otherwise liek the one linked above.