Skip to content

[Revisited] ReferenceError: ResizeObserver is not defined  #141

Open
@asans

Description

@asans

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions