Created
January 6, 2019 20:16
-
-
Save garmjs/7939212858992785f523430878e29b7f to your computer and use it in GitHub Desktop.
Make working scrollMagic and GSAP on Gatsby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// put this on gatsby-node.js file | |
exports.onCreateWebpackConfig = ({ | |
stage, | |
rules, | |
loaders, | |
plugins, | |
actions, | |
}) => { | |
actions.setWebpackConfig({ | |
resolve: { | |
modules: ['node_modules'], | |
alias: { | |
TweenLite: 'gsap/src/minified/TweenLite.min.js', | |
TweenMax: 'gsap/src/minified/TweenMax.min.js', | |
TimelineLite: 'gsap/src/minified/TimelineLite.min.js', | |
TimelineMax: 'gsap/src/minified/TimelineMax.min.js', | |
ScrollMagic: 'scrollmagic/scrollmagic/minified/ScrollMagic.min.js', | |
'animation.gsap': | |
'scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js', | |
'debug.addIndicators': | |
'scrollmagic/scrollmagic/minified/plugins/debug.addIndicators.min.js', | |
}, | |
}, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment