-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Revisited] ReferenceError: ResizeObserver is not defined #141
Comments
Hello, I'm currently facing the same issue and thank you for your pull request :D |
Hi, Can you share the code? |
thankusomuch! |
teonbrooks
added a commit
to teonbrooks/projet-vie
that referenced
this issue
Sep 21, 2024
Got the carousel to work thanks to a PR (vadimkorr/svelte-carousel#141) Added a thumbtack thanks to this codepen: https://codepen.io/jamielife/pen/LpGWWP
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Per #139, this happens because ResizeObserver does not exist in SSR mode.
I am making use of some SSR of a preview page in astro. Setting client:visible doesn't work in this case for the component that relies on the Carousel component.
The issue is that the ResizeObserver is being created on module load.
Instead, what can likely be done here is to move and create the resize observer INSIDE the onMount(), which should solve the issue.
The text was updated successfully, but these errors were encountered: