.yarnrc

.yarnrc files allow you to configure additional Yarn features. The config command may also be used to set these options. Yarn will merge .yarnrc files up the file tree.

yarn-offline-mirror

yarn-offline-mirror "./packages-cache"

Maintain offline copies of your packages for more repeatable and reliable builds. Find more information here.

Value must be a relative file path, or false to disable the mirror (default).

yarn-offline-mirror-pruning

yarn-offline-mirror-pruning true

Control automatic pruning of the offline mirror. Find more information here.

Value must be a boolean, defaults to false.

disable-self-update-check

disable-self-update-check true

When installing packages, Yarn will provide upgrade instructions if you have an outdated CLI installation. You can disable this check here.

Value must be a boolean, defaults to false.

child-concurrency

child-concurrency #number#

Controls the number of child processes run parallely to build node modules.

Setting this number to 1 will cause the node modules to be built sequentially which can avoid linker errors on windows with node-gyp.

CLI arguments

Setting --<command><flag> <value> in .yarnrc would be the same as running yarn <command> --<flag> <value>.

Example:

$> cat .yarnrc
--install.check-files true

Is the same running yarn install --check-files

Example 2:

$> cat .yarnrc
--cache-folder /tmp/yarn-cache/

$> yarn cache dir
/tmp/yarn-cache/v1