can't generate a node16 moduleResolution compatible package
omridevk opened this issue · comments
Description
When using "moduleResolution": "node16" or "nodenext" in tsconfig, you need to import files with extensions, like import {Api} from 'test.js'
I think there's a need for config to allow the generator to generate the right imports.
Maybe I missed a config
OpenAPI specification (optional)
No response
Configuration
npx @hey-api/openapi-ts -i api.yaml -o src/client
System information (optional)
No response
see a similar issue filed in panda-css package:
chakra-ui/panda#1236 (comment)
Nope, you didn't miss a config. The only thing you missed is checking for duplicate issues #478
sorry, missed it :)
do you want me to take a crack at it? it should be a trivial change
If you'd like, I'd appreciate it! Just needs some tests too
How do you plan to add this? Supply an optional tsconfig? Try to read it automatically?
not sure actually, I am trying to figure out if there's a way to use ts.factory smartly that it would know, but I am trying to run the repo locally but having some issues.
will probably start here: