You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Love the work you guys are doing, i have been looking for this for a long time. Now just a little problem here, i am trying to use react based component so that i can utilize it in my Nextjs project but it seems that there is no tree shaking in it at all. I used 5 icons , and the project ended me with a bundle size of 1.5mb Gzipped with icons (React Components) , without icons, 238kb. Please check.
This issue has to do with how webpack imports the packages. You probably import the icons something like this:
import{ReactOriginalIcon}from"react-devicons";
This will import the whole react-devicons package including all icons into your browser bundle, regardless of how many icons you actually use. To fix this, import the icon like this:
Activity
maltejur commentedon Sep 26, 2021
This issue has to do with how webpack imports the packages. You probably import the icons something like this:
This will import the whole
react-deviconspackage including all icons into your browser bundle, regardless of how many icons you actually use. To fix this, import the icon like this:This will only import the
ReactOriginalIcon.dukesx commentedon Sep 27, 2021
Thank you
Merge pull request #8 from devicons/maltejur-patch-2