Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow specification for file extension to be used in import statement paths for files created by code generation #4645

Open
TheMartianMaker opened this issue Oct 1, 2024 · 3 comments
Labels
enhancement New feature or request rtkq-codegen

Comments

@TheMartianMaker
Copy link

Feature Request:

  • Option to specify a file extension: Add a configuration option to specify the file extension (e.g., .js, .ts) that should be used in all import statements within the generated files.
  • Consistent import paths: Ensure that all import statements in the generated files use the specified file extension.

Use Case:
For ESM projects, it is often required to include file extensions in import statements. Currently, developers have to manually update the import statements in the generated files to include the necessary file extensions. This feature would automate that process and ensure consistency across the codebase, which is crucial for maintaining proper module resolution in ESM environments.

@markerikson
Copy link
Collaborator

Seems reasonable. File a PR?

@markerikson markerikson added enhancement New feature or request rtkq-codegen labels Oct 1, 2024
@TheMartianMaker
Copy link
Author

TheMartianMaker commented Oct 2, 2024

I dont' have the code written for this request. I'm inquiring to see if you guys could add this feature.

@markerikson
Copy link
Collaborator

@TheMartianMaker Yeah, I'm saying it's a reasonable request, but it's probably not something we're going to have time to implement ourselves any time soon. Best bet to add it soon is if you can file a PR to make the changes, otherwise it'll probably be a while.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request rtkq-codegen
Projects
None yet
Development

No branches or pull requests

2 participants