A
A
Andrei Smirnov2017-04-27 20:52:25
React
Andrei Smirnov, 2017-04-27 20:52:25

Is it possible to build two reactjs apps in the same webpack config?

There is a large reactjs application. The task is to cut it into two parts.
One part will be called Login - and it will be shown by the server by default.
The second part is the application itself, which the server will give after authorization (there will be a redirect with a token here)
What you want: when deploying, run npm run build and get two folders with two separate applications.
But, I want to edit all this wealth in one environment (I have WebStorm), so that if I change the color of the button, it would change in both applications at once.
Right now it seems like the only option is to make two separate folders, each with its own webpack, and build them separately, but then what's the right way to reuse controls, styles, and other "shared" code?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2017-04-27
@pinebit

Multicompilation with two different configs ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question