-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the bug
I have noticed that svelte slows down significantly when hard refresh occurs when using any icon library (like lucide/svelte or tabler/icons-svelte), in development.
Up to few seconds to load the page, hot reloads seems to be working just fine.
It seems that app tries to load all icons at once every time.
Currently I'm bypassing this issue by making alias directly to node_modules, so i can import like this:
'@icons/arrow-left.svelte' and this solves the issue.
At first I though this was lucide issue, but once I installed tabler icons that was sure thing that this is svelte issue, because it loads even slower with tabler as they have much more icons available.
Reproduction
- Import icons via { YourIcon } from '@lucide/svelte' in <script> tags
- Render icons in your html
- Make hard refresh in browser.
Logs
System Info
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 5.84 GB / 15.94 GB
Binaries:
Node: 22.13.0 - C:\Program Files\nodejs\node.EXE
npm: 11.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels