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.