neodrag icon indicating copy to clipboard operation
neodrag copied to clipboard

build error: "draggable" is imported from external module "@neodrag/svelte" but never used...

Open eranmiller opened this issue 1 year ago • 2 comments

First, I'd like to thank you for your very useful library.

All functionality is as advertised, except I'm getting this build error, and I was hoping you could explain if my implementation is the cause. I've poured over the documentation numerous times and have tried various configurations, alas this is what I get every time I run a build. "draggable" is imported from external module "@neodrag/svelte" but never used

I've create a SvelteLab example to view the error live. https://www.sveltelab.dev/lt1xord50oasihe

While I have your attention: Svelte 5 is coming soon... do you have plans to update your very useful library?

Thank you and Happy New Year!

eranmiller avatar Dec 31 '23 20:12 eranmiller

sveltelab example Seems to be working. Also, that is a typescript warning which happens if you import something but don't use it. Here it is being used

Reg svelte 5: No change required, it should work as long as svelte has actions.

PuruVJ avatar Jan 02 '24 10:01 PuruVJ

Thank you for your reply. Sorry, I was being unclear, my concern was about the Typescript error, which even though draggable is being used, still appears in the build log.

eranmiller avatar Jan 04 '24 15:01 eranmiller

@PuruVJ I am getting this same error still as well for awhile now in my Svelte project. Additionally, the Sveltelab example above does seem to re-produce this error if you run npm run build on it.

cmjoseph07 avatar Jan 10 '24 16:01 cmjoseph07

Ohh I just saw the issue. It's strange.

Fortunately, it doesn't affect the final bundle or the runtime implementation, so you're good to go on that front. It's not a TypeScript error either way, as vite build doesn't perform typescript analysis. This is something on vite's end only

PuruVJ avatar Jan 10 '24 17:01 PuruVJ

Thanks for the feedback.

eranmiller avatar Jan 11 '24 05:01 eranmiller