-
Notifications
You must be signed in to change notification settings - Fork 15
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
File size #29
Comments
You may use this package + this guide to create an icon pack for your app without installing |
Or... |
Seems you can’t. The large file size will come from the generated index.js of this package, which contains a switch clause for accessing icons by name. I don’t see any solution for it by now |
Maybe it can change to the way material icons work? They need to be imported directly which allows for smaller bundle sizes. This could work? There's a convenience when importing everything from the same file (index) but you also lose a lot of optimizations. Same goes for UI Kitten I suppose. That's why you can import specific parts from firebase, material and even lodash. I believe it's called "tree shaking" but I'm not super familiar with that yet. In any case, that could reduce file size by a lot, and would make for a pretty awesome update. I can help! 😄 |
@RWOverdijk This is slightly off topic for For my use case I want individual components to register their required icons, which can then be duduped and tree-shaken per bundle.
This then allows my React components to register their icons
I'm using NextJS as my framework, so I can simply include the hack in the |
💬 Question
Looking at my bundle size on web a large part of it is eva icons.
Another large part of it is @ui-kitten/components, specifically ui (and of course mapping).
I was wondering if there's something that can be done to reduce this. I only use 4 icons in total, so it seems a bit much to have all of it in the bundle.
React Native Eva Icons Version
"@ui-kitten/components": "^5.0.0",
"@ui-kitten/eva-icons": "^5.0.0",
"@eva-design/eva": "^2.0.0",
The text was updated successfully, but these errors were encountered: