Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

feat: support returning SVG as a {String} (options.raw) #62

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

omrigilad
Copy link

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.

Jaeho Lee and others added 23 commits September 16, 2016 18:54
add missing idPrefix as default value to config
Multiple classses in class attribute not prefixed when using classPrefix
multiple classes in class string, fix for Issue webpack-contrib#39
For CSS properties that contain '.' in the value.
[fix] don't transform webpack2 query objects
@jsf-clabot
Copy link

jsf-clabot commented Jun 6, 2017

CLA assistant check
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.

✅ sairion
✅ d3viant0ne
❌ Jay Jaeho Lee
❌ noxan
❌ nonmanifold
❌ alok pepakayala
❌ agerard-godaddy
❌ Stuk
❌ 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.

@michael-ciniawsky michael-ciniawsky changed the title Support raw option to return the SVG as a string feat: support returning SVG as a {String} (options.raw) Jul 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants