Convert all your SVGs to a single TSX module
- Run
npm i svg-to-tsx
- Add following script to your
package.json
"icons": "svg-to-tsx -i ./input/path -o ./output/path -n fileName"
- Run
npm run icons
Short | Long | Description | Default |
---|---|---|---|
-i | --input | Path to where SVG files are located | none |
-o | --output | Output module destination path | none |
-n | --name | Output module file name | "icons" |
This package was made in a hurry because I needed it for my website. I will improve it somewhere in the future with additional settings.