Closed silasdavis closed 1 year ago
Latest commit: bbb3c18c57697b114d3c780efbe284d02cf40579
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Thanks @silasdavis! Can u take a look at failing tests?
Oops, yeah I will try to get round to that
kind bump for this feature. The current documentation is encouraging users that using @typechain/ethers-v6 set the moduleResolution
to either: nodenext
or node16
. This is incompatible with the types generated by typechain due to the missing extension .js
TypeScript's Node16/NodeNext module resolution brings uniform native ESM module support to Node/ESM environments as well as support for multiple entrypoints via package.json
exports
. However it explicitly requires relative imports to use file extensions for modules, usually '.js'.This change introduces a
node16Modules
codegen config. Currently it just adds the module suffix.js
to imports and exports where needed.Without this it is impossible to use Typechain generated code with tsconfig moduleResolution: Node16 or NodeNext.
Signed-off-by: Silas Davis silas.davis@monaxlabs.io