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:
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);