-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Vite dev mode loads all icon chunks with 3.19.0 (React) #1233
Comments
+1 |
1 similar comment
+1 |
+1 |
2 similar comments
+1 |
+1 |
was losing my mind over why vite was taking 5 years to load initially, I guess something broke tree shaking in 3.19 |
+1 |
It seems like something with |
It almost blew my pc. |
It has something to do with the new "Dynamic Icons Import" feature released with 3.19.0 (#1081). When I commented out 2 lines related to this feature from |
anyone found a solution yet? downgrading perhaps? or is there a better one? |
@ciro-maciel any specific reason for not using 3.18.0 ? I'm using that. |
Same here ended up locking the correct one, I’m using it with mantine so I’m using that version |
I tested with 3.18.0 and got the error... so I used 3.17.0 and I'm not getting the error |
+1 |
same issue, forcing the package to |
@codecalm @timheerwagen Any chance this gets fixed? Kind of afraid that in order to fix this for mantine-react-table, I'll have to just embed the svgs in the codebase instead of using tabler as a peer dep. KevinVandy/mantine-react-table#418 |
All other reports are that in only affects DEV mode and not production bundles. Could you share what kind of build config that application has? Older webpack? If true, this is way more serious than I initially thought, as it would be potentially quadrupling the bundle size of some apps for unused icons. |
Might be I got this wrong but I am simply performing a bundle analyzer call on the latest vite version. In my case I am using bun: |
+1 – I updated deps last night before launching a new project and noticed dev mode started taking the same ~10 seconds others have described. Forcing |
+1 same issue as described by many in my Remix(vite) vercel app. Will try versioning down |
I wonder if the update that caused this problem could not be determined? Version 3.17.0 is working fine. What happened next? |
* fix(website): invalidate old keys * chore(website): hide links * chore(website): hide more links * fix(frontend): refresh metadata details on adding to collection * fix(website): add more padding etc * fix(website): remove carousel b tns * refactor(frontend): move location of item * ci(ts): downgrade tabler icons version Ref: tabler/tabler-icons#1233 * refactor(frontend): use correct imports * feat(frontend): display inline progress * feat(frontend): change orientation of inline progress bar * chore(models/user): remove repeated stuff * chore(backend): add new column for deduplicating upcoming section * chore(gql): generate new types * fix(frontend): better logic to decide which elements should show * feat(frontend): deduplicate media * fix(services/misc): respect new preferences * fix(frontend): add docs for deduplicate option * build(ts): upgrade deps * refactor(frontend): change name of param
+1 v3.21.0 |
I downgraded the libraries to these versions, and it worked without any issues. @tabler/icons": "3.17.0", |
3.21.0 added the new icons I needed, but I'm stuck with 3.17.0. |
There is a workaround #1233 (comment) |
I was about to open a similar issue until i saw this. |
Oh! My mistake, I missed it. Thanks, it's working. |
Workaround from #1233 (comment) worked! |
I've just spent the whole noun debugging this. Thanks to #1233 (comment) for the workaround! |
Also experienced this, glad to see there is a work around. Any way we can get an update on having this fixed? |
Issue with tabler-icons: <tabler/tabler-icons#1233>
Was going mad at why my app was slow, reading the comments tried this one and it worked Thanks to #1233 (comment) for the workaround! however there should be a better more permanent solution for future users of this plugin. |
- See: tabler/tabler-icons#1233 - Recompile translations
- See: tabler/tabler-icons#1233 - Recompile translations
If I use this I get errors with some icons and not with others. For example Anyone else experiencing the same issue? |
|
The common point in both of your problems is that the icon names are defined as aliases. Lines 10 to 17 in 9f21e6f
you can use it like this. |
Description
Using the new 3.19.0 version of the react package breaks dev mode.
After importing any one icon into a component, vite will start loading all the icon chunks (takes about 10 seconds on my machine).
Building the app does not have this issue (preview mode).
Package
Version
3.19.0
Browser
Operating system
Steps to reproduce
import { IconComponents, IconTag } from "@tabler/icons-react";
Checklist
The text was updated successfully, but these errors were encountered: