0👍
✅
Well, for Vue to load a component the Vue package would have to be currently loaded otherwise Vue wouldn’t be scanning for it’s component tag.
One idea would be to split the Vue package from your main JS file using Laravel Mix’s Vendor Extraction then only require it on pages you know need it. To require it for only a certain route you could make a Blade template that acts as a wrapper for your other views, but the way I like to do it is in your main parent template have a section at the end of the <body>
tag and then in your views just include the vendor file, maybe even just make a mixin or something.
I know it’s not the best answer but I hope it helps! 🙂
Source:stackexchange.com