Skip to content

Commit

Permalink
Set prefer-dedupe true in npm configuration
Browse files Browse the repository at this point in the history
This change was applied in Gutenberg:

WordPress/gutenberg#61630

Quoting that :

> The `npm dedupe` command searches
> and attempts to simplify the overall structure of the local package
> tree to allow dependent packages to be shared more effectively. As
> detailed in #61532, reducing the amount of dependency duplication is
> beneficial for a few reasons:
>
> - Fewer packages overall.
> - Faster installation.
> - Less size to transfer and store on disk.
> - Usually bundle size is reduced (although this depends on which
>   versions of packages are used).
>
> However, unless the command is run regularly, the project's dependency
> tree easily falls out of order.

See https://docs.npmjs.com/cli/v10/commands/npm-dedupe
  • Loading branch information
sirreal committed Oct 8, 2024
1 parent 4883bd9 commit 5929b93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
save-exact = true
engine-strict = true
legacy-peer-deps = true
prefer-dedupe = true

0 comments on commit 5929b93

Please sign in to comment.