fix(performance): lazy loading, dns-prefetch, and chunk splitting#422
Merged
gabitoesmiapodo merged 4 commits intofeat/ai-integrationfrom Mar 30, 2026
Merged
fix(performance): lazy loading, dns-prefetch, and chunk splitting#422gabitoesmiapodo merged 4 commits intofeat/ai-integrationfrom
gabitoesmiapodo merged 4 commits intofeat/ai-integrationfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on front-end performance optimizations by reducing initial image/network work and improving long-term caching via more stable vendor chunking in the Vite build.
Changes:
- Add
loading="lazy"toTokenLogoandAvatar<img>elements. - Add
dns-prefetchhints for several blockchain RPC domains inindex.html. - Configure Rollup
manualChunksto split major dependency groups into separate vendor chunks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
vite.config.ts |
Adds build.rollupOptions.output.manualChunks to create stable vendor chunks for key dependency groups. |
src/components/sharedComponents/TokenLogo.tsx |
Adds lazy-loading to token logo images to reduce upfront image fetches. |
src/components/sharedComponents/Avatar.tsx |
Adds lazy-loading to ENS avatar images to reduce upfront image fetches. |
index.html |
Adds dns-prefetch resource hints for RPC endpoints to reduce DNS latency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5 tasks
1664165 to
bd51b27
Compare
b84e168 to
184f8ea
Compare
184f8ea to
13e024b
Compare
bd51b27 to
2332bcb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
13e024b to
3b7b376
Compare
2332bcb to
b1e43d7
Compare
22c9e54 to
6a2f37e
Compare
- Add loading="lazy" to img in TokenLogo and Avatar - Add dns-prefetch for common blockchain RPC endpoints - Add manualChunks to split vendor libs into separate cached chunks
Rollup treats subpath imports as separate module IDs; without explicitly including react-dom/client the subpath resolves into a separate chunk, splitting the React vendor bundle and defeating cache stability.
b1e43d7 to
ba8c91b
Compare
fernandomg
approved these changes
Mar 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
loading="lazy"to<img>inTokenLogoandAvatardns-prefetchhints for common blockchain RPC endpointsmanualChunksto split react, wagmi/viem, tanstack, chakra, and web3 into separate cached chunksTest plan
pnpm testpassespnpm buildsucceeds with separate vendor chunks visible in output