🐛 Bug Report
The index.${ext} file that is now generated with v5 does not account for filenames beginning with numerals.
To Reproduce
Steps to reproduce the behavior:
- create folder with a file named:
2circles.svg
- run
svgr cli command with --out-dir option
- inspect created
index.js file
- output should be:
export { default as 2circles } from './2circles.svg'
Expected behavior
Since the componentName is generated from the .svg filename and prepends the Svg string to account for filenames with numerals, it would be expected for the generateIndex function to be consistent and instead return the following for the example above:
export { default as Svg2circles } from './2circles.svg';
envinfo
## System:
- OS: Windows 10 10.0.16299
- CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
- Memory: 6.37 GB / 15.88 GB
## Binaries:
- Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
- npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
🐛 Bug Report
The
index.${ext}file that is now generated withv5does not account for filenames beginning with numerals.To Reproduce
Steps to reproduce the behavior:
2circles.svgsvgrcli command with--out-diroptionindex.jsfileExpected behavior
Since the
componentNameis generated from the.svgfilename and prepends theSvgstring to account for filenames with numerals, it would be expected for thegenerateIndexfunction to be consistent and instead return the following for the example above:envinfo