ItsNickBarry
hardhat-dependency-compiler
TypeScript

📦 Compile Solidity sources directly from NPM dependencies

Last updated Dec 9, 2025
40
Stars
5
Forks
3
Issues
0
Stars/day
Attention Score
21
Language breakdown
TypeScript 99.1%
Shell 0.9%
Files click to expand
README

Hardhat Dependency Compiler

Compile Solidity sources directly from NPM dependencies.

This plugin was built for Hardhat 2 and is no longer maintained. Its features have been incorporated directly into Hardhat 3.

Installation

npm install --save-dev hardhat-dependency-compiler

or

yarn add --dev hardhat-dependency-compiler

Usage

Load plugin in Hardhat config:

require('hardhat-dependency-compiler');

Add configuration under the dependencyCompiler key:

| option | description | default | | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | | paths | Array of dependency paths to compile | [] | | path | path to temporary directory where dependencies are imported (relative to Hardhat sources directory) | './hardhat-dependency-compiler' | | keep | whether to keep temporary file directory after compilation is complete (directory will still be deleted and regenerated on each compilation) | false |

dependencyCompiler: {
  paths: [
    '@solidstate/contracts/interfaces/IERC20.sol',
  ],
}

Development

Install dependencies via Yarn:

yarn install

Setup Husky to format code on commit:

yarn prepare

© 2026 GitRepoTrend · ItsNickBarry/hardhat-dependency-compiler · Updated daily from GitHub