improve dependency management
indirectlylit opened this issue · comments
Devon Rueckner commented
Currently we have a situation where there is one top-level package.json
file, and:
- some dependencies used by the shared component library (
/lib
) are independencies
- other dependencies used by the shared component library (
/lib
) are expected/assumed to be provided by the library user - all other design system dependencies are in
devDependencies
. This includes both build and run-time dependencies
This situation will be hard to maintain. Preferably, we want:
- Depending on the shared component library be fast and easy:
- install only the dependencies needed in node_modules
- support tree shaking in webpack
- handle situation where dependencies may already be provided by the user (perhaps using
peerDependencies
?)
- When managing design system dependencies, we should be able to distinguish between run-time and build dependencies.
- While using sub-packages might be a good strategy, we've also encountered many developer ergonomics problems with both Lerna and yarn workspaces, so we should approach this strategy with caution