greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.56k stars 1.72k forks source link

Vue.js import DrawSVGPlugin not working #397

Closed raulmelo closed 4 years ago

raulmelo commented 4 years ago

What happened to the Plugin? not working with Vue.js

<script>
import { TimelineLite,TweenMax } from "gsap/all";
import { DrawSVGPlugin } from "gsap/DrawSVGPlugin";
const plugins = [DrawSVGPlugin];
export default {
  mounted() {

  }
};
</script>

Terminal This dependency was not found: gsap/DrawSVGPlugin in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/Skill/section/progress-skill.vue?vue&type=script&lang=js&

ZachSaucier commented 4 years ago

Hey raulmelo. What version of GSAP are you loading?

If you're loading GSAP 3 we highly recommend that you don't use the Lite/Max stuff anymore. You can just load the gsap object instead. See the GSAP 3 Migration Guide for more info.

If you're using GSAP 3 you need to make sure you register external plugins using [.registerPlugin()](https://greensock.com/docs/v3/GSAP/gsap.registerPlugin()). See the installation guide for more info. It even has a handy install helper that generates the import code that you can copy and paste until you get more comfortable with it.

jackdoyle commented 4 years ago

Also, in case you weren't aware, DrawSVGPlugin is a members-only benefit for Club GreenSock - it is NOT in the regular github/NPM repo. You need to download it from greensock.com

Sign up at https://greensock.com/club

raulmelo commented 4 years ago

Hey @jackdoyle and @ZachSaucier, Thank you very much, I will become a member of GSAP to have the DrawSVGPlugin plugin.

jackdoyle commented 4 years ago

That's great! Welcome aboard. If you need anything else, please don't hesitate to post your question in our forums. It's a great place to learn. https://greensock.com/forums