Search the Community
Showing results for tags 'umd'.
-
Hi there, first of all, I'm not providing a codepen because the issue is related to using UMD modules with a module bundler (browserify + gulp). I'm trying to implement a very simple snippet to scramble a text upon a button click. This is very straightforward and I've done this before successfully. So I will list all the issues and things I've tried. Issue: When calling the TweenMax.to using the scrambleTextPlugin I got an Uncaught RangeError: Maximum call stack size exceeded which is thrown multiple times. Environment: * Greensock ^2.0.2 (gsap) installed through NPM and imported through UMD version * ScrambleTextPlugin (0.5.2 - 2018-09-11) downloaded through GreenSockClub and imported through UMD version * Gulp 4.0 + with Browserify ^16.2.2 as a module bundler. What I've discovered/tried: * Importing the modules through <script> tag makes the same code work without any error * Other properties and plugins are working using the UMD version, e.g text plugin, changing colors, sizes, etc * I've implemented this before, and the same code works * I've removed all layers of my application (JS frameworks, CSS, everything) * Created a blank project to isolate the issue Full code: ```HTML <div id="test-app"></div> <button id="btn"> test </button> ``` ```javascript (function() { "use strict"; require("gsap/umd/TweenMax"); require("../../etc/libs/gsap_plugins/ScrambleTextPlugin.js"); // If I change this to the <script> import the code would work let el = document.querySelector("#test-app"); let btnEl = document.querySelector("#btn"); btnEl.addEventListener("click", function () { TweenMax.to(el, 1, { "scrambleText": { "text": "anytext" } }); }); }()); ``` When I click the button this is what happens: (screenshot attached) PS: Im trying to solve this for some days now and I'm kinda crazy by now, any insight is appreciated Regards,