vite-svg-loader
vite-svg-loader copied to clipboard
Send path to svgo
Fix #60
Tested with npm link and work great 👍
Hi Sébastien, thanks for your PR! I'll look into it next week.
Thanks
Actually I think path should be passed to svgo.optimize({ path: 'path.svg' })
alone and the options should be passed to new svgo(options)
but you don't seem to instantiate the plugin like that.
Do you want me to make that change too ? See https://github.com/oliverfindl/vue-svg-inline-loader/blob/28051895a5db3c3beba6025963106566d4cee84a/src/index.js#L234
Thanks for your work. Could you review my comments? Also, is it possible for you to add a cypress test for this change?
I added one test
Actually I think path should be passed to
svgo.optimize({ path: 'path.svg' })
alone and the options should be passed tonew svgo(options)
but you don't seem to instantiate the plugin like that.
In the svgo readme, it looks like you can add config to optimize
just fine: https://github.com/svg/svgo#optimize
Thanks for adding the test! Can you fix the merge conflicts? Then I can merge the PR
@jpkleemans I fixed the merge conflicts.
Thank you!