-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
New v5 generate index.js feature does not account for filenames beginning with numerals #379
Comments
Hey @renadr 👋, |
It is actually a bug yes, thanks for reporting. |
Thanks for acknowledging @gregberge! Is this something you need a PR for to fix, or do you have bandwidth to tackle? Also, I did see closed issues in the repo that were tagged with a feature requests for a Thanks for all of your help and effort put into this tool. It's extremely helpful! |
is there a way to handle folders inside the root source directory to generate in the index.ts as well? |
@gregberge Adding Svg prefix will probably be a breaking change. We can add _ before numbers for now. |
@TrySound since SVG starting with a number does not actually work, it would not be a breaking change. I am OK for adding |
🐛 Bug Report
The
index.${ext}
file that is now generated withv5
does not account for filenames beginning with numerals.To Reproduce
Steps to reproduce the behavior:
2circles.svg
svgr
cli command with--out-dir
optionindex.js
fileExpected behavior
Since the
componentName
is generated from the.svg
filename and prepends theSvg
string to account for filenames with numerals, it would be expected for thegenerateIndex
function to be consistent and instead return the following for the example above:envinfo
The text was updated successfully, but these errors were encountered: