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

Too many requests in dev mode #1933

Closed
6 of 25 tasks
PeterlitsZo opened this issue Feb 29, 2024 · 6 comments
Closed
6 of 25 tasks

Too many requests in dev mode #1933

PeterlitsZo opened this issue Feb 29, 2024 · 6 comments
Labels
🐛 bug Something isn't working 🪝 solid package About the Solid package

Comments

@PeterlitsZo
Copy link
Contributor

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.336.0

Browser

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

Operating system

  • Windows
  • Linux
  • 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)

截屏2024-02-29 19 06 56

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

  • 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.)
@PeterlitsZo PeterlitsZo added the 🐛 bug Something isn't working label Feb 29, 2024
@karsa-mistmere karsa-mistmere added the 🪝 solid package About the Solid package label Feb 29, 2024
@jguddas
Copy link
Member

jguddas commented Feb 29, 2024

Possibly related to vitejs/vite#8237

@PeterlitsZo
Copy link
Contributor Author

Just a question: could we import a icon by import ChevronDownSquare from "lucide-solid/chevron-down-square"?

@ericfennis
Copy link
Member

@PeterlitsZo Hmm not possible at the moment. Solid currently requires to have a bundled ESM file.

@mifreudenthaler
Copy link

any news on this? having the same problem.

@floratmin
Copy link

I have the same problem. As soon I load one icon all icons are loaded in dev mode and my computer starts to struggle.

@jguddas
Copy link
Member

jguddas commented Nov 4, 2024

Closing in favor of #1944

@jguddas jguddas closed this as completed Nov 4, 2024
@jguddas jguddas closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🪝 solid package About the Solid package
Projects
None yet
Development

No branches or pull requests

6 participants