GSAP TweenMax
-
When I install gsap via
npm install gsap
and import in index.vue via:
<script> import {TweenMax} from "gsap";
I can reference TweenLite in a method:
methods: { draw() { TweenLite.to("#c1", 1, {opacity:0.5, rotation:45});
But when I try to reference TweenMax, I get an error
TweenMax.to("#c1", 1, {opacity:0.5, rotation:45}); Vue warn]: Error in event handler for "click": "TypeError: Cannot read property 'to' of undefined"
Any idea why TweenMax is not resolved? It looks like all the modules are available under node_modules/gsap…
confusing…
Thanks! -
if I use:
import TweenMax from 'gsap'
it works… maybe a babel or webpack thing…