R
R
RShtefan2020-04-17 18:31:32
webpack
RShtefan, 2020-04-17 18:31:32

What are the concepts of working with webpack?

I'm studying the development and caught a conceptual plug. Immediately make a reservation shoveled everything I could find, even in English. During the creation of the sample application, it became necessary to clean up the structure of the project and optimize the code by getting rid of bulk JS connections, HTML repetitions, and file merging. Useful in webpack - I liked it. I studied the configuration, everything seems to be fine, BUT ... A conceptual mess arose in my head, namely ...
1. In webpack, you can create a front in different variations, except for PHP. It is possible, however, to pervert somehow, and with the help of BrowserSync or Laravel-mix, force PHP to be processed somehow, but, as far as I understand, these are crutches.
2. You can work with the database in webpack using NODE.JS, but this is a separate issue for projects that plan to host on a VPS (i.e. a separate hemorrhoid with creation and maintenance) or a choice from a limited number of hosting, which is somehow support, plus deep learning NODE.JS.
3. You can include HTML using PUG or LODASH, etc., but there are also syntaxes that you need to get used to and there is not much confidence in their necessity yet ...
QUESTIONS:
1. How do backenders work after creating a front in webpack, if the backend is planned in PHP (I somehow can’t believe that everyone jumped straight to the node)? Even if they are given an unbeaten build, do they then have to shovel all this with pens in one or two files? And if they are given the source code, how then to assemble the project and in general, why then webpack?
2. If the project is completely built on HTML + JS + CSS, since this is what webpack is designed for, then apparently some kind of API for backenders should be created? If yes, then please poke into something, where to see how it looks and how the backend is made in PHP.
3. If there is any sane answer to question 2, is it possible to somehow solve the problem with HTML inclusion without perversions, at a level, approximately, how it is solved using PHP?
4. Since I am a student, I would not like to get into frameworks right away. Is it possible to use webpack effectively without them?
5. Maybe someone has some info on working with PHP and databases in webpack and on the concepts of development processes in general?
Thanks in advance for any info!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2020-04-17
@RShtefan

mixed people and horses.
developers get the source and webpack config. launch webpack and get the assembled code.
php and database webpack can and can, but I can’t even imagine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question