Open misslame opened 3 weeks ago
For PR #355, we're manually optimizing SVG files using svgo
and importing them as React components with svgr
.
We are doing the optimization manually because svgr
doesn't seem to be optimizing the SVGs correctly with our current setup. I've tried various svgr
configurations in webpack.config.js
but none worked as expected.
We'll revisit this later to find a better solution to set up svgr
to optimize SVGs automatically with svgo
when importing svgs as react components.
Currently, svgs have massive paths, this is not beneficial for performance loading nor is it very readable, caused huge files.
We should adopt this: https://react-svgr.com/
it allows SVGs to be loaded as react components instead.
Why is this good idea?