1

I use scrollmagic in a webpack (v4) project. it works fine, but when i want to use "debug.addIndicators" in the Scrollmagic.Scene() i get an error: enter image description here

What is the mistake here?

My imports:

import * as ScrollMagic from 'scrollmagic';
import { TimelineMax, TweenMax } from 'gsap';
import { ScrollMagicPluginGsap } from 'scrollmagic-plugin-gsap';
ScrollMagicPluginGsap(ScrollMagic, TimelineMax);
import 'debug.addIndicators';

The webpack config:

module.exports = {
resolve: {
    alias: {
        'debug.addIndicators': path.resolve(
            'node_modules',
            'scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js'
        ),
    },
},
....

The use of debug indicators:

new ScrollMagic.Scene({
    duration: sliderImagesContainerHeight,
    triggerElement: '#trigger1',
    triggerHook: 0.25,
})
    .setTween(indicatortween)
    .addIndicators()
    .addTo(controller);
pkberlin
  • 812
  • 1
  • 13
  • 31
  • 1
    We at GreenSock don't recommend ScrollMagic. Instead we recommend the official GSAP scroll plugin: [ScrollTrigger](https://greensock.com/scrolltrigger/)! It's better in every way. – Zach Saucier Oct 16 '20 at 17:33

0 Answers0