Loading scripts dynamically
I have a page that im trying to optimize for speed which has jquery + a couple other scripts that depend on jquery in useHead(). I don't want these scripts to load on the page until i click a button which changes what appears on the page, but its still the same page. If i put useHead in the components that appear after the button click, they load but take way too long and it errors on my onMounted() where im trying to use those scripts since they arent loaded yet. It even somehow errors my other scripts saying jquery is not defined, seems like when trying to load scripts without refreshing the page they don't even load correctly. How can i load scripts dynamically like in a function on button click without using useHead? it doesnt seem like useHead is going to work at all unless it has some extra options
