We know how the dependencies work in NPM. My question is, how can I create a common-library that provides dev dependencies to multiple other components?
Let's say I have a microservice architecture where all the components use mocha and nyc for running the tests.
I don't want to go into each separate component to add them, but to manage this "testing framework" from one central library in devDependencies
- however since they are not transitive, they are not installed. I cannot also put them in dependencies
because they are not relevant in production mode...
Is it possible in NPM?
I've Searched for the same but sadly, the response is :
no, this isn't possible in NPM.
Adding them directly inside the peerDependencies
list and counting on the three shaking to make it work.