So I have a Laravel Metronic 8 app and I'm trying to understand how the asset compiling works. There are a lot of folders and a lot of code and directories in resources/assets
:
- core
- demo8 (chosen demo)
- extended
Questions:
1. What are all these folders?
2. Why are core and demo folders so similar?
3. How are they being compiled exactly?
For eg. according to webpack.mix.js
in line 51 it says "build Metronic css/js". What does this mean? Are these the main js assets? In line 54 it loads the following script:
.scripts(require(`./resources/assets/${demo}/js/scripts.js`), `public/${demo}/js/scripts.bundle.js`);
Hi,
1. Those folders are the assets folder from the HTML version as the core. We do this way easier to update.
2. Demo folder is a demo level folder, while the core folder assets are shared assets being used by all demos.
3. Core and demo level assets will be combined.
style.scss and scripts.js are the demo level assets.
'resources/assets/demo8/js/scripts.js' is in the demo8 folder.
You can try to use the Inertia plugin to integrate with Vue. It has been made specifically for Laravel.
https://laravel.com/docs/9.x/frontend#using-vue-react
Thanks
I found some extra documentation, which I will read thoroughly.