Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update svelte package to Svelte v5 #2565

Open
4 of 30 tasks
perryd01 opened this issue Oct 29, 2024 · 2 comments
Open
4 of 30 tasks

Update svelte package to Svelte v5 #2565

perryd01 opened this issue Oct 29, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@perryd01
Copy link

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • source/main
  • other/not relevant

Version

0.454.0

Can you reproduce this in the latest version?

  • Yes
  • No

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Description

types are not completely compatible with Svelte 5

Steps to reproduce

  1. create a project with svelte5
  2. try out the Lucide Svelte Typescript Example
  3. ComponentType<Icon> is no longer supported

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@perryd01 perryd01 added the 🐛 bug Something isn't working label Oct 29, 2024
@youknowedo
Copy link

youknowedo commented Nov 3, 2024

idk... If I understand correctly, the changes made to the Svelte components are in the "compiler." This means that the current lucide-svelte components are still compatible with svelte 5 and the real issue is with the types.

In my very amateur opinion, I think a better option would instead be to make the new Component type in the svelte repo backward-compatible with the ComponentType type (i.e. type Component = { /* type stuff */ } | ComponentType). This makes sure that the lib still is compatible with Svelte 3/4 while getting to use the type Component for everything.

But yeah I might be objectively wrong with this. I don't know how this stuff works really.

EDIT: nvm, @sveltejs/package already figured that stuff out. I think we'll lose Svelte 3 support though. Also, it seems like the components arent compatible with the Component<IconProps> type.

@phenomen
Copy link

It would be great if it also was compatible with runes. Right now it throws errors due to $$props deprecation, and it's the only library in my stack that prevents using full rune mode in the Svelte compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@phenomen @perryd01 @youknowedo and others