jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
554 stars 58 forks source link

Added configuration to preserve viewBox attribute in README #120

Open leoolivier opened 11 months ago

leoolivier commented 11 months ago

By default, SVGO does not preserve the viewBox attribute for optimization reasons. This can cause issues when you need to resize your SVG with CSS. This pull request proposes to add a code snippet showing the configuration to preserve the viewBox attribute.

mvarchdev commented 8 months ago

Needed also here!

jpkleemans commented 7 months ago

Thanks for your PR. I think this should be in a new section "Common issues". Can cou add that to the readme and place your issue + solution there, as a collapsed item (see this gist)?