Skip to content
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

Support loading of ESM deployment scripts #515

Open
fullkomnun opened this issue Feb 26, 2024 · 1 comment
Open

Support loading of ESM deployment scripts #515

fullkomnun opened this issue Feb 26, 2024 · 1 comment

Comments

@fullkomnun
Copy link
Contributor

fullkomnun commented Feb 26, 2024

Is your feature request related to a problem? Please describe.
Hardhat recently added experimental support for ESM modules (alongside CJS) in TS projects. I played around with the 'template-ethereum-contracts' to try migrate it to ESM accordingly patching hardhat-deploy along the way.

Describe the solution you'd like
Would be great if hardhat-deploy could support loading of both CJS/ESM modules (depending on consuming project config).

Describe alternatives you've considered
While this patch does work for all cases (I can have a legcy full CJS project, I can leverage expremintal support to have scripts as either CJS or ESM using JS/TS), I'm not sure what would the correct way to properly implement it as part of hardhat-deploy with regards to restrictions still applying to hardhat and it's plugins and ESM.

Additional context
I see that hardhat team plans to further integrate ESM support into 'hardhat' itself and it's plugin eco-system (via 'ts-node' or maybe 'tsx'):

@wighawag
Copy link
Owner

Thanks for creating the issue

Yes ESM support would be great

I am currently working on hardhat-deploy v2 I am using daily actually but not fully ready yet as I change stuff to suit my need still: see https://github.com/wighawag/rocketh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants