Do you want to request a feature or report a bug?
What is the current behavior?
I would expect the following sequence to remove all development dependencies from the project but it does not.
yarn install yarn install --production
If the current behavior is a bug, please provide the steps to reproduce.
git clone https://github.com/ajhool/yarn-dependency-behavior.git cd yarn-dependency-behavior yarn install //moduleD only has devDependencies so ./packages/moduleD/node_modules is populated. yarn install --production // observe that ./packages/moduleD/node_modules is still populated despited only include devDependencies.
What is the expected behavior?
Yarn install && yarn install –production should be idempotent, it should not matter if I call
yarn install before
yarn install --production
If the current behavior is expected, then perhaps an explicit statement in the
yarn install --production documentation or an execution-time warning would be helpful. A lot of people simply run
yarn install --production before zipping and deploying their code.
Please mention your node.js, yarn and operating system version.