jpkleemans / vite-svg-loader

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

`svgo.optimize` missing path option #60

Closed mrleblanc101 closed 1 year ago

mrleblanc101 commented 2 years ago

This plugin should send the file path to svgo. The path is an optional, but very useful param for svgo. https://github.com/svg/svgo#optimize Capture d’écran, le 2022-07-07 à 10 52 27 For exemple, the prefixIds plugin use the file path to generate unique id and class. In Vue 2, I used vue-svg-inline-loader which was correctly setup to do this. See https://github.com/oliverfindl/vue-svg-inline-loader/blob/28051895a5db3c3beba6025963106566d4cee84a/src/index.js#L234 Capture d’écran, le 2022-07-07 à 10 52 04