neodrag
neodrag copied to clipboard
build error: "draggable" is imported from external module "@neodrag/svelte" but never used...
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!
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.
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.
@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.
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
Thanks for the feedback.