DEV Community

Chaoming Li
Chaoming Li

Posted on

Question: Is it possible to separate a Reactjs project with git submodules?

The Background

I am working on a new structure of my open source project Fireact which handles the user authentication and subscription payments for SaaS. But the real features of SaaS projects will need to be built on top of Fireact. So I have been thinking is it possible to separate them so SaaS developers can build their features as another Git repo and import it into their Fireact repo as a Git submodule.

The Question

However, there is big challenge I can’t figure out. As submodule repos will need have a bunch of dependencies, it will need some way to modify the package.json in the Fireact repo root folder. How could that be achieved?

Top comments (1)

Collapse
 
chaoming profile image
Chaoming Li

I think I have figured this out. I will write a post to describe how to make React projects modularization in the near future.