A
A
Anton Tarara2017-09-28 09:11:36
Node.js
Anton Tarara, 2017-09-28 09:11:36

Is it normal to do a single-file build of a project?

Good afternoon. Is it normal practice to assemble a backend project on Express or on something else into one bundle for production, for example? webpack and so on

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vitaly, 2017-09-28
@vitali1995

Definitely not normal. But maybe you want to protect the code from client encroachment by simulating compilation ... well, such a kind of perversion.

R
RidgeA, 2017-09-28
@RidgeA

I don't see any evidence for this.

K
Klein Maximus, 2017-09-28
@kleinmaximus

And what's the point in that?
I would understand why combine everything into one file for PHP (to speed up - you don’t need to include a bunch of files), but all server files in JavaScript (express, koa, etc.) are loaded at startup and hang in memory all the time the server is running.

A
Anubis, 2018-07-10
@Anubis

If the project uses server rendering for the same React, then I don’t see any other ways, except for building with Webpack - the node does not know about JSX natively.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question