Jump to content
GreenSock

folktrash

Using webpack, TimelineMax has references to TweenLite?

Recommended Posts

Using webpack to bundle, I import:

 

import TweenMax from 'javascripts/gsap/TweenMax.min';
import TimelineMax from 'javascripts/gsap/TimelineMax.min';
 
And at build time:
ERROR in ./src/javascripts/gsap/TimelineMax.min.js
Module not found: Error: Cannot resolve module 'TweenLite' in /Users/nvvaughn/Code/play/webpack-css-example/src/javascripts/gsap
 @ ./src/javascripts/gsap/TimelineMax.min.js 290:48-72
I just cloned the repo a two days ago. 
Link to comment
Share on other sites

Hmm, seems this is something to do with webpack. Weird that it's a reference to TweenLite and not TweenMax. Maybe they both register as TweenLite?

Link to comment
Share on other sites

Adding

externals: {
    'TweenLite': 'TweenLite'
}

Resolved the issue.

  • Like 3
Link to comment
Share on other sites

  • 2 months later...

I think this has to do with the fact that webpack has a define method as well module

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