-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
index.js template typescript support #462
Comments
Hey @laitine 👋, |
An alternative naming could be ExampleCLI: Override: --index-ext 'ts' API Override: indexExt: 'ts' |
Generated template has the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
As described in https://react-svgr.com/docs/options/ typescript is indeed supported by --typescript for the icon files but not the index file. It would be more obvious and better supported if the "index.js" could also be directly generated as "index.ts". The current situation requires additional config for development environments that only include files with typescript file extensions (.ts, .tsx) into compilation for example. Currently I have to generate the icon component index with a separate script because the index file is not generated as typescript. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This would be nice to have stale bot |
This would be nice! Currently, I'm renaming the |
Seems to be gaining traction, should be re-considered? |
@gregberge using TypeScript option, the generated |
It would be nice to have this as an option; my index is in tsx format, and I have to run |
@gregberge would you consider have the extension be configurable between |
🚀 Feature Proposal
Option for index.js to customize the file extension.
Motivation
Complementing the typescript support adding an option for the index.ts to be generated would offer direct support for generating all files with .ts file extension.
Example
CLI: Override: --index-template-ext 'ts'
API Override: indexTemplateExt: 'ts'
The text was updated successfully, but these errors were encountered: