HospitalRun / components

Reusable React components used by HospitalRun
https://components.hospitalrun.io
MIT License
123 stars 184 forks source link

Fortawesome: treeshaking behavior not working #278

Open ocBruno opened 4 years ago

ocBruno commented 4 years ago

🐛 Bug Report

After looking at the size of the build and the config I noticed the whole free-solid-svg-icons library was being imported.

To reproduce

yarn clone github.com/hospitalrun/components view index.tsx file

This bug is related to following issue as it is taking up space in the hospitalrun build

https://github.com/HospitalRun/hospitalrun-frontend/issues/1808

Expected behavior

Only import necessary icons

matteovivona commented 4 years ago

Some reference: https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking

ocBruno commented 4 years ago

Some reference: https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking

Thanks for the reference, this is what I was using to debug but I attempted various methods with no success and stopped at the custom build configs. Not sure if anyone with rollup experience wants to tackle this..

matteovivona commented 4 years ago

@lloui-donut which commit do you refer to?

matteovivona commented 4 years ago

seems to be a commit that was never merged into the main repo...

ChrisDryden commented 3 years ago

A group of students from a university course was hoping to take this on for an open-source assignment, could we take this on?

ghost commented 2 years ago

@ocBruno I'd like to work on this issue