Hi GSAP
I'm facing a new issue to make the scrolltrigger working properly in next js 13.4 when switch between pages,
I have done 2 pages with gsap and scrolltrigger in next js (home page, about page), there is no issues if i just visit one of the page,
if i go to home page first then about page, and then scroll further down in about page, and then redirect back the home page again, the problem
happended, it looks like the scrolltrigger positions were all incorrect, it seems like not been cleaned properly.
I have been search online for the solution, and try to use gsap context to wrap all the animation and scrolltriggers, then return to clean with context revert function as recommended from the offical website, i also put ScrollTrigger.refresh() to reset its positions or animations, after i use ScrollTrigger.refresh(), everything works perfectly in dev mode, no problems when i'm swtich between the pages, it aways reset the scrolltrigger to act correctly, but ScrollTrigger.refresh() not working when i deploy with production mode, i tried everything and could not work it out,
it is a bit hard for me to put the code into Codepen as it's a project with routes and dependencies and paths...., so i just attach a image of my gsap code for you as an reference, also a link of the website deployed on vercel
Create Next App (next-cv-psi.vercel.app)