Open vinayak-trivedi opened 2 years ago
We can use git submodules
for it, it allows us to share code between multiple repos, read here to get more details
@vinayak-trivedi if we do submodules this is what will need to do. But are we wanting to do this kind of repo structure changes ?
We have a lot of components which are same in all three sites built on next js, we need to find out a way to share the code between all three sites, instead of making it separately
Different approaches which we can use to get the desired result.
Approach 1 - creating a component library
Approach 2 - Use a tool like bit
There are certain tools like bit which allow to reuse the code in different repos, the installation in this works the same as npm packages, one disadvantage of this is that it is not completely free.
Approach 3 - use git submodules