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

Add a Svelte/Vite preprocessor #2295

Open
2 of 14 tasks
WarningImHack3r opened this issue Jul 7, 2024 · 1 comment
Open
2 of 14 tasks

Add a Svelte/Vite preprocessor #2295

WarningImHack3r opened this issue Jul 7, 2024 · 1 comment
Labels
💡 idea New ideas

Comments

@WarningImHack3r
Copy link

WarningImHack3r commented Jul 7, 2024

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • all JS packages
  • site

Description

Since #1707, granular imports are now supported. This is great, but it can become tedious to browse all the existing components, check the imports, and rewrite them manually.
It also clutters the imports, and IDEs tend to auto-import the unoptimized version instead of the right one.
Moreover, in larger projects, it is easy for an inexperienced contributor to accidentally use the old global import. You only need one such mistake to slow down your entire project again.

I just stumbled upon a solution that solves that: preprocessors. The phosphor-svelte community package offers one because this library suffers from the same problem Lucide does. This solution is the best of both worlds: it's transparent to the user, does nothing if the right syntax is already used, and brings the performance gains to codebases of every size for relatively no cost.

It's even potentially expandable to every single Vite-based framework, though for the moment I'd focus on Svelte.

My request is: are you okay with me submitting this subpackage (lucide-svelte/preprocessor) in a PR?

Use cases

Every single Svelte project, especially the largest ones. Potentially expandable to every Vite-based framework.

Checklist

  • I have searched the existing issues to make sure this bug has not already been reported.
@WarningImHack3r WarningImHack3r added the 💡 idea New ideas label Jul 7, 2024
@WarningImHack3r
Copy link
Author

WarningImHack3r commented Aug 10, 2024

Update: I made it (I still think having it built-in would be better)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 idea New ideas
Projects
None yet
Development

No branches or pull requests

1 participant