-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add an SVG inline #56
Comments
This problably is a bug.
To use SVG inline, please read this by StackOverflow: |
@francisrod01 thanks for the reply, I am using react-scripts@2.0.4, regarding that solution, I think I'd have to eject CRA, isn't it? Is there any other solution that doesn't require changing webpack config? |
Faced with the same issue. As far as I think we should use correct babel plugin in |
@pkev777 I have investigated this issue and it seems that the only package that doesn't break SSR is https://github.com/airbnb/babel-plugin-inline-react-svg , the reason is that this package converts SVGs files into JS objects. I haven't fixed it yet though, I don't know how to integrate it with the server. |
@microcipcip but this requires eject(. Or do your find some way how to use it without ejection? |
@pkev777 That's why I haven't tried it yet, I don't want to eject, so for now I've converted my SVGs in React components ;) |
Hey, my apologies for the long wait @microcipcip - I'm looking to ensure this is fixed with version 2.0. If you're interested, I could really use your thoughts for what you'd like to see in the upcoming version. Feel free to comment on the issue here with any suggestions. :) |
Is there a way to add an SVG inline? For example the following code breaks the SSR:
I can create a repo with the issue if needed.
The text was updated successfully, but these errors were encountered: