Morgan Benton
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Morgan Benton
-
-
Yes! That fixed it.
Do you have any suggestions for ways to reduce bundle size? For example, is there a way to get the repeat/yoyo effect while still just using TimelineLite?
I haven't really begun my optimization process in earnest, yet, but the changes above increased the bundle by 75k.
Thanks!
-
I'm building a VueJs component, and when I build in production mode, the yoyo and/or repeat properties are not working. Here's the relevant bit of my code:
// import libraries import { TimelineMax, Bounce, Back, BezierPlugin, CSSPlugin } from 'gsap/all' // create a timeline const tl = new TimeLineMax({ paused: true }) // add a pulsing glow (uses a custom CSS variable) tl.to('div', 1, { '--some-var': '20px', repeat: -1, yoyo: true }) // fire it up! tl.resume() // eslint-disable-next-line no-unused-vars const dontTreeShakeBezierAndCSS = [BezierPlugin, CSSPlugin]
The animation works once, but then stops, which seems to indicate that either the `repeat` or `yoyo` (or both) is getting tree-shaken or is otherwise not getting included in my final bundle.
It feels like I'm just importing the wrong things. Any ideas on how to fix? Thanks!
P.S. I didn't include CodePen because there's no build step there that would allow me to recreate the problem.
Yoyo/repeat + Vue getting tree shaken?
in GSAP
Posted
Thanks for the suggestions! I added a "resolved" tag to this thread. Is there any other way to mark it as "solved?"