Install peerDependencies with a base library

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-10 23:33:18

问题


I have a library which depends on another library that has a bunch of peerDependencies. I want to include all the peerDependencies in my library so that apps that use it don't have to worry about them. So they layout is something like this:

base-library:
  peerDependencies:
    - a
    - b

my-library:
  dependencies:
    - base-library
    - (a, b)

app:
  dependencies:
    - my-library (includes: base-library, a, b)

But I can't figure out how to write the package.json in my-library to reflect this. So far, every permutation I've tried has resulting in me needing to explicitly install a and b in app.

来源:https://stackoverflow.com/questions/35483805/install-peerdependencies-with-a-base-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!