CraigO Posted August 18, 2021 Share Posted August 18, 2021 I followed the solution by OSUblake on how to use imports as a CDN within <script type="module"> to import GSAP. I also added the required registration of gsap.registerPlugin(ScrollTrigger); but console error states that ScrollTrigger is undefined. I did not find any reference on skypack.dev on how to separately import ScrollTrigger plugin. Does the cdn import from skypack.dev for GSAP also include ScrollTrigger or does it need to be imported separately ? Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 18, 2021 Solution Share Posted August 18, 2021 ScrollTrigger is a plugin - it's not part of the core GSAP file. Have you tried this? import { ScrollTrigger } from "https://cdn.skypack.dev/gsap/ScrollTrigger"; Side note: please don't double-post your questions ; once is enough. 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