-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Orval generates wrong import paths in ESM-only package #1232
Comments
Hmmm i wonder if there is a way orval can detect what ts-config you are using? I somehow doubt it. |
Maybe an option like |
PR is welcome! |
@melloware the same is for Now the generated target needs to be including the extensions:
If you can give any pointer how this would work great? current config:
This generates the index.ts file with imports. Can it become an Orval config variable? |
@anymaniax @soartec-lab i am not sure how this exactly would work? |
What are the steps to reproduce this issue?
Use custom Axios instance in ESM-only package (i.e. that uses
type: "module"
in package.json and"module": "node16", "moduleResolution": "node16"
intsconfig.json
).What happens?
Generated code that imports the custom Axios is:
What were you expecting to happen?
Generated code that imports the custom Axios should be:
Any logs, error output, etc?
TypeScript errors:
Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './customInstance.js'? typescript(2835)
What versions are you using?
Package Version:
6.25.0
The text was updated successfully, but these errors were encountered: