How to only load Spark stuff on relevant pages?
Spark seems to load a whole load of extra stuff that I don't need most of the time - bootstrap, jquery, the Spark object etc. App.js is massive and the load/rendering times are killing google pagespeed scores. I want to run as lean as possible and only use the spark stuff on the registration and settings/subscription pages.
Do you think it's better to 1) create an alternate app.js and app.blade template for use everywhere else or 2) modify the main app.js to conditionally load everything somehow?
I've started going down the first route but find myself needing to duplicate stuff e.g. modals, enabling axios etc and just wondering if there is a better path before I commit to it. One concern with this approach is that when users get to the registration page then they have to load the whole spark js file right at the point where they are about to hopefully purchase something.
FWIW I am using Vue quite a bit with dynamic imports on my components.
Please or to participate in this conversation.