Hi! In Hardhat >= 3, hardhat-dependency-compiler is no longer needed (and no longer supported) because Hardhat has built-in dependency compilation via solidity.npmFilesToBuild.
I tried to use TokenMock.sol from this package like this:
export default {
solidity: {
npmFilesToBuild: [
'@1inch/solidity-utils/contracts/mocks/TokenMock.sol',
],
},
};
But Hardhat fails with:
Error HHE901: The file "contracts/mocks/TokenMock.sol" is not exported by the package.
The file exists in the package, but package.json exports does not expose Solidity contract paths such as:
./contracts/mocks/TokenMock.sol
./contracts/*
Could you please export the Solidity contracts path so Hardhat 3 can compile them through npmFilesToBuild?
For example, something like:
{
"exports": {
".": "./dist/src/index.js",
"./hardhat-setup": "./dist/hardhat-setup/index.js",
"./docgen": "./dist/docgen/index.js",
"./contracts/*": "./contracts/*"
}
}
This would make the package compatible with Hardhat 3 dependency compilation without relying on the old Hardhat 2 plugin.
Hi! In Hardhat >= 3,
hardhat-dependency-compileris no longer needed (and no longer supported) because Hardhat has built-in dependency compilation viasolidity.npmFilesToBuild.I tried to use
TokenMock.solfrom this package like this:But Hardhat fails with:
The file exists in the package, but package.json exports does not expose Solidity contract paths such as:
Could you please export the Solidity contracts path so Hardhat 3 can compile them through
npmFilesToBuild?For example, something like:
This would make the package compatible with Hardhat 3 dependency compilation without relying on the old Hardhat 2 plugin.