IvanChen Posted February 7, 2020 Posted February 7, 2020 I install gsap-bonus.tgz with Vue-cli 4 and follow the tutorial. Then setting up as bellow. //main.js import gsap from "gsap"; //Home.vue let obj = document.getElementById("test"); gsap.from(obj,1,{opacity:0.1,y:30}) I used gsap in my component but got "ReferenceError: gsap is not defined".
OSUblake Posted February 7, 2020 Posted February 7, 2020 gsap is not global when using modules. You need to import gsap inside every file. 3
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