How to actually manage single-version policy for deployments #9939
31i0t
started this conversation in
Show and Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've frequently heard it's best practice to have a single
node_modules
folder andpackage.json
(with deps) at the root of the project so that every app shares the same versions of packages. But then, this means that when you deploy, you have to install every dependency across all of your projects. ThegeneratePackageJson
flag also isn't much help because it populates peer dependencies by looking in thenode_modules
folder. I made an executor to combat this which installs a minimum amount of dependencies in the root, and can find all dependencies needed for a project by resolving peer dependencies via checking the npm registry and dependencies for any projects inlib/*
for a lightweight deployment.Let me know if you've found better solutions to this problem!
Beta Was this translation helpful? Give feedback.
All reactions