Skip to content

Commit 2d1e149

Browse files
committed
docs: improve injected deps settings documentation
1 parent 3f8c41d commit 2d1e149

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

docs/settings.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,19 @@ Packages are only linked if their versions satisfy the dependency ranges.
13261326

13271327
Enables hard-linking of all local workspace dependencies instead of symlinking them. Alternatively, this can be achieved using [`dependenciesMeta[].injected`](package_json.md#dependenciesmetainjected), which allows to selectively enable hard-linking for specific dependencies.
13281328

1329+
::: note
1330+
1331+
Even if this setting is enabled, pnpm will prefer to deduplicate injected dependencies using symlinks—unless multiple dependency graphs are required due to mismatched peer dependencies. This behaviour is controlled by the `dedupeInjectedDeps` setting.
1332+
1333+
:::
1334+
1335+
### dedupeInjectedDeps
1336+
1337+
* Default: **true**
1338+
* Type: **Boolean**
1339+
1340+
When this setting is enabled, [dependencies that are injected](package_json.md#dependenciesmetainjected) will be symlinked from the workspace whenever possible. If the dependent project and the injected dependency reference the same peer dependencies, then it is not necessary to physically copy the injected dependency into the dependent's `node_modules`; a symlink is sufficient.
1341+
13291342
### syncInjectedDepsAfterScripts
13301343

13311344
Added in: v10.5.0
@@ -1707,13 +1720,6 @@ When deploying a package or installing a local package, all files of the package
17071720

17081721
When set to `true`, dependencies that are already symlinked to the root `node_modules` directory of the workspace will not be symlinked to subproject `node_modules` directories.
17091722

1710-
### dedupeInjectedDeps
1711-
1712-
* Default: **true**
1713-
* Type: **Boolean**
1714-
1715-
When this setting is enabled, [dependencies that are injected](package_json.md#dependenciesmetainjected) will be symlinked from the workspace whenever possible. If the dependent project and the injected dependency reference the same peer dependencies, then it is not necessary to physically copy the injected dependency into the dependent's `node_modules`; a symlink is sufficient.
1716-
17171723
### optimisticRepeatInstall
17181724

17191725
Added in: v10.1.0

0 commit comments

Comments
 (0)