yarn workspace

To learn more about workspaces, check these links:

yarn workspace <workspace_name> <command>

This will run the chosen Yarn command in the selected workspace.

Example:

yarn workspace awesome-package add react react-dom --dev

This will add react and react-dom as devDependencies in your packages/awesome-package/package.json.

If you want to remove a package:

yarn workspace web-project remove some-package

The example above would remove some-package from packages/web-project/package.json.

© 2016–present Yarn Contributors
Licensed under the BSD License.
https://yarnpkg.com/en/docs/cli/workspace