// FIGURED IT OUT
I was calling new SplitText everytime the value "fadein" changes which caused a bunch of deeply nested <span> tags and messed up the animation.
Hello,
I've followed this thread https://greensock.com/forums/topic/23007-importing-plugins-in-nuxt/ to install gsap from gsap-bonus.tgz and import the premium plugin, SplitText, like below in a component file:
// in Heading.vue
import { gsap } from 'gsap'
import { SplitText } from 'gsap/SplitText'
if (process.client) {
console.log('registered')
gsap.registerPlugin(SplitText)
}
an