-
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
Doesn't work with SvelteKit 1.5.0 #134
Comments
Same issue in Astro |
Getting th exact same error |
Same |
I had a slightly different error but also caused by a new sveltekit version, so maybe it will help you too: I used vite-plugin-iso-import as per the svelte docs for client-side only packages (last snippet). It looks like this: <script>
import Carousel from 'svelte-carousel?client';
// ...
</script> You can also remove the vite exceptions in your import { sveltekit } from '@sveltejs/kit/vite';
import { isoImport } from 'vite-plugin-iso-import'
const config = {
plugins: [isoImport(), sveltekit()],
};
export default config; Tested in sveltekit v1.13.0. |
same issue |
With the browser module you can run code client-side only. <script>
import { browser } from '$app/environment';
import Carousel from 'svelte-carousel';
export let testimonials;
</script>
{#if browser}
<Carousel>
{#each testimonials as testimonial}
...
{/each}
</Carousel>
{/if}
Works for me in SvelteKit v1.20.4 |
same issue on svelte 4 |
I get error in the title when trying to use it like this in SvelteKit 1.5.0:
using code:
Versions:
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.5.0",
"svelte": "^3.54.0",
"svelte-carousel": "^1.0.23",
"vite": "^4.0.0"
The text was updated successfully, but these errors were encountered: