Jump to content
Search Community

Morgan Benton

Premium
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Morgan Benton

  1. Thanks for the suggestions! I added a "resolved" tag to this thread. Is there any other way to mark it as "solved?"
  2. 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!
  3. 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.
×
×
  • Create New...