Level 67
@sunscreem This is added with the laravel/ui package in later versions.
If you install laravel/ui with the Vue php artisan ui vue or Vue auth php artisan ui vue --auth commands you will see this return.
1 like
Hey Folks,
We used to have this in laravel (5.6 ish onwards):
const files = require.context('./', true, /\.vue$/i)
files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
In a clean laravel install it used to be in the bootstrap.js file and, as you can see, it auto-loaded all vue components.
There's no sign of this anymore. I'm guessing "best practice" is to load the components as we need them?
If so is that a significant improvement? Seems a bit more faff.
@sunscreem This is added with the laravel/ui package in later versions.
If you install laravel/ui with the Vue php artisan ui vue or Vue auth php artisan ui vue --auth commands you will see this return.
Please or to participate in this conversation.