Build/Test Tools: Configure npm to prefer-dedupe.

`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
This commit is contained in:
Jonathan Desrosiers 2024-10-10 15:56:39 +00:00
parent 292769dde9
commit e9e9d291f1
3 changed files with 935 additions and 924 deletions

1
.npmrc
View File

@ -1,4 +1,5 @@
engine-strict = true
legacy-peer-deps = true
lockfile-version = 3
prefer-dedupe = true
save-exact = true

1856
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long