[Vuejs]-Usage of custom npm packages using vue-loader

0👍

Just like any other package, just npm install gsap --save

0👍

As mentioned by gurghet, you would first have to install the package by running the suggested command

npm install gsap --save

Then to use the package you would have to import the needed modules from the package in your own code as follows

// Typical import
import {TweenMax, Power2, TimelineLite} from "gsap";

// Or get to the parts that aren't included inside TweenMax (works as of 1.19.1):
import Draggable from "gsap/Draggable";
import ScrollToPlugin from "gsap/ScrollToPlugin";

This is pretty much the same install procedure listed at npmjs.com/package/gsap

Leave a comment