We have a client side app which is based in React JS framework. Recently we created a new application and we wanted these apps to share components. For example a UI library. We have them in the same repo and webpack handles their bundling.
We want to break this big repo into smaller. Each of them will have a dedicated environment for debugging and testing. For example we can create a small library for various validation functions.
Something that concerns us is how we can debug these individual repos together. How to properly setup the development environment. How we can have them all locally and when we make a change into one, to have the others get this change and immediately see if it works or not. What tools we can use to switch from one project to another?
I'd actually discourage using submodules, because it has its problems which you can read about in this article.
Instead, I recommend using npm packages. Since you're working with Node, you're probably already familiar with npm. You can either host your own npm registry for private packages in your organization, or you could make use of private 'git' npm packages. Since npm v1.0.26 you can specify (private) git URLs for packages. Read this article for more information.
TL;DR Don't use git submodules, using private npm packages.
Nicos Tsourektsidis
Update; We also found that cloudflare is using Lerna to keep multiple packages into one repo to simplicity their development process.
https://blog.cloudflare.com/cf-ui/