-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to use due to errors #4
Comments
@jeremypeters |
Svane is currently not SSR-ready because it interacts with client-only stuff like |
@jeremypeters I tested with a fresh SvelteKit app and could reproduce your issues. To fix the TS problem, in your layout use To fix the SSR issues, embed Svane like this: <script>
import { Svane } from '@shipbit/svane';
import { browser } from '$app/environment';
</script>
{#if import.meta.env.DEV && browser}
<Svane />
{/if} Both solutions are now also fixed in the Svane docs. Make sure to upgrade to v2.0.1. Thank you! |
Thanks, can confirm that fixed the errors. Just a couple of other issues: 1/ I am using a sticky header and the component is hidden behind that - probably an idea to add a high z-index. |
I've added the
<Svane />
component and import to my main+layout.svelte
and I'm getting the following TypeScript error for<Svane />
:And the error on
npm run dev
:The text was updated successfully, but these errors were encountered: