Closed DrupalPhil closed 11 months ago
@DrupalPhil it’s using getServerState"; import { page } from "$app/stores"; amongst other things from SvelteKit. So yeah, only SK support.
Hey @DrupalPhil !
At first I implemented it without this import { page } from "$app/stores"
line which would have made it work with Svelte alone, at the cost of needing more userland code for SvelteKit users.
I'm still not too sure what's the best approach, I personally think it's better to use SvelteKit by default as it does everything Svelte does with more optimizations, especially on an app where you'd use Algolia you'll most likely want features like SSR.
Maybe I should talk to more people in the Svelte community to find out if bare Svelte is still relevant, or if they think SvelteKit is the way to go for all apps.
Seems like SvelteKit is now the default, as running npm create svelte
only initializes SvelteKit projects.
I'll stick to my choice then, as I suspect most users of this library are using SvelteKit, so I added it as peer dependency and will update the README as well !
Using a barebones REPL and your "Basic usage" example to get started, I get this error:
Uncaught ReferenceError: stores is not defined
Is this project only available for Sveltekit?