Multiple assemblies front Laravel/Vue?

0 like 0 dislike
15 views
Interested in the question of the Assembly of the front a large project with many libraries, when app.js in prod already takes up a few megabytes. How important is split into separate Assembly and not to pull on every page all in one app.js ?
Can't find good examples in the context of Laravel, I would be grateful for links to such projects or a description of my own experience. Thank you.
asked by | 15 views

2 Answers

0 like 0 dislike
That's what you want: https://router.vuejs.org/guide/advanced/lazy-loadi...

Loads parts of the code out of necessity, and caches, of course. However I still don't understand where you got in app.js a few MB of code was typed.
answered by
0 like 0 dislike
something like that https://medium.com/js-dojo/3-code-splitting-patter...

But basically all of the weight from the dependency which is still needed almost everywhere, and will be loaded in any case, only the same pieces. Although it is better than one huge file.

Generally to start to find out exactly where the main piece of code is.
There can be connected any css framework such as and it's all css code in app.js stuffed to the heap.
So first and foremost get rid of this, and then see what happens.
answered by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Jul 15 by Andrey0502
0 like 0 dislike
1 answer
110,581 questions
257,150 answers
0 comments
476 users