Closed kale-stew closed 2 years ago
Hi, sorry for the late response. I pulled your branch to test it but it says Error: 'Gallery' is not exported by ..\Gallery.svelte, imported by ..\index.js
. I haven't been using svelte for months now and i would appreciate it if you could help.
Currently, when trying to deploy a SvelteKit application that consumes this library using the
import/from
syntax pattern, one encounters an error that the '.svelte' file type is not recognized.This can be resolved by
require
-ing the package instead of importing from it, but that's (1) a workaround and (2) not the syntax used in svelte-image-gallery's docs.This PR addresses that issue by exporting the svelte component through a new default
index.js
as is recommended by the SvelteKit docs on packaging. I've tested these changes in the example repo, as well.Additional info can be found at this SvelteKit FAQ answer about importing packages.