Skip to content

chore: Optimize vendor chunk size via Vite manualChunks - #657

Open
vedxnt-10 wants to merge 1 commit into
Mayur-Pagote:mainfrom
vedxnt-10:optimize-vendor-chunk-656
Open

chore: Optimize vendor chunk size via Vite manualChunks#657
vedxnt-10 wants to merge 1 commit into
Mayur-Pagote:mainfrom
vedxnt-10:optimize-vendor-chunk-656

Conversation

@vedxnt-10

Copy link
Copy Markdown

Resolves #656

Description

This PR resolves the Some chunks are larger than 800 kB warning produced during the Vite production build by optimizing how third-party dependencies are bundled.

Previously, all node_modules were lumped into a single massive vendor chunk (which exceeded 2MB), significantly impacting the initial load performance of the application.

Changes Made

  • Updated manualChunks in vite.config.ts to explicitly split all dependencies inside node_modules into their own separate chunks, based on their package names.
  • This successfully eliminates the chunk size warning and ensures the browser only downloads the smaller, relevant dependencies as they are needed.
  • Note: React.lazy() and Suspense were already implemented effectively for routing within src/App.tsx, so no further dynamic imports were necessary.

Verification

  • npm run build succeeds perfectly with well-distributed chunk sizes.
  • npm run validate:components passes.
  • All code changes are minimal and strictly targeted at resolving the Vite chunking issue.

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

@vedxnt-10 is attempting to deploy a commit to the mayur-pagote's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Optimize vendor chunk size via code splitting and manual chunks

1 participant