Suprabha Posted May 26, 2021 Share Posted May 26, 2021 Recently I joined GSAP club, I am trying to run drawSVG locally, but couldn't able to. I am getting export error. Please find the error attachment below. NOTE: I am using vanilla JS, and trying to add it in script like: <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script> <script src="./scripts/DrawSVGPlugin.js"></script> <script> var shapes = "rect, circle, ellipse, polyline" var tl = gsap.timeline({ repeat: -1, yoyo: true }) tl.fromTo( shapes, { drawSVG: "100%" }, { duration: 1, drawSVG: "50% 50%", stagger: 0.1 } ).fromTo( shapes, { drawSVG: "0%" }, { duration: 0.1, drawSVG: "10%", immediateRender: false }, "+=0.1" ) Not sure what I am missing here. Link to comment Share on other sites More sharing options...
GreenSock Posted May 26, 2021 Share Posted May 26, 2021 What does the error message say? My guess is that you're trying to use the ES Module file but your environment is set up to expect a plain ES5 file, thus it'll choke on the "export". If that's the case, just use the .min.js file from the "minified" folder of your zip download: <script src="./scripts/DrawSVGPlugin.min.js"></script> 1 Link to comment Share on other sites More sharing options...
Suprabha Posted May 26, 2021 Author Share Posted May 26, 2021 Thanks a lot, I was finiding min file, but couldn’t able to . Found it in dist now 🔥 1 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