Answer the question
In order to leave comments, you need to log in
How to combine two large react applications from different reps?
Good afternoon, ladies and gentlemen! There was a serious question over which I struggle the fourth day.
There are two repositories, one is laravel + react (custom webpack) and the other is purely react (CRA).
You need to add the second application to the first as a component (with the ability to simply update the component and continue developing in the second turnip).
What has already been tried?
- I did a regular git clone, but there was a problem with relative paths.
- I did the build via rollup, but some components were not included in the bundle, due to dynamic import
- I made a compiled copy with babel and published the npm package. But when I connect, I get an error:
Answer the question
In order to leave comments, you need to log in
well, there are two options:
- have two react applications on the page, initializing them in different containers
- lead to the same architecture and structure to start with.
the second implies that it is necessary to redo it so that the assembly is the same for all and the same versions of the libraries are used, at least react and all "global" things, such as routing, gql if any, etc. anything that has a global state or uses a react context.
connect as source code - it will be easier to change what needs to be changed, you do not need a separate module.
Naturally, if you want to combine applications at the source code level, then with a high probability this code and assembly will have to be redone either in the first or in the second.
moleculer mb? integrates different applications. even if they are on different machines.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question