-
Notifications
You must be signed in to change notification settings - Fork 59
Getting Invalid value for <path> #15
Comments
Thanks for report! I will look into it. |
@seethroughtrees Can you provide more detailed message/log and failing svg's content? Any svg causes error is fine and will be very helpful :) I have tried with more complex SVG examples (for instance, Firefox logo) and didn't see problems yet. |
Thanks so much for looking into it @sairion . I tested with Firefox logo you linked, and am getting the same Invalid value for path.. issue. I'll try to give some more info here: Using React with Redux:
My webpack.config has the loader:
I'm using the component like this:
I think the problem is related to the value being returned in the src attribute:
I'm imagining it shouldn't contain anything before/after the svg tags. Unless that's supposed to be stripped somewhere else. Thanks again for the help. |
Okay I got it! So the problem is that because I was defining the loader in the config AND the template, the file is being by parsed by webpack twice. Two easy fixes, in case anyone else runs into this: #1. Remove the loader from your config. OR #2. Add a bang at the front of the inline require and it will bypass the other loaders.
Hope this helps someone else in the future. |
Thanks for the detail! I will add some note to README prevent this. 👍 |
with the latest loader (or webpack 2.2) you can do this in your react component:
|
Would love to get this working with my react app. (0.14) But I keep getting:
Error: Invalid value for <path> attribute d="\\\"M243.621"
I've tried with several svg files. Same results with each. Any ideas what could be missing?
Thanks in advance.
The text was updated successfully, but these errors were encountered: