I'm having trouble importing ScrollTrigger in my React app.
I'm importing it like this:
import {ScrollTrigger} from "gsap/ScrollTrigger";
This is the error I'm getting and I don't know how to go about it. The error is coming from ScrollTrigger.js in the node_modules.
import { Observer, _getTarget, _vertical, _horizontal, _scrollers, _proxies, _getScrollFunc, _getProxyProp, _getVelocityProp } from "./Observer.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
Here is a pic of the ScrollTrigger.js file: