Are there any advantages to using Lerna with Yarn workspaces?

后端 未结 2 2090
不思量自难忘°
不思量自难忘° 2021-02-07 17:35

We\'re in the process of migrating our monorepo to use Lerna.

Lerna supports both NPM and Yarn and furthermore allows configuration of use with Yarn workspaces. It\'s un

2条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 18:29

    After some investigation, I've found the following differences:

    1. Using NPM results in a package-lock.json file for each package where using Yarn only creates one in the root of the project.
    2. Yarn workspaces seems to have better support for resolving possible conflicts in the dependency tree (given that dependencies are declared in the module where they are used, see this issue)

提交回复
热议问题