to do a yarn immutable install for all packages it yarn 2 recommends yarn workspaces focus --production --all
, is there a way to do this for just one workspace? reason being I would like to not have all dependencies for everything installed into docker containers for different applications.
Asked
Active
Viewed 5,214 times
4

LiMuBei
- 2,868
- 22
- 27

xenoterracide
- 16,274
- 24
- 118
- 243
1 Answers
4
Yes,
yarn workspaces focus --production
(without --all
flag)
installs production dependencies just for the workspace in current working directory. You can also specify the name of the workspace as an argument, e.g.:
yarn workspaces focus --production frontend

Viktor Vlasenko
- 2,332
- 14
- 16
-
The question and my answer are for Yarn 2, not Yarn 1 – Viktor Vlasenko Jul 23 '21 at 08:59