Skip to content

Commit da71c45

Browse files
feat: add node16Modules flag for hardhat (#880)
Co-authored-by: Raymond Feng <[email protected]>
1 parent 77e0de7 commit da71c45

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

.changeset/hungry-suits-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@typechain/hardhat': minor
3+
---
4+
5+
Allow passing node16Modules flag to TypeChain

packages/hardhat/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function getDefaultTypechainConfig(config: HardhatConfig): TypechainConfi
1010
discriminateTypes: false,
1111
tsNocheck: false,
1212
dontOverrideCompile: false,
13+
node16Modules: false,
1314
}
1415

1516
return {

packages/hardhat/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ subtask(TASK_TYPECHAIN_GENERATE_TYPES)
8383
discriminateTypes: typechainCfg.discriminateTypes,
8484
tsNocheck: typechainCfg.tsNocheck,
8585
environment: 'hardhat',
86+
node16Modules: typechainCfg.node16Modules,
8687
},
8788
}
8889

packages/hardhat/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface TypechainConfig {
66
tsNocheck: boolean
77
externalArtifacts?: string[]
88
dontOverrideCompile: boolean
9+
node16Modules: boolean // defaults to false
910
}
1011

1112
export interface TypechainUserConfig extends Partial<TypechainConfig> {}

0 commit comments

Comments
 (0)