hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

Consider dynamic imports for plugin dependencies

Open kanej opened this issue 10 months ago • 1 comments

When defining the dependencies of a plugin it would be better if the dependency was dynamically imported rather than forcing the loading of the plugin as happens currently:

import hardhatIgnitionPlugin from "@ignored/hardhat-vnext-ignition"

export default {
  id: PLUGIN_ID,
  npmPackage: "@ignored/hardhat-vnext-ignition-viem",
  dependencies: [
    async () => hardhatIgnitionPlugin
  ]
}

kanej avatar Feb 14 '25 16:02 kanej

Can we check whether all Hardhat plugins (and built-in plugins) are using dynamic imports. If they are we can close this issue.

kanej avatar May 27 '25 13:05 kanej

Closing this as all packages have follow required standards

ChristopherDedominici avatar Jun 10 '25 09:06 ChristopherDedominici