yarn workspace
优质
小牛编辑
134浏览
2023-12-01
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 --save
The example above would remove some-package
from packages/web-project/package.json
.