-
Couldn't load subscription status.
- Fork 89
feat!: output ES modules instead of CommonJS #1205
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
base: master
Are you sure you want to change the base?
Conversation
* Fix error: src/ethereum-storage-ethers.ts(30,35): error TS2709: Cannot use namespace 'TypedEmitter' as a type.
* Eliminate dependency on utils from smart-contracts * Why? Unable to call async import function in non-function export
* Because smart-contracts is CommonJS. * Use dynamic import() to import ES Modules in CommonJS.
|
TODO: Consider making This would decrease the code churn in the TODO: Consider making all packages output ES modules AND CommonJS modules. |
Fixes #1148
Description of the changes
smart-contractsmust remain a CommonJS module because Hardhat usesrequire()statements.smart-contractsnow usesimport()to dynamically import ES modules. Reference: Interoperability with CommonJS.jsand/index.jsfile extensions for all path specifiers. Reference: Mandatory File Extensionsrequest-client.js,web3-signature,epk-signature, andepk-decryption.typed-emittertotiny-typed-emittersrc/ethereum-storage-ethers.ts(30,35): error TS2709: Cannot use namespace 'TypedEmitter' as a type.Keyv,Bluebird,AJV, andFormData