If I invoke yarn add <my-package>
, Yarn will install both dependencies and devDependencies of <my-package>
. Is it normal behavior ?
I checked the documentation but I couldn't find a way to prevent it from installing the development dependencies (which I don't need). I believe devDependencies are the dependencies that were used to compile the sources into the build scripts. And building my app I just need the builds.
Use --production=true
(or simply --production
or --prod
for short). It is indeed normal behaviour; Yarn assumes you are in a 'development' context unless your NODE_ENV environment variable is set to 'production'.
Have a look at Yarn's documentation.