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

fix: Allow direct import of all files in dist #601

Merged
merged 1 commit into from
Jun 6, 2023
Merged

Conversation

richtera
Copy link
Contributor

@richtera richtera commented Jun 2, 2023

What does this PR introduce?

Allow direct import of constants.es.js and constants.cjs.js in the dist folder.
This will cause an error in typescript because of constants.d.ts not being found,
but hardhat uses the node loader and is not capable of finding the right file to load.
It uses ts-node which decides to pick the .es.js file, but that has "import" statements
which are not compatible with the nodejs compiler. I.e. it assumes modules
use require/module instead of import/export.

@richtera richtera force-pushed the patch/export-dist branch from ba656e3 to 61cada0 Compare June 5, 2023 13:59
@richtera richtera force-pushed the patch/export-dist branch from f0fc6c4 to de3625f Compare June 5, 2023 15:48
@richtera
Copy link
Contributor Author

richtera commented Jun 5, 2023

Rebased so that only the single line change shows I PR. I had rebased it to main by mistake

@CJ42 CJ42 merged commit f93583e into develop Jun 6, 2023
@CJ42 CJ42 deleted the patch/export-dist branch June 6, 2023 10:06
@CJ42 CJ42 mentioned this pull request Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants