A
A
Abc Edc2015-09-18 19:07:08
JavaScript
Abc Edc, 2015-09-18 19:07:08

How to create a modular client in laravel?

It is clear that the client application is not going to a single. And the page is rendered on the server. But still, I want each page to have one js module and, accordingly, there should be some kind of core js. I threw a router. And then I thought that if it’s stupid to connect different js files to the page in the blade. That is, news.blade will directly contain the corresponding modules in the bady. But firstly, this is somehow very smeared, and secondly, what about concatenation and minification, so this approach is probably a holy fool. Therefore, I expect cool practices from you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-09-18
@gleber1

I have only one question - why? No savings, we smear the client code according to templates, no optimization, no profit.
What I recommend to you is webpack/browserify/jspm/etc, then you will have all the power of modules and bundles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question