Closed r0skar closed 6 years ago
Well, the default "gsap" package is actually just TweenMax (and all of its contents) which doesn't include TextPlugin. So that's why it's not exported, but of course you can import it directly from "gsap/TextPlugin" as you said.
I didn't quite understand your question, though - are you asking why the UMD version would cause TweenLite to be bundled twice or were you saying you think there's a problem with TextPlugin or something else? It might help if you provided a reduced test case that I can run on my end to see the issue. I'd be happy to take a peek. And you are using the latest version, right? (2.0.1)
Hey - thanks for the explanation. About my issue: after digging into it, i think it is actually related to my webpack config.
Yeah, it kinda smelled like a webpack thing. Thanks for letting us know. Don't hesitate to post back here if/when you figure out a solution in case someone else runs into a similar problem.
Is there a specific reason why the
TextPlugin
is not exported just likeTweenLite
,TimelineLite
etc.?I noticed that its there, but when trying to import it directly, it doesnt work.
import { TextPlugin } from 'gsap/TextPlugin'
While importing it as UMD module works, it causes webpack to bundle
TweenLite
twice.