@La Colonia @einomi @Friebel
It's not an Uglify issue. It's the create-react-app being really strict. There is a line of ES6 code in TweenLite that is causing the build to bailout, and we'll get that fixed.
Note that GSAP is now at version 2.0.0. There's also some new documentation about using npm.
https://greensock.com/docs/NPMUsage
To get the smallest build possible, I would follow this format for now. Import what you need from "gsap/all", and then put everything you import inside an array so it doesn't get dropped by tree shaking.
import {
TweenMax,
TimelineMax,
AttrPlugin,
CSSPlugin,
Bounce
} from "gsap/all";
const activated = [
TweenMax,
TimelineMax,
AttrPlugin,
CSSPlugin,
Bounce
];
That will create a bundle that should look like this. Notice how it imports the TweenMaxBase module, which doesn't include any include plugins.
@GreenSock this line of code needs to be changed again. And _gsScope should be defined just as window. Leaving _gsScope the way it is now will cause TweenLite to be excluded from the gsap bundle. It will still work, but it won't be optimized for production.
export const {Ease, Linear, Power0, Power1, Power2, Power3, Power4, TweenPlugin} = _gsScope;