Home » vue » Laravel + VueJs: MPA architecture

Laravel + VueJs: MPA architecture

Posted by: admin November 26, 2021 Leave a comment


I’ve created a website using Laravel+VueJs.

And there is a little issue in my understanding about which architecture of routing is better to use.
Now this app has the following structure:

  • Routing system is provided by Laravel;
  • Javascript files that include VueJs framework are divided into files for each html page (e.g: products page loads products.js from public/js folder and so on… )

That system works fine, each web page is loading lib.js file which contains every library or frameworks needed for frontend. It has around 700KB when minified by the webpack. Then we have smaller javascript files (2-3 KB each) for each web page. In general, each page loads 2-3 javascript files.

In conclusion, I wanted to know if it is a good architecture and whether should I consider to use it in the future or should I use a different type of structure. If it’s not a good option, then which would be the best choise and what technology / plugin should I use?


if you app is going to be SPA I advice you to :

  • use laravel routing for API
  • use vue-router for your application