Currently if any icon is imported from @patternlfy/react-icons package, it will bundle all icons into your final bundle. This happens even if you reference the icon directly @patternlfy/react-icons/dist/esm/icons/ad-icon.
It would be nice if there would be something similiar to what lodash is doing by creating different files in root folder of their package. Another great example can be material UI icons [1]. You can import single icon or entire package.
I think that the build might be slightly broken in a way that if you import anything it will automatically include all things from the package so some investigation on this matter would be really appreciated.
[1] https://www.npmjs.com/package/@material/react-material-icon
Currently if any icon is imported from
@patternlfy/react-iconspackage, it will bundle all icons into your final bundle. This happens even if you reference the icon directly@patternlfy/react-icons/dist/esm/icons/ad-icon.It would be nice if there would be something similiar to what lodash is doing by creating different files in root folder of their package. Another great example can be material UI icons [1]. You can import single icon or entire package.
I think that the build might be slightly broken in a way that if you import anything it will automatically include all things from the package so some investigation on this matter would be really appreciated.
[1] https://www.npmjs.com/package/@material/react-material-icon