Install devDependencies and dependencies together with yarn
Solution 1
I don't think it is possible. Documentation does not specify such option, and if you provide at least one flag modifying type of dependencies - all dependencies specified in a command will become this type. If you really want to be one command to paste into command line you could do this:
yarn add react && yarn add webpack -D
Solution 2
yarn install --production=false
should be helpful here I suppose. It should install both devDependencies
and dependencies
. Here is a link to the reference. https://yarnpkg.com/lang/en/docs/cli/install/
Comments
-
Pranesh Ravi over 3 years
Is it possible to install
devDependencies
anddependencies
together with yarn?For example, if I want to install
react
andwebpack
. React is a dependency and webpack is a dev dependency. To install both, I need to run these two commandsyarn add react yarn add webpack -D
Is is possible to combine them into one command or is there any alternative? Like installing both devDependencies and dependencies at the same time without running multiple commands.