Hi I'm trying to load gsap into my nextjs project. I've got it nearly completed but I am getting this error from the package:
SyntaxError: Unexpected token 'export'
/node_modules/gsap/ScrollTrigger.js:534
line 534:
export var ScrollTrigger = /*#__PURE__*/function () {
Any advice for getting this to work? I've been searching but haven't been able to find any solutions to this problem.
I would assume that gets the UMD version of ScrollTrigger, but the ES Module of GSAP (the core). Shouldn't it look like this?
import { gsap } from 'gsap/dist/gsap';
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";