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

lucide-svelte does not implement alias for icons #2580

Open
5 of 30 tasks
Kapsonfire-DE opened this issue Nov 3, 2024 · 7 comments · May be fixed by #2584
Open
5 of 30 tasks

lucide-svelte does not implement alias for icons #2580

Kapsonfire-DE opened this issue Nov 3, 2024 · 7 comments · May be fixed by #2584
Labels
🐛 bug Something isn't working

Comments

@Kapsonfire-DE
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

tried all of these

import Home from 'lucide-svelte/icons/home';
import Home from 'lucide-svelte/dist/icons/home.svelte';
  1. is taking from website
    https://lucide.dev/guide/packages/lucide-svelte#typescript-example

  2. Failed to resolve import "lucide-svelte/icons/home" from "src/lib/components/Icon.svelte". Does the file exist?

  3. [plugin:vite:import-analysis] Missing "./dist/icons/home.svelte" specifier in "lucide-svelte" package

Steps to reproduce

see above

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.)
@Kapsonfire-DE Kapsonfire-DE added the 🐛 bug Something isn't working label Nov 3, 2024
@Kapsonfire-DE
Copy link
Author

Lol, okay the docs are wrong. I'm able to import, but actually there is no home icon

@jguddas
Copy link
Member

jguddas commented Nov 3, 2024

Do we not generate the alias files here?

For a quick fix replace the path home with house.

@Kapsonfire-DE
Copy link
Author

image
at least there is no home.svelte for me

@jguddas
Copy link
Member

jguddas commented Nov 3, 2024

image
at least there is no home.svelte for me

I implemented a fix for this in lucide-react a long time ago, looks like we should also fix this here.

@Kapsonfire-DE Kapsonfire-DE changed the title Cant import Icon in sveltekit lucide-svelte not containing alias for icons Nov 3, 2024
@Kapsonfire-DE Kapsonfire-DE changed the title lucide-svelte not containing alias for icons lucide-svelte does not implement alias for icons Nov 3, 2024
@jguddas
Copy link
Member

jguddas commented Nov 4, 2024

#1486 is where I fixed it in lucide-react.

@ericfennis
Copy link
Member

I've something working for this!
@jguddas Yess that's correct, I've used part of this, but it needed some extra code to have .svelte files as output.

@ericfennis ericfennis linked a pull request Nov 5, 2024 that will close this issue
3 tasks
@ericfennis
Copy link
Member

@Kapsonfire-DE I've created a test release for this on [email protected]. Can you maybe check if everything is working file on your side?

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

Successfully merging a pull request may close this issue.

3 participants