Description
Generated Typescript provider bindings are not consumable as ESM. While they use import statements, they don't include file extensions. There may also be other issues present.
This means that these generated files cannot be included in an ESM Typescript codebase. cdktf's recommendation was always to run as commonjs, but the Node community has largely moved on from commonjs.
This was a longstanding issue in cdktf that was never resolved: hashicorp/terraform-cdk#1660
References
hashicorp/terraform-cdk#1660
Help Wanted
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Generated Typescript provider bindings are not consumable as ESM. While they use
importstatements, they don't include file extensions. There may also be other issues present.This means that these generated files cannot be included in an ESM Typescript codebase. cdktf's recommendation was always to run as commonjs, but the Node community has largely moved on from commonjs.
This was a longstanding issue in cdktf that was never resolved: hashicorp/terraform-cdk#1660
References
hashicorp/terraform-cdk#1660
Help Wanted
Community Note