codefeathers / rollup-plugin-svelte-svg

Import SVG files as Svelte Components
MIT License
75 stars 13 forks source link

fix https://github.com/codefeathers/rollup-plugin-svelte-svg/issues/18 #19

Closed nosovk closed 3 years ago

nosovk commented 3 years ago

in latest versions of rollup svg content is encoded. To avoid that added decodeURIComponent(source);

MKRhere commented 3 years ago

This would be a backwards incompatible change, yes? Is there a way we can detect URL encoding and only optionally decode?

nosovk commented 3 years ago

probably it shouldn't broke anything, because decodeURIComponent wouldn't change correct svg. We can add additional check with containsEncodedComponents, but unfortunately it will not protect from breaking SVG's. In common normal svg shouldn't be affected at all.

MKRhere commented 3 years ago

Right, that makes sense