Migrate frontend build system from React Scripts + Craco to Vite#572
Open
Migrate frontend build system from React Scripts + Craco to Vite#572
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #380
- Replace react-scripts and craco with Vite v4.4.5 - Add @vitejs/plugin-react for React support - Create vite.config.ts with proper alias configuration - Update TypeScript config for Vite compatibility - Add tsconfig.node.json for Vite config files - Create missing env.js file referenced in index.tsx - Update npm scripts to use Vite commands - Remove craco.config.js (no longer needed) - Configure HTTPS and port 10888 to match original setup - Test development server and build process 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
🚀 Vite Migration Complete
This PR successfully migrates the GPTutor frontend from React Scripts + Craco to Vite for faster development and build times.
📋 Issue Reference
Fixes #380 - Перенести сборку на vite
✅ Implementation Summary
Build System Changes
react-scripts(v5.0.1) and@craco/cracowithvite(v4.4.5)@vitejs/plugin-reactfor React supportstart,build,preview, andtestConfiguration Files
vite.config.tswith proper alias configuration matching the original Craco setuptsconfig.jsonfor Vite compatibility (ES2020, bundler module resolution)tsconfig.node.jsonfor Vite configuration filescraco.config.js(no longer needed)Path Aliases Preserved
All existing path aliases are maintained in the new Vite config:
Environment & Settings
env.jsfile that was referenced inindex.tsx🧪 Testing Results
✅ Development Server
VITE v4.5.14 ready in 1330 ms ➜ Local: https://localhost:10888/✅ Build Process
vite v4.5.14 building for production... transforming... ✓ 7 modules transformed.📁 Files Changed
Added:
GPTutor-Frontend/vite.config.ts- Main Vite configurationGPTutor-Frontend/tsconfig.node.json- TypeScript config for ViteGPTutor-Frontend/src/env.js- Missing environment fileModified:
GPTutor-Frontend/package.json- Updated dependencies and scriptsGPTutor-Frontend/tsconfig.json- Updated for Vite compatibilityRemoved:
GPTutor-Frontend/craco.config.js- No longer needed🔄 Usage Instructions
Development
npm start # Starts Vite dev server on https://localhost:10888Production Build
Testing
⚡ Benefits of Migration
🤖 Generated with Claude Code