Hello!!
I have a quite heavy question
I'm working on my portfolio website using ScrollTrigger / horizontal scrolling.
Everything was working absolutely fine until i installed webpack in the project recently.
I needed to install it because i also use barba.js for transitions and webpack makes it so easier to handle the scss from page to page when clicking a link to go to another page of the site (no need to code for stylesheet injection in the head tag of the new html page when a link is clicked).
And indeed it's working!
BUT very oddly, when starting the project, now i do not land at the top of the page but somewhere in the middle and it's impossible to scroll!
ScrollTrigger seems to be the issue here, because the barba transitions are working fine...
What happens is: when landing on the page, i see a short flash of the raw html starting from the top (cool) and then (when the JS file is loaded) i get to a certain portion of the website, depending on the xPercent i put in my horizontal-scrolling function...(xPercent: -100 gets me at the 1st section, -200 at the second, -300 at the middle of the site etc... and impossible to scroll.)
I tried everything and cannot figure out why/how to fix this.
Would you have an idea why this is happening?
Any help/hint/link would be highly appreciated!
i learned a lot from this forum sofar, maybe my case can help someone else in the future ^^
Thank you!
ps: my html and js files are very long, i hope i'm not too much of a hassle...
ps2: here is a link to a tweet i posted in december where you can see the scrolltrigger/horizontal scrolling working smoothly in the project. (https://twitter.com/Nightcoder2/status/1333666647429816320)