Closed vincentfretin closed 4 months ago
Before:
After:
I replaced clipboard by clipbard-copy mainly because I couldn't figure out how to stop the click event propagating and collapse the panel. Switching to clipboard-copy reduce a bit the bundle size: https://bundlephobia.com/package/clipboard@2.0.11 9kB minified https://bundlephobia.com/package/clipboard-copy@4.0.1 838B minified
We removed downloading https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css here, so 27K less to download as well.
Before this PR: 483K aframe-inspector.min.js After this PR: 551K aframe-inspector.min.js
increasing bundle to 68kB, wait this doesn't line up, I would had expected 490K maybe. I confirm bundling without clipboard-copy is 550K. So it's just the FontAwesomeIcon component that is 60K? That's crazy. I'll investigate further later, I'll probably create a simple Icon React component just to render the svg. I put this PR back in draft.
Also just to confirm this wasn't due to bad tree shaking, I replaced
import {
faCamera,
faCube,
faFont,
faLightbulb
} from '@fortawesome/free-solid-svg-icons';
to
import { faCamera } from '@fortawesome/free-solid-svg-icons/faCamera';
import { faCube } from '@fortawesome/free-solid-svg-icons/faCube';
import { faFont } from '@fortawesome/free-solid-svg-icons/faFont';
import { faLightbulb } from '@fortawesome/free-solid-svg-icons/faLightbulb';
the bundle increased by 3KB TT.
Thanks so much!
This closes #692 Some icons slightly changed.
Remaining to do: