aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
647 stars 198 forks source link

Reduce bundle size after the fontawesome icons changes #707

Closed vincentfretin closed 4 months ago

vincentfretin commented 4 months ago

This addresses my comment https://github.com/aframevr/aframe-inspector/pull/706#issuecomment-1952042203 about he unfortunate increase of the bundle size. When I wanted to do #692 I had in mind a decrease of what need to be downloaded, not an increase. This PR fixes it.

Removing usage of FontAwesomeIcon component and using our own simplified component remove 66 kB. I also switched from classnames to lighter clsx that is used nowadays in React projects, removing 1 kB. This PR reduces the minified bundle from 554K to 489K.

Before #706 we had 483K+27K=510K After #706 and this PR: 489K.

dmarcos commented 4 months ago

Thanks so much!