This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
feat: support returning SVG as a {String}
(options.raw
)
#62
Open
omrigilad
wants to merge
23
commits into
webpack-contrib:master
Choose a base branch
from
Tradesmarter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add idPrefix option
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.
multiple classes in class string, fix issue webpack-contrib#39
add warnTags and warnTagAttrs
[fix] don't transform webpack2 query objects
Add license file
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
changed the title
Support raw option to return the SVG as a string
feat: support returning SVG as a Jul 14, 2017
{String}
(options.raw
)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.