Skip to content

Commit

Permalink
Build/Test Tools: Configure npm to prefer-dedupe.
Browse files Browse the repository at this point in the history
`npm dedupe` is a command that attempts to simplify the structure of the local package tree by moving dependencies higher up. This allows for more effective package sharing, less transfer, and smaller `node_modules` folders.

This change configures npm to `prefer-dedupe` by default so that these benefits persist and the command is not required to be run regularly.

This also brings better alignment with the Gutenberg repository, which has already configured `prefer-dedupe`.

Props jonsurrell.
Fixes #62190.

git-svn-id: https://develop.svn.wordpress.org/trunk@59207 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Oct 10, 2024
1 parent 292769d commit e9e9d29
Show file tree
Hide file tree
Showing 3 changed files with 936 additions and 925 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
engine-strict = true
legacy-peer-deps = true
lockfile-version = 3
prefer-dedupe = true
save-exact = true
Loading

0 comments on commit e9e9d29

Please sign in to comment.