How to deduplicate dependencies between multiple packages?

To set the mass:

  • I am working on a large site with several developers working on several modules at once.
  • The code for these modules is in different repositories.
  • Modules are supplied separately.
  • All of these modules are embedded in scripts using and share common dependencies (e.g. ).
  • The scripts associated with the modules are downloaded separately on the page.

This creates a massive duplication script problem. There are 5 modules on the page that depend on React ^ v15.3.0. Thats 133K x 5 React dependency only.

How to deduplicate dependencies between multiple packages?

I am open to considering higher-level abstractions for continuous deployment, grouping, etc. (for example, using a monolithic repository template, if this is useful in some way.)

+4
source share

Source: https://habr.com/ru/post/1659525/


All Articles