hand2441 Posted April 9, 2020 Share Posted April 9, 2020 i using bundler parcel my dir src | -- js |-- a.js |-- b.js <!--a.js --> import { gsap } from "gsap"; or import "gsap"; Link to comment Share on other sites More sharing options...
hand2441 Posted April 9, 2020 Author Share Posted April 9, 2020 If you use gsap in b, an error is printed to the console. Link to comment Share on other sites More sharing options...
ZachSaucier Posted April 9, 2020 Share Posted April 9, 2020 Hey hand2441 and welcome to the GreenSock forums! You need to import GSAP into each file that you want to use it in. So you have to import it in both a.js and b.js if you want to use it in both. We also highly recommend using GSAP 3's syntax, especially the condensed string form for your eases. For example, "power3" instead of Cubic.easeOut. See the easing docs for more information. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now