Jump to content
Search Community

Angular - Webpack - r.TimelineMax is not a constructor

Omarhab test
Moderator Tag

Recommended Posts

my angular app animations works fine precompiled. but after compiling with webpack. The `main.ts` file errors out after starting the universal server with 

 

r.TimelineMax is not a constructor

I tried many things but nothing to report here because this problem did not seem to be caused by a change in the environment. It was working post compile at somepoint. 

 

Can anyone help me understand why compiling with webpack would cause this?

 

 

Link to comment
Share on other sites

Hm, it's tough to troubleshoot blind - what version of GSAP are you using? 

 

If you're using v3, I wonder if you accidentally used the "new" keyword like:

// BAD!
var tl = new gsap.timeline(); 

// GOOD
var tl = gsap.timeline();

Just a guess. 

 

Otherwise, we'll really need to see a reduced test case to help diagnose. Maybe tree shaking bit you? I kinda doubt it with that message, though. 

  • Like 1
Link to comment
Share on other sites

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...