问题
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