简体   繁体   中英

Yarn workspaces and yarn link

I have a workspaces project like so:

/project
  - package.json
    /packages
       /project-a
          package.json
       /project-b
          package.json

project-b depends on project-a . Inside workspaces everything is running fine. Now I want to use project-b inside another (new) npm project. Normally yarn link would work, but because of the dependency on project-a this will not work. Is there a correct way to do this?

I've tried yalc and publising to npm which both work, but I like to know if there's an alternate lerna/yarn/npm solution I am not aware of.

I am using verdaccio for this now; https://github.com/verdaccio/verdaccio Verdaccio allows to create a local npm registry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM