Skip to content

bug: Flyonui crashes if components runs through ssr #104

@haexhub

Description

@haexhub

What version of FlyonUI are you using?

2.1.0

Which browsers are you seeing the problem on?

All browsers

Reproduction URL

https://github.com/haexhub/flyonui-ssr-bug

Describe your issue

Hi
I have a problem using flyonui with nuxt, but it should be the same for every ssr framework.
I am aware that flyonui only works on the client side and needs to be set up accordingly, which I am doing.
However, my app crashes as soon as I only import classes from flyonui.
import { HSOverlay } from “flyonui/flyonui”; is enough to trigger the “error”. Even if nothing is done with it at all.
I have created a demo component (UiDialog). Even if I want to instantiate the class in the mounted hook first. As soon as I wrap everything in a ClientOnly element I can solve this, but it would be nice if flyonui could handle this better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions