-
Notifications
You must be signed in to change notification settings - Fork 370
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
[Bug?]: Effects and Events do not run importing a Lucide Solid Icon. #1048
Comments
Can't reproduce. Effect runs regardless of the icon's presence. Something else I noticed is that in dev all icons are loaded resulting in 1k+ file requests and slowing everything down quite a lot for me. It takes like a couple of seconds until I see the console log. I am assuming this has to do with vite not treeshaking in dev. My env:
|
I did some tests, and the problem only occurs in dev, and not in build. I also confirm the problem you are pointing out that I had not noticed, it is actually downloading the entire list of icons. I attach screenshots for clarity: For the repo also I have posted the source, here is the link to the route that is giving problems: https://github.com/askides/solid-start-debug/blob/main/src/routes/test.tsx |
Doesn't look to me like this is something that can be solved in solid-start. I looked around a bit on the lucide repo and found two issues mentioning this problem but related to svelte.
Edit: Tested also your repo just to make sure. Same result. It just takes a couple seconds before the console log shows up. |
In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience. See #1139 for more details. |
I have a workaround @edivados for the bundling issue using v0.4.x
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
resolve: {
alias: {
"lucide-solid/icons": fileURLToPath(
new URL(
"./node_modules/lucide-solid/dist/source/icons",
import.meta.url
)
),
},
},
});
declare module "lucide-solid/icons/*" {
import { LucideProps } from "lucide-solid/dist/types/types";
import { Component } from "solid-js";
const cmp: Component<LucideProps>;
export = cmp;
}
|
Duplicates
Latest version
Current behavior 😯
If i write these lines of code:
No console logs will be printed, nether for effect or events.
But everything start working perfectly just commenting the icon.
Expected behavior 🤔
The expected behavior is the correct running of the effect, and the correct event dispatching of the button click and the input type.
Steps to reproduce 🕹
Described in the "Current Behavior" tab above.
Context 🔦
No response
Your environment 🌎
System: OS: macOS 13.2.1 CPU: Apple M1 Binaries: Node: v18.17.1 PNPM: v8.7.0 npmPackages: solid-start => ^0.3.5
The text was updated successfully, but these errors were encountered: