ScrollMagic can not work with GSAP?

Hi all, I'm trying to learn animation scroll and want to try this for ScrollMagic together with GSAP, but I couldn't compile your file. I use laravel.mix for webpack, as a collector project.

I tried to search the answer in Internet and the only thing I found: you need that to gsap connected to scrollmagic, actually, I did have sort of..

What am I doing wrong? And how to fix it, that would work?

My javascript looks like this:
import {TimelineMax} from 'gsap';
import ScrollMagic from 'ScrollMagic';
import 'scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators';
import 'scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap';

let tl = new TimelineMax();
let firstMan = document.getElementById('first-man');
tl.to(firstMan, 1, {x:'-100', y:'70'});

let controller = new ScrollMagic.Controller();
let scene = new ScrollMagic.Scene({
 duration: '100%', // resposive duration in %
 offset: 0, // offset the trigger position by 100px
 triggerElement: '#firstTrigger', // what will trigger the scene
 triggerHook: 0
});

scene.addIndicators({name: 'bla bla'});
scene.setTween(tl);
scene.addTo(controller);


So look in my dependencies for the project:
5c99b7f796d57364976138.png

But when I try to run this code, it gives me the following error:
5c99b80fe9e74904199626.png

Okay, I tried what he asked:
5c99b82acff6b638576958.png
March 19th 20 at 08:35
1 answer
March 19th 20 at 08:37

Find more questions by tags WebpackJavaScript