Problem Description
The generated client currently includes .js file extensions in the imports of local files like the descriptors.js and types.js. This causes issues with frameworks like Next.js, which do not handle these imports correctly. As a result, users are forced to manually remove the .js extension from these imports.
Steps to Reproduce
- Generate the client using the provided tool.
- Notice that the imports of local files in the generated code include
.js extensions.
- Attempt to use the generated client in a Next.js project.
- Observe the errors related to import paths with
.js extensions.
Example
Here is an example of the problematic import statement:
import * as descriptors from "./descriptors.js";
This needs to be manually corrected to:
import * as descriptors from "./descriptors";
Proposed Solution
Update the client generation logic to omit the .js file extension in the imports of local files. This change should ensure compatibility with frameworks like Next.js and improve the overall usability of the generated client.
Problem Description
The generated client currently includes
.jsfile extensions in the imports of local files like thedescriptors.jsandtypes.js. This causes issues with frameworks like Next.js, which do not handle these imports correctly. As a result, users are forced to manually remove the.jsextension from these imports.Steps to Reproduce
.jsextensions..jsextensions.Example
Here is an example of the problematic import statement:
This needs to be manually corrected to:
Proposed Solution
Update the client generation logic to omit the
.jsfile extension in the imports of local files. This change should ensure compatibility with frameworks like Next.js and improve the overall usability of the generated client.