Skip to content
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

Sveltekit support #3

Open
rbozan opened this issue May 28, 2024 · 3 comments
Open

Sveltekit support #3

rbozan opened this issue May 28, 2024 · 3 comments

Comments

@rbozan
Copy link

rbozan commented May 28, 2024

Hi, it doesn't work when using Sveltekit because of serverside rendering:

Error: <Countup> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <Countup>.

@saadeghi
Copy link
Owner

…why rendering it on server? it's for browser

@rbozan
Copy link
Author

rbozan commented May 29, 2024

I understand that it's for the client and rendering on the server would be pointless but because of server side rendering Sveltekit will try to render your component on the server. Usually the component will have a check in place if you are on the server, and if so it will not try to render it on the server to avoid this error.

So I mean there should be a check in place to disable rendering on the server so we can use the component in Sveltekit.

@saadeghi
Copy link
Owner

Can you share a minimal reproduction link please? Because I'm also using it on sveltekit and there's no issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants