Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by ard.weisrock

  1. Sorry,

    I saw that my IDE doesn't pushed all files to the repo.

    Now all files available. GSAP-ES6 are in node_modules (in testLib and app).

    Please update the project and follow these steps:

    - cd app

    - npm run build

    - npm run dev

    - run http://localhost:8080/ in browser


    In Chrome I get this error:

    Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
        at Definition.check (testLib.js:5964)
        at new Definition (testLib.js:5974)
        at window._gsDefine (testLib.js:5980)
        at gs._class (testLib.js:5987)
        at testLib.js:6001
        at Object.<anonymous> (testLib.js:5844)
        at Object.node_modulesGsapTweenLiteJs (testLib.js:7891)
        at __webpack_require__ (testLib.js:30)
        at Object.node_modulesGsapIndexJs (testLib.js:8602)
        at __webpack_require__ (testLib.js:30)


    If you have to change the testLib, after that you have to build it new:

    - cd testLib

    - npm run build

  2. Of course,

    I have in node_modules the normal version of GSAP in the gsap folder and the es6 version in gsap-es6, to switch between both versions.


    Now I have updated the repo. gsap-es6 is removed and es6 version is copied to node_modules/gsap. Lib an app now use es6 version of GSAP.

    Please open app folder in terminal an run: "npm run dev"

    In console I get "Uncaught TypeError.

  3. Hi Jack,


    I've build a example:




    In the example you have two projects. First is the app und secound the dependency (testLib). TestLib is build as UMD-Library. App imports testLib.

    I've pushed all node_modules in the repo.

    In both index.js you see imports for es6-version and normal-version, so you can toggle it. If you change the import in testLib you have zo re-build.

  4. Hi all,


    in a Project I want to use GSAP. It's a NPM-Project and bundled with Webpack 4.6.0.

    GSAP is imported via

    import {  TweenLite } from "gsap";

    Now TweenLite ist undefined.


    If I import GSAP via

    import TweenLite from "gsap/TweenLite"

    it is also undefined.


    If I alias GSAP in webpack.config it is also undefined.


    The Problem is, that I use a dependency in the project that uses GSAP too. The dependency is bundled as a UMD-Library by Webpack.


    If have the following

    import { someFunction } from "theExternalLib";
    import { TweenLite } from "gsap";

    GSAP in the dependency works fine, but in my app TweenLite is undefined.


    If have the following

    import { TweenLite } from "gsap";
    import { someFunction } from "theExternalLib";

    I can use TweenLite in my app, but in the dependency GSAP is undefined.


    In both examples GSAP on the last import is not available.



    The dependency uses jQuery. If I import jQuery in my app I can use it without any problems and the dependency works too. The jQuery in my app is the one from the appropiate import.



    Many thanks in advance for any help.