lucide
lucide copied to clipboard
Too many requests in dev mode
Package
- [ ] lucide
- [ ] lucide-angular
- [ ] lucide-flutter
- [ ] lucide-preact
- [ ] lucide-react
- [ ] lucide-react-native
- [X] lucide-solid
- [ ] lucide-svelte
- [ ] lucide-vue
- [ ] lucide-vue-next
- [ ] Figma plugin
- [ ] source/main
- [ ] other/not relevant
Version
^0.336.0
Browser
- [X] Chrome/Chromium
- [X] Firefox
- [ ] Safari
- [ ] Edge
- [ ] iOS Safari
- [ ] Opera
- [ ] Other/not relevant
Operating system
- [ ] Windows
- [X] Linux
- [X] macOS
- [ ] Other/not relevant
Description
When I am using lucide-solid
in my SolidStart project, I find that in the dev mode, it will request too many requests and let me must wait for > 1min. (I develop it in the remote machine, which is an Linux machine, and using Chrome / Arc / Firefox to interact with the project)
Here is the section of package.json of lucide-solid
:
{
// ...
"exports": {
".": {
"types": "./dist/types/lucide-solid.d.ts",
"solid": "./dist/source/lucide-solid.js",
"import": "./dist/esm/lucide-solid.js",
"browser": "./dist/esm/lucide-solid.js",
"require": "./dist/cjs/lucide-solid.js",
"node": "./dist/cjs/lucide-solid.js"
}
}
// ...
}
It looks like it just using the "./dist/source/lucide-solid.js", which has bad performance when in development.
Steps to reproduce
- Using
lucide-solid
in any solid project. - Import it like
import { CheckCircle, Circle, Trash2 } from 'lucide-solid';
. - Run it in development mode.
Here I am using the SolidStart framework and Bun so you can:
bunx create-solid@latest
bun install
bun run dev
Then you can install the lucide-solid
and import it in any file.
Checklist
- [X] 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.)
Possibly related to https://github.com/vitejs/vite/issues/8237
Just a question: could we import a icon by import ChevronDownSquare from "lucide-solid/chevron-down-square"
?
@PeterlitsZo Hmm not possible at the moment. Solid currently requires to have a bundled ESM file.
any news on this? having the same problem.
I have the same problem. As soon I load one icon all icons are loaded in dev mode and my computer starts to struggle.