0.8.0 breaks svg sprite
See original GitHub issueThe change in 0.8.0 to use url-loader
with limit 10k as a default loader breaks my svg sprite system.
The svg sprite system works like this: I put all my svgs in one folder, run svg-sprite to generate svg sprite (which is below 10k), then I have a custom Icon
component in which I import the svg sprite and load the apropriate icon using fragment identifiers
Icon Component:
import React, { PropTypes } from 'react'
import svgSprite from '../img/symbol/sprite.svg'
function Icon({ name }) {
return (
<svg>
<use xlinkHref={`${svgSprite}#${name}`} />
</svg>
)
}
Any idea how to fix this besides just adding more svgs to the sprite until it is bigger than 10k?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
gulp-svg-sprite | Yarn - Package Manager
is a Gulp plugin wrapping around svg-sprite which takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of...
Read more >ng-svg-icon-sprite - npm
This npm module in Angular package format provides both a solution for generating SVG sprites and a component for including them.
Read more >SVG sprites. Last updated: 3/6/19 | by Tony Montemorano
In this post we'll review some important considerations, and illustrate some ways to implement a scaleable SVG sprite design/development ...
Read more >A Few Different Ways To Use SVG Sprites In Animation
Technique #1: Complex Responsive Animation With An SVG Sprite ... This article by Ilya Pukhalski breaks down Joe Harrison's responsive icons technique in...
Read more >Unable to fix package vulnerability (svg-sprite-loader)
Running npm audit finds 4 vulnerabilities and suggests forcing a breaking change to svg-sprite-loader (reverting it from v6 back to v2??)
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is required to make inlining of svg images below 10k work (again)?
Is there a Option to re-activate base64 import for SVGs? I’m using SVGs in my CSS and i don’t like the workflow of manually transforming it to base64 first.