Fix Vite 7.0.6 upgrade by updating @vitejs/plugin-react to v4.7.0 #2630
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.
This PR fixes the failing Dependabot PR #2628 that attempted to upgrade Vite from v5.4.18 to v7.0.6 but caused CI build failures.
Root Cause
The Dependabot PR only upgraded
vite
to v7.0.6 but left@vitejs/plugin-react
at v4.3.3, which only supports Vite versions up to v6.x. This created a peer dependency mismatch that caused the build to fail with TypeScript compilation errors.Solution
Updated
@vitejs/plugin-react
from v4.3.3 to v4.7.0, which supports Vite v7.x according to its peer dependencies specification:Changes Made
@vitejs/plugin-react
from^4.3.3
to^4.7.0
vite
at^7.0.6
as intended by the original Dependabot PRVerification
All build and development commands now work correctly:
npm install
- Clean dependency installationnpm run build
- Production build succeedsnpx tsc --noEmit
- TypeScript compilation passesnpm run dev
- Development server starts successfullynpx prettier --check .
- Linting passesThe frontend loads and renders correctly with Vite 7.0.6:
This minimal change ensures compatibility between the upgraded Vite version and its React plugin while maintaining all existing functionality.
Fixes #2629.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.