Adding Solidity dependencies with pnpm instead of forge submodules #37
Unanswered
nnnnicholas
asked this question in
Q&A
Replies: 1 comment
-
Thanks for your question, @nnnnicholas. It is true that I now prefer Node.js packages over git submodules for dependency management, but I am no longer recommending PNPM for the reasons provided here. I am currently exploring alternative options, but I will likely go with Bun. Nonetheless, the principle is the same, so the answer to your question is yes. To install OpenZeppelin in forks of this template, you simply add it as an npm package dependency. But you also need to add this remapping: @openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ For more examples, you can have a look at Sablier V2 Core, which implements this approach at scale. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @PaulRBerg! I saw that you, like me, prefer using pnpm for solidity dependency management instead of the rather finnicky forge submodules. The readme doesn't mention it, but I presume you would just
pnpm add @openzeppelin/contracts
, for example, in forks of your template repo?Beta Was this translation helpful? Give feedback.
All reactions