yarn install --production code example
Example 1: yarn add install all packages in package,json
yarn install
Example 2: yarn frozen lockfile
yarn install --frozen-lockfile
Example 3: yarn install production only
yarn install --production
# OR
yarn install --production=true
# OR
yarn install --prod
Example 4: install dev dependency yarn
yarn add nameOfPackage --dev
Example 5: yarn install production only
NODE_ENV=production yarn install