hardhat-dependency-compiler
Version:
Compile Solidity sources directly from NPM dependencies
34 lines (30 loc) • 683 B
text/typescript
import { name as pluginName } from '../package.json';
import './tasks/compile';
import { extendConfig } from 'hardhat/config';
import 'hardhat/types/config';
declare module 'hardhat/types/config' {
interface HardhatUserConfig {
dependencyCompiler?: {
paths?: string[];
path?: string;
keep?: boolean;
};
}
interface HardhatConfig {
dependencyCompiler: {
paths: string[];
path: string;
keep: boolean;
};
}
}
extendConfig(function (config, userConfig) {
config.dependencyCompiler = Object.assign(
{
paths: [],
path: `./${pluginName}`,
keep: false,
},
userConfig.dependencyCompiler,
);
});