Skip to content
Advertisement

pnpm in monorepo – how to run a command only in a specific package?

Let’s say I want to install a package in a specific package in my monorepo, how do I do this from root?

in npm, you can do this with something like this:

JavaScript

I searched the docs and I can’t find a way to do this in pnpm.

Advertisement

Answer

It is called “filtering” in pnpm docs (see it here).

In this case, you would run:

JavaScript

or

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement