svelte-carousel
svelte-carousel copied to clipboard
make sveltekit look more idiomatic
Using the $app/env
we can make this look much more idiomatic. While still ensuring the code only runs in the browser.
The compiler is not entirely happy as it still complains:
svelte-carousel doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
but the resulting code seems to work fine