Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for base64 encoding #141

Closed
kayneb opened this issue Oct 25, 2017 · 0 comments
Closed

Allow for base64 encoding #141

kayneb opened this issue Oct 25, 2017 · 0 comments

Comments

@kayneb
Copy link

kayneb commented Oct 25, 2017

While I 100% agree that base64 encoding of SVGs is less ideal than just embedding the escaped SVG XML, it would be convenient if we had a way of using base64, while taking advantage of the 4096 byte limit.

Because of #81 it is not possible to use a single webpack config for SVGs across both CSS and JS. This is inconvenient as it requires our developers to remember to prefix every JS import with jsSvg (which will set noquotes to true). If the SVGs were encoded to base64, noquotes can be set to true across the board, meaning that there would be no extraneous quotes in JS imports, and CSS handles base64 encoded strings that aren't wrapped in quotes. Until the issue in the CSS loader is fixed, this is the ideal solution in our eyes.

kayneb pushed a commit to kayneb/svg-url-loader that referenced this issue Oct 25, 2017
kayneb pushed a commit to kayneb/svg-url-loader that referenced this issue Oct 25, 2017
bhovhannes added a commit that referenced this issue Oct 26, 2017
fixes #141: Allows for a new option 'base64' to enable base64 encoding, while still taking advantage of the 4096 byte limit checking for IE 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant