How To Use ScrollMagic with GSAP and Webpack : <p>In order to use <a href="http://scrollmagic.io/examples/basic/simple_tweening.html">ScrollMagic with GSAP</a>, you need to load the <code>animation.gsap.js</code> plugin. With Webpack you would do something like this to accomplish that (assuming you use the CommonJS syntax and installed everything with npm):</p>

<pre><code>var TweenMax = require('gsap');
var ScrollMagic = require('scrollmagic');
require('ScrollMagicGSAP');
</code></pre>

<p>To make sure that this actually works, you have to add an alias to your Webpack configuration, so that Webpack knows where the plugin lives.</p>

<pre><code>resolve: {
  alias: {
    'ScrollMagicGSAP': 'scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap'
  }
}
</code></pre>

<p><strong>Unfortunately</strong>, ScrollMagic keeps throwing an error, when you are using this configuration and the CommonJS syntax like above.</p>

<pre><code>(ScrollMagic.Scene) -&gt; ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js
</code></pre>
