New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V5 SSR Compatability #507
Comments
Yeah. I encountered this "bug" while trying out locomotive v5. I wonder why defining Defining it inside the constructor will resolve this issue for us react/next developers too. If we can't move it inside of the constructor function then another workaround is to use a getter function for getting the default options, like: function getDefaultLenisOptions(): ILenisOptions = {
return {
wrapper: window,
content: document.documentElement,
// ...
}
} Currently I have to disable SSR for my |
There is also an SSR compile error ( Would mean a great deal to me and other angular developers to fix it somehow, because this library is essential for webpages in 2023. |
This worked for me with Nextjs. I had the window not defined issue. #506 (comment) |
Hi! Thank for your work! I see, that some people frustrated with
window is not defined
problem. I also counter this. I making Vue wrapper library for your great project. Next lines makes headache:Actually, I didn't get for what there is default lenis options if lenis
constructor
method has same defaults? Moreover, all values fromdefaultLenisOptions
will be overrriden there:Unfortunately I can't dynamic import file.
So, I just propose and ask to remove
wrapper
andcontent
fields fromdefaultLenisOptions
object, as it will solve my and others problem.Can I open a PR?
The text was updated successfully, but these errors were encountered: