Handling dependencies for internal packages. #9115
-
SummaryI have started building microfrontends with next.js and turbo repo. I have a few internal packages created that depend on libraries like redux, tanstack react query, or material ui. So far, everything is functional or so I think. I'm unsure whether to put these dependencies in the internal package's package.json > dependencies or package.json > peerDependencies. What's the best practice? Would using dependencies or peerDependencies make any difference? Here's an example package.json of my ui internal package. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
In general, That said, you may care more about this distinction if:
|
Beta Was this translation helpful? Give feedback.
In general,
dependenciesare things that run in production anddevDependenciesare things that you only need while developing.That said, you may care more about this distinction if:
devDependencieswill create smaller package downloads.--productionflag with your package manager to have faster install times in CI.