I have recently developed a website using a combination of Laravel and VueJs.
However, I am facing some confusion regarding the most suitable routing architecture to implement. Currently, my application has the following setup:
- The routing system is managed by Laravel;
- The VueJs framework is integrated through separate Javascript files for each HTML page (for example, the products page loads products.js from the public/js folder).
This system seems to be working well as each web page successfully loads the lib.js file containing all necessary libraries and frameworks for the frontend - approximately 700KB in size when minified by Webpack. Additionally, there are smaller Javascript files (2-3 KB each) dedicated to individual pages, resulting in each page loading 2-3 Javascript files in total.
In summary, I am seeking advice on whether this current architecture is effective or if I should explore alternative structures for future projects. If this approach is not ideal, what would be the recommended choice and which technologies/plugins should I consider?