Repository navigation
Trim Reanimated and unused icon families from the web bundle - #574
Merged
Merged
Conversation
The root layout imported react-native-reanimated on every platform, which put ~650 KB of it in the web __common chunk although the website never needs it at the root. Move the import to a .native file. Icon and LoadingScreen imported from the @expo/vector-icons barrel, which bundles every family's glyph map. Import Ionicons by path and draw the loading icon with it, so the 549 KB MaterialCommunityIcons font is no longer downloaded.
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cuts the guest web pages from 1.68 MB to 867 KB transferred and TBT by about a third. Two causes:
app/_layout.tsximportedreact-native-reanimatedon every platform, which put ~650 KB of it in the web__commonchunk. The website never needs it at the root (the admin swipe row imports it itself). The import now lives inutils/loadReanimated.native.ts.IconandLoadingScreenimported from the@expo/vector-iconsbarrel, which bundles every family's glyph map.Iconnow imports Ionicons by path.LoadingScreendraws its icon throughIcon(Ioniconsrestaurant) instead of the one MaterialCommunityIcons glyph, so the 549 KB MCI font is no longer downloaded.jest.setup.tsforwards@expo/vector-icons/Ioniconsto the barrel mock, so the existing per-file barrel mocks (89 files) keep applying without touching them.Related issue
None.
Scope
Changes
Local Lighthouse 13.6.0, mobile preset,
expo exportserved withserve -s dist, median of 3:/locationsbefore/locationsafter__commongoes from 2.3 MB to 1.2 MB raw. The loading screen icon changes from MCIsilverware-fork-knifeto Ioniconsrestaurant.Testing
OpenRestoApi.Testspass locally (no API changes)npm run check,tsc --noEmit,npm test(311 suites),npm run test:android(162 suites),expo export --platform web/admin/notifications(swipe rows) render on web with no console errors. Native not run here; it keeps the same import through the.nativefile.Migrations
Checklist