stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.29k stars 914 forks source link

Undefined element imported in container class #676

Closed rhernandog closed 3 years ago

rhernandog commented 6 years ago

Hello,

I'm using GreenSock (GSAP) and I have a bit of an issue.

Turns out that GSAP has a main class called TweenMax, which contains the most commonly used tools in the engine, such as TweenLite, TimelineLite/Max, CSSPlugin, etc. So basically in a normal project I import TweenMax, defined the globals in my eslint file and go my usual way:

import {TweenMax} from "gsap/all";

// then in the code I use
TweenLite.to();
const tl = new TimelineLite();

And there's no problem, but when trying that approach in Stackblitz I get the error of those classes not being defined and I get an error.

Is there a way to get some globals into the configuration of the projects?

Thanks, Rodrigo.

tiliev commented 6 years ago

@rhernandog, you should import the two classes you use. Please try the following import: import { TweenMax, TweenLite, TimelineLite } from "gsap/all";

purplem1lk commented 3 years ago

@rhernandog, you should import the two classes you use. Please try the following import: import { TweenMax, TweenLite, TimelineLite } from "gsap/all";

This issue has been resolved and will be closed accordingly. If the issue persists after using the imports listed above, feel free to tag me or ask to reopen this issue with a description and screenshots of the StackBlitz error. Thank you! :)