cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
210 stars 51 forks source link

Add support for `base64` styles format #165

Closed xavierfoucrier closed 3 years ago

xavierfoucrier commented 3 years ago

It would be cool to have base64 available as a styles format here: https://github.com/cascornelissen/svg-spritemap-webpack-plugin/blob/master/docs/options.md#stylesformat--data

Just a suggestion :wink:

cascornelissen commented 3 years ago

Is there an advantage to that over the data URIs (e.g. using styles.format: 'data') that are supported already? That approach uses mini-svg-data-uri which explains in its README that this results in a smaller filesize.

xavierfoucrier commented 3 years ago

Yep, exactly.

I was guessing that there will be an advantage to base64 the SVG, in comparison to data URIs, but after a bunch of tests it looks like it's better to compile with mini-svg-data-uri instead.

Closing the issue! :rocket: :+1: