Closed jdratx closed 1 year ago
Yes, that's not an issue. : https://github.com/jpkleemans/vite-svg-loader/blob/main/index.js#L36-L38
raw
skips optimization. changing the raw
behavior would break backwards compatibility, as raw
means raw
and not optimized
:-)
Not sure if we have capacity to add this as a feature, but feel free to open up a PR! I'm helping the core maintainer and I'll happily review your PR.
First of all, thank you for creating this! <3 Second: I'm unsure if this is an issue or more of a feature request. According to the readme 'SVGs can be imported as strings using the
?raw
suffix'As I wasn't using the
?skipsvgo
suffix and svg optimization is enabled in the config, I initially assumed this would still include svg optimization. And therefore I thought it would output the results of the optimization as a string, but that's not the case. The string is the content of the original file, unoptimized despite svg optimization settings.Would love this as a feature: to be able to import an optimized svg as a string. Maybe changing the behavior of
?raw
is too confusing and should remain as it is, and this should be more like?string
with a note in the docs that this is as a string, but optimized?