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.