From 68fdf28834daffe5b5432fd60439d3e279eed312 Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Sat, 4 May 2024 10:31:08 -0500 Subject: [PATCH] document optional npmrc option Added based upon discussion in https://github.com/pnpm/pnpm/issues/8050 --- docs/npmrc.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/npmrc.md b/docs/npmrc.md index a1096d760d35..9621fec0c6ea 100644 --- a/docs/npmrc.md +++ b/docs/npmrc.md @@ -109,6 +109,17 @@ With this layout, most of the packages in the ecosystem work with no issues. However, if some tooling only works when the hoisted dependencies are in the root of `node_modules`, you can set this to `true` to hoist them for you. +## Other Dependency Settings + +### optional + +* Default: **true** +* Type: **Boolean** + +By default, pnpm installs `optionalDependencies` of your dependencies and their +transitive dependencies. If `optional` is set to `false`, pnpm will not install +optional dependencies, just like if you use the `--no-optional` CLI option. + ## Node-Modules Settings ### store-dir