-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
--icon requires a size be entered #668
Comments
That's a good explanation of what the problem I ran into is, I would still recommend updating the documentation for icon. This was my first time using the cli tool so it didn't occur to me to look under migration for old versions. That seemed more relevant to use svgr with webpack etc. |
I would suggest you to use svgr config file instead of passing arguments to cli. |
Hi @alexistbell, you are right, docs should reflect it. |
I was trying to convert some svgs using the command line and the --icon flag. https://react-svgr.com/docs/options/ does not make it clear that you must pass in a value for width and height, it implies its optional and that it will default to 1em if you don't pass in a value. When I tried this the output of my new file was just the --help text.
Here's what I was trying in case I had some other syntax error
svgr --icon students-blue.svg > StudentsBlue.jsx
Either the documentation should be updated to show this is a required value, or it should default to 1em as the documentation implies.
The text was updated successfully, but these errors were encountered: