K-Sato1995 / svelte-vertical-timeline

Svelte components for creating a vertical timeline⏳⏳
https://svelte-vertical-timeline.vercel.app/
MIT License
75 stars 8 forks source link

Warning with SvelteKit #6

Closed cloudlena closed 6 days ago

cloudlena commented 2 months ago

When running npm run build in a SvelteKit application, I get the following warning:

3:10:59 PM [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

svelte-vertical-timeline@1.0.0

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.
K-Sato1995 commented 2 months ago

@cloudlena

Thanks!! The PR below should address this issue but haven't had time to work on it.

K-Sato1995 commented 2 weeks ago

fixed with https://github.com/K-Sato1995/svelte-vertical-timeline/pull/5

cloudlena commented 2 weeks ago

Awesome! Thank you, @K-Sato1995.

cloudlena commented 2 weeks ago

@K-Sato1995, with the new version, the above warning seems to be fixed. However, now I get another error when running npm run check in a SvelteKit project with TypeScript:

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.
/home/lena/Projects/bespinian/bespinian.io/src/routes/Services.svelte:20:9
Error: Cannot find module 'svelte-vertical-timeline' or its corresponding type declarations. (ts)
                TimelineContent
        } from 'svelte-vertical-timeline';
K-Sato1995 commented 2 weeks ago

@cloudlena

hey yeah my bad! I'll upgrade the deps and fix the export stuff with this pr https://github.com/K-Sato1995/svelte-vertical-timeline/pull/7

K-Sato1995 commented 6 days ago

@cloudlena

The pkg should export types properly now with v1.0.2🙏 Thanks for creating the issue🙏

https://github.com/K-Sato1995/svelte-vertical-timeline/pull/7

cloudlena commented 6 days ago

Works like a charm. Thanks, @K-Sato1995!