yarn workspaces focus — Yarn CLI reference
Install a focused set of workspaces
yarn workspaces focus
Install a focused set of workspaces
This command runs an install as if the specified workspaces, and the workspaces they depend on, were the only workspaces in the project. If no workspace is listed, Yarn focuses the active workspace.
This command has limited impact when using zero-installs, since the cache already contains all packages. In that case, the main difference between a full install and a focused install is a few extra lines in the .pnp.cjs file, at the cost of additional workflow complexity.
If the -A,--all flag is set, the entire project will be installed. Combine with --production to replicate the old yarn install --production.
Install all workspaces in the project
Exclude development dependencies from the focused install
Format the output as an NDJSON stream