Jump to content
Search Community

colorProps not tweening in production release

Martin Shuttleworth TM test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hey, I'm having a bit of a weird issue, everything is fine whilst running in development - the codepen above is absolutely fine. However when I make a production release with webpack (the project started as an ejected react project), none of the values are changed on update. It feels like a scoping issue, but the onUpdate is called with the correct scope.

 

I've tried tweening the colors as props of a separate class object, I've tried creating a new local object and tweening that, nothing appears to make it back from colorProps updated.

 

If I production build the contents of that pen I just get the following output 29 times - in development you see the correct updates.

 

0 0

16777215 16777215
 

Does anybody have any ideas?

See the Pen gJQNKR?editors=1111 by fr1n63 (@fr1n63) on CodePen

Link to comment
Share on other sites

3 hours ago, Martin Shuttleworth TM said:

However when I make a production release with webpack (the project started as an ejected react project), none of the values are changed on update.

 

Strange. Webpack never causes issues. ?

 

I'm obviously lying. Webpack drops unused imports which would be those unused vars.

https://greensock.com/docs/NPMUsage

 

  • Like 2
  • Haha 1
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...