Closed burnmaniac closed 4 years ago
Could you please create repo with minimal setup to demonstrate a problem (package.json, webpack config, SVG image and piece of your code). If you don't want to create a repository - you can create a gist with multiple files.
Sorry, I've been busy. I'll create the repo soon.
@kisenka I've create a sample repo here https://github.com/shayan-binary-2/svg-sprite-loader-sample I have same problem.
Thanks! That's what we did at the end. We didn't have to use extract-svg-sprite-webpack-plugin, it just magically works when SVG is referenced in CSS.
Sorry for not creating the repo, the things are super crazy at the moment.
Thank you very much for your time and help! Issue closed!
Do you want to request a feature, report a bug or ask a question? Report a bug.
What is the current behavior? SVG is not rendered properly.
What is the expected behavior? SVG should be rendered properly.
Original SVG:
Sprite, copied from Network tab in DevTools:
package.json
SVG is rendered using SVGSpriteSymbol component which looks like this:
Part of webpack config:
Plugin is just instantiated as
new SpriteLoaderPlugin()
without any additional options.Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) I had suspicion that the issue lies somewhere in React. As React is doing some mapping until the SVG gets into DOM, I thought that something is not mapped properly. So, I opened the issue in their repo (https://github.com/facebook/react/issues/17645). However, after some time, we are 99% sure that this has nothing to do with React. It's either svg-sprite-loader or something else.
Since this is my first issue here, sorry if I didn't provide enough info. I'm willing to add additional information in case it's needed, just let me know what do you need. Thank you.