greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.56k stars 1.72k forks source link

TweenLite epxorts not found warnings #269

Closed kdschaffe closed 6 years ago

kdschaffe commented 6 years ago

I'm receiving the following Warnings with 1.20.5, 1.20.6, and 2.0.0(latest):

WARNING in ./~/gsap/TimelineMax.js
31:19 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/CSSPlugin.js
18:4 export 'TweenPlugin' was not found in './TweenLite'

WARNING in ./~/gsap/CSSPlugin.js
28:33 export 'TweenPlugin' was not found in './TweenLite'

WARNING in ./~/gsap/CSSPlugin.js
2810:10 export 'TweenPlugin' was not found in './TweenLite'

WARNING in ./~/gsap/CSSPlugin.js
2894:2 export 'TweenPlugin' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
24:27 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
29:14 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
56:27 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
92:30 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
119:34 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
141:36 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
164:41 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
213:32 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
301:26 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/EasePack.js
351:12 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/TweenMaxBase.js
197:94 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/TweenMaxBase.js
197:153 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/TweenMaxBase.js
197:192 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/TweenMaxBase.js
199:93 export 'Ease' was not found in './TweenLite'

WARNING in ./~/gsap/TweenMaxBase.js
199:112 export 'Ease' was not found in './TweenLite'

This occurs without any usage/imports of gsap in my application.

I'm using webpack 2.1.0-beta.20.

jackdoyle commented 6 years ago

Sounds like you need to update Webpack. Those modules are definitely exported in GSAP, so this sounds like an issue in that old beta version of Webpack.

kdschaffe commented 6 years ago

Yeah, I wondered that. Just noticed the latest versions of gsap were dealing with the module system. Also, it works fine in 1.20.4 and 1.20.3 (haven't gone back any further). I'll see if I can find out more, though. Thanks for the quick response.

jackdoyle commented 6 years ago

That version of Webpack may just work better with the older UMD style, which is still available in the latest GSAP release - it's just in a /umd/ subfolder. So you'd import like this for example:

//notice the /umd/ in the path
import { TweenMax, Power2, TimelineMax } from "gsap/umd/TweenMax"; 

Does that clear things up?

kdschaffe commented 6 years ago

Sure does. I tested out the alternative import and that gets rid of the warnings and works just the same. Thanks for the help.

jackdoyle commented 6 years ago

Excellent! Enjoy!