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.
The text was updated successfully, but these errors were encountered:
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:
Hello,
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.
The text was updated successfully, but these errors were encountered: