I know examples are preferred but I am suspicious I wouldn't be able to reproduce this in a pen or repl.
I am using ScrollTrigger and MotionPathPlugin to move an SVG along another SVG path. Everything works fine locally but on production or in a production preview (yarn run build && yarn run preview) the animation does not work (target SVG does not show up) and there is a console error:
ScrollTrigger-4a410f45.js:formatted:524 Uncaught (in promise) TypeError: Cannot r
There is definitely something horribly wrong with how SvelteKit and or Vite handles imports. In production is not even importing ScrollTrigger. What's strange is that it works when importing the minified version. 🤷♂️
// works
import { ScrollTrigger } from 'gsap/dist/ScrollTrigger.min.js';
What's even stranger is that it's mixing imports. It's definitely importing the ES Module version of gsap, but importing the ES Module versions of the plugins doesn't work, which is why you