C
C
cester2020-03-24 10:17:42
JavaScript
cester, 2020-03-24 10:17:42

Multiple projects on same domain, webpack/apache?

Good afternoon! Please help me solve this problem.
There is a project on react / webpack which is divided into modules, which are interconnected only by a link from one to the other and which can be separately built.
Such a structure

-App
    -react1
        ...
    -react2
        ...


And this is how the folder with the build looks like
-dist
    -react1
        index.html
        bundle.js
    -react2
        index.html
        bundle.js


These modules must work on the same domain.
The question is whether it is possible to configure the server so that when
switching, for example, to such a route, the http://my-site.com/react1server gives the appropriate build, in this case c dist/react1/.

What are the options for solving this problem,
is it possible to solve it only with webpack ?

I would be grateful for any help, literature in this direction)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-03-24
@cester

here you practically do not need to do anything, configure your server so that my-site.com/ looks in dist and that's it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question