In larval gather resources for pages?

In laravale is a wonderful thing - elixir. But as I understand it, she's just happy to shove all into one big bootstrap.css or .js file. And different modules on the website can be set, for example: profiles, authorizations, some blogs, admin, etc. I can Not believe that nothing else came up, well, except NAZIS, of course. Well, a couple of times and handles to prescribe these kits, but it seems to me that this is a bad practice.
By itself, laravel, like, basically holding a differentiated approach. So what to do with the Assembly?
July 2nd 19 at 18:09
1 answer
July 2nd 19 at 18:11
the meaning of the Assembly to collect all in one file. In most cases at least.
Not to terrorize the server with queries and that there is no flicker when loading extra styles.
And overall boot time is reduced by reducing the number of http requests.

Modules-then you no one bothers to do different things in different files, but to gather into one useful and necessary. Of course if there's not 10 megabytes of JS scripts.
Then we separately collect on the "necessary" and functionality: https://laravel.com/docs/5.3/elixir#working-with-s...

elixir(function(mix) {
 mix.scripts(['app.js', 'controllers.js'], 'public/js/app.js')
 .scripts(['forum.js', 'threads.js'], 'public/js/forum.js');
});
Guys from Yandex disagree with you, alas. To collect all in single file is necessary, but within the desired functionality. Now the page is almost the whole app, and then that look. That's not needed for that page have jquery in bold (so, for example, he's not fat), so why did it drag? But if the user can never get to the page where you need jquery? Correctly, the effect is the same, it is like and necesarul your browser, but most of all, without excess. Well, there's always something all there enb and webpack'I. I May not be as described and this is done quite differently. But, like, 2k16 and the terms component approach azhno. Well, just could not think of anything for the needs of laravale, from what I'm asking. - kyle78 commented on July 2nd 19 at 18:14
:
> And if the user can never get to the page where you need jquery?
for that page it can not connect, what's the problem to add a couple of terms in the derivation of the scripts on the page? To the Assembly and component is generally not the case.

Only hardly imagine a page where there is JS in the "2k16". If you are using bootstrap, then you have on each page need to connect it to js+jquery, at least to the menu to deploy on a mobile device/small screen.

not to pull a lot of things, but only what is necessary use any requirejs that pulls only the necessary scripts to the page.
But to collect them, and through elixir, the same in the case with laravel.
In fact, the issue is build to JS laravel is a little more than nothing. Larabel is not a frontend framework. He just gave the opportunity to a couple of lines to collect standard resources for sites that are on the server "are rendered".

And you have issues in the direction of just "entire applications", for which jquery is certainly not necessary to use. For less serious work and component approach is needed for applications with a huge bunch of logic on the front. Much more than form validation and datepicker with the gallery. - bailee_Stant commented on July 2nd 19 at 18:17

Find more questions by tags Gulp.jsLaravel