svg-inline-loader
svg-inline-loader copied to clipboard
feat: support returning SVG as a `{String}` (`options.raw`)
Our use case requires us to clean up our SVG assets to prepare them for inlining, but then to provide our application with a URL to the cleaned up SVG via file-loader (or url-loader).
(For those interested, angular-material's $mdIconProvider accepts a URL to an SVG that must already be stripped of the xml document tag as well as any others that would prevent it from being inlined onto the DOM.)
In order to support this flow, I've added the raw option. When the raw option is enabled, svg-inline-loader returns the content of the cleaned up SVG as a string, which can then be forwarded to file-loader, url-loader, etc.
Is this something that would be considered universal enough to merged into master? If so, I'd be happy to also write a test for this new option, as well as make any other changes that would enable this pull request to be merged.
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 9 committers have signed the CLA.
:white_check_mark: sairion
:white_check_mark: d3viant0ne
:x: Jay Jaeho Lee
:x: noxan
:x: nonmanifold
:x: alok pepakayala
:x: agerard-godaddy
:x: Stuk
:x: omrigilad
Jay Jaeho Lee, alok pepakayala seem not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.