Next.js Discord

Discord Forum

How to dynamically load external packages?

Unanswered
English Lop posted this in #help-forum
Open in Discord
English LopOP
Want to load gsap scrollTrigger after page load, how can i do that?
Want something like this, to load scrolltrigger in useGsap hook and then use them.
Or this won't help reduce size of page? Coz only scrolltrigger weight in 17kb

3 Replies

English LopOP
in 2nd screenshot all works fine but page size 146kb, 87 shared + 59 in page
without this client wrapper page size is 89kb
wanna reduce size of page as maximum as i can