📝It is preferable to have a single version of each library

When resolving dependencies, it is preferable to have a single version of each library.

Pros

  • decreased bundle size

  • libraries can interoperate

Cons

Examples

  • npm does a good job trying to satisfy all constraints, but if it cannot, it installs multiple versions of a package (scoped to the dependent). This might lead to incompatibility issues, but sometimes it works fine. (It helps that js is dynamically typed.)

Backlinks