maproulette / maproulette3

MapRoulette, the micro-tasking tool for OpenStreetMap
https://maproulette.org
MIT License
128 stars 35 forks source link

Run svgo on static svgs to reduce file size #2442

Closed jake-low closed 1 month ago

jake-low commented 2 months ago

The SVGs in the project were bigger than they needed to be, so I ran svgo to reduce them. In the default configuration, svgo does not make any changes that affect the rendered result of the SVG (at least in theory), so this should be safe. I inspected the results on a few pages (e.g. the achievements page and the 404 page) to make sure nothing had gone grossly wrong, but I didn't check every SVG.

This reduces the total bundle size from 11.5MB to 9.0MB. Note that these SVGs are loaded dynamically when they're needed, they aren't part of the main bundle chunk.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 23.94%. Comparing base (05c420a) to head (ee163d4). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2442 +/- ## ======================================= Coverage 23.94% 23.94% ======================================= Files 651 651 Lines 22525 22525 Branches 6904 6918 +14 ======================================= Hits 5393 5393 Misses 14337 14337 Partials 2795 2795 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CollinBeczak commented 1 month ago

LGTM, Great optimization!