yarn to install as dev dependancy code example
Example 1: install dev dependency yarn
yarn add nameOfPackage --dev
Example 2: yarn save dev
yarn add <package...> [--dev/-D]
yarn add nameOfPackage --dev
yarn add <package...> [--dev/-D]