idris-maps / svelte-parts

Svelte components
https://svelte-parts.surge.sh
49 stars 5 forks source link

Updating npm for svelte export condition #14

Open menocsk27 opened 1 month ago

menocsk27 commented 1 month ago

Hi! I recently used the ZoomSvg component and it works great -- only minor thing is that when using vite-plugin-svelte to build, it warns me that:

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

svelte-parts@0.0.6

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

In the published npm package (0.0.6), this would be fixed by replacing ".": "./index.js", with ".": { "svelte": "./index.js" } , in the package.json, but I see that the latest version here in the repo now uses svelte-kit to package everything so this may already be fixed.

Either way, are there plans to update the npm package soon? Thanks in advance!

idris-maps commented 3 weeks ago

hello @menocsk27 thank you for the heads up glad to hear someone uses this i will see if it is an easy fix otherwise i am considering archiving this repo keeping up with all the tooling changes is a pain the ZoomSvg component is very simple simply copying it into your project may be the easiest note the dependency on d3, the d3-selection and d3-zoom modules to be precise it is standard js and should not blow up your build