Project is loading all icons despite only using two.
See original GitHub issuePrerequisites
- Version: 0.91.0
- Are you running from source/main: Yes
- Are you using a released build: Yes
- Operating system: Windows
- Bits: 64
Step to reproduce
Install package. I installed the Svelte version. I imported ChevronUpDown
in one file and Info
in another. Upon refreshing the page it takes upwards of 5-8 seconds with HMR. Inside the network tab in my dev tools I can see every icon being retrieved with a 200 success status instead of just the two I am using.
Actual behavior
I would expect it to only load the icons I am using.
Any message or error
(Type here)
Resources
- Code
//Example of using Info Icon
<script>
import {Info} from "lucide-svelte"
</script>
<label class="form-label" style="grid-area: 3/1/4/5" for="product">
<span>
Product:
<Info size={16} strokeWidth={2} />
</span>
<input class="input" type="text" placeholder="EX: CLIPS" name="product" />
</label>
- Screenshot of network tab
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
React Icons Imports everything even when included 2 or 3 icons
I found a fix by switching to 3.0.0-Beta1 and including icons like this: import { MdPublic } from 'react-icons/md/index.mjs'; which ...
Read more >Android App from Library project loading two app icons
When I launch my child app, Eclipse loads onto the device both the library version and the child version, both as fully functioning...
Read more >How to Fix the Most Annoying Things in Windows - PCMag
In regedit navigate to HKEYCURRENTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3. Double-click on Settings on the right.
Read more >Material Icons Guide | Google Fonts
An overview of material icons—where to get them and how to integrate them with your projects. What are material icons? Material design system...
Read more >Font Awesome icons in Vue.js apps: A complete guide
The Font Awesome icon collection is a library of free, easy-to-use icons. In this tutorial, learn to add those icons to your Vue.js...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ericfennis I can look into seeing how vite does treeshaking as well, maybe I can find a solution and give you an update.
@JustBarnt Thanks for opening issue in vite repo. The reply in vitejs/vite#10742 by @sapphi-red is the answer for this issue. I can’t affect the way vite is loading the imports in the index file in dev mode. See issue in vitejs/vite#8237.