Course lesson

Recursively Run Scripts in All pnpm Workspace Projects

While its convenient to be able to use filter commands to run scripts without having to cd into package/app folders, it's still a tedious task if you need to run commands in several projects at once.

Duration
1 min
Access
Included
Transcript
Retained from source evidence

While its convenient to be able to use filter commands to run scripts without having to cd into package/app folders, it's still a tedious task if you need to run commands in several projects at once.

It's actually very easy to recursively run a script in all projects with pnpm using the -r flag. For example, pnpm run -r build will go through each project in the workspace and attempt to run the build command.