A
A
Artem2019-03-27 13:25:03
webpack
Artem, 2019-03-27 13:25:03

How to set up webpack for expressjs backend and frontend?

How to competently build a monolith on expressjs using es6 (and / or typescript) both on the backend and on the front? Use one config with two entrypoints? Will it be possible to fasten hot-reload?
UPD. What are the objective reasons not to do so? It should be convenient to combine models and not develop separate backend and separate frontend as two different projects, kmk

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-03-27
@Cruper

Use one config with two entrypoints?

It is better to use different configs with a shared part. For a server, for example, it makes no sense to pull dependencies from node_modules into a bundle. Environment variables can have different values ​​and so on.
Maybe.
How to set up webpack for expressjs backend and frontend?
It all depends on the tasks that you face and the set of tools that you want to use. You can see examples in numerous articles on this topic and on Github.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question