Skip to content

Migrate from CRA to Vite + React 19 (integrated from 4 parallel sessions)#13

Open
devin-ai-integration[bot] wants to merge 10 commits into
mainfrom
devin/1777936981-integrate-migration
Open

Migrate from CRA to Vite + React 19 (integrated from 4 parallel sessions)#13
devin-ai-integration[bot] wants to merge 10 commits into
mainfrom
devin/1777936981-integrate-migration

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 4, 2026

Summary

Complete migration from Create React App (React 17) to Vite 8 + React 19, executed via 4 parallel Devin child sessions and integrated sequentially.

What changed

Session A — Core Migration (PR #10):

  • Removed react-scripts and web-vitals
  • Installed vite@^8 and @vitejs/plugin-react@^6
  • Upgraded react/react-dom to ^19
  • Created vite.config.js with path aliases for absolute imports
  • Moved index.html to root, removed %PUBLIC_URL% references
  • Renamed src/index.jssrc/main.jsx, migrated to createRoot API
  • Updated scripts: startvite, buildvite build, previewvite preview

Session B — react-transition-group nodeRef (PR #9):

  • Upgraded react-transition-group to ^4.4.5
  • Added nodeRef to CSSTransition in Alert.jsx and Modal.jsx (required for React 19 — findDOMNode removed)

Session C — Testing Infrastructure (PR #12):

  • Removed old @testing-library v12/v5/v13 packages
  • Installed vitest@^4, @testing-library/react@^16, @testing-library/jest-dom@^6, @testing-library/user-event@^14
  • Merged vitest test config into vite.config.js (removed standalone vitest.config.js)
  • Fixed App.test.jsx to test actual app rendering with AlertProvider

Session D — ESLint + Dependency Upgrades (PR #11):

  • Upgraded react-icons to ^5.6.0, sass to ^1.99.0, classnames to ^2.5.1, react-countdown to ^2.3.6
  • Set up standalone ESLint flat config (eslint.config.js) with eslint-plugin-react and eslint-plugin-react-hooks

Integration fixes:

  • Resolved merge conflicts in package.json across all 4 branches
  • Removed React 17 react-dom/client shim (no longer needed with React 19)
  • Upgraded vitest from v2 to v4 for Vite 8 compatibility
  • Removed duplicate @vitejs/plugin-react from devDependencies
  • Renamed AlertContext.jsAlertContext.jsx for Vite 8/Rolldown JSX parsing

Verification

  • npm install — clean install, 0 vulnerabilities
  • npm run build — production build succeeds (85 modules, 340KB JS gzipped to 125KB)
  • npm test (vitest) — 1 test file, 1 test passing
  • npm run lint — no errors
  • npm run start — dev server running, app loads and renders correctly

Wordle app running on Vite + React 19

Review & Testing Checklist for Human

  • Run npm run start and play a full game — type guesses, submit with ENTER, verify color-coded feedback (green/yellow/gray)
  • Open settings modal (gear icon) — toggle dark mode, hard mode, high contrast; verify modal open/close animations
  • Open stats modal (bar chart icon) — verify stats display and modal transitions
  • Check that alerts appear/disappear with fade animation (e.g. "Not enough letters", "Not in word list")
  • Verify localStorage persistence — refresh page, confirm game state and settings are preserved

Notes

Link to Devin session: https://app.devin.ai/sessions/087adf1870154c4ca25a846c20e91b4d
Requested by: @shahmir-masood


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)
Open in Devin Review

devin-ai-integration Bot and others added 9 commits May 4, 2026 23:14
- Upgrade react-transition-group to ^4.4.5
- Add nodeRef to CSSTransition in Alert.jsx
- Add transitionRef to CSSTransition in Modal.jsx

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
- Remove react-scripts and web-vitals dependencies
- Install vite and @vitejs/plugin-react
- Upgrade react and react-dom to ^19.0.0
- Create vite.config.js with path aliases for absolute imports
- Move public/index.html to project root, remove %PUBLIC_URL% refs and CRA comments
- Add module script tag for Vite entry point
- Rename src/index.js to src/main.jsx with createRoot API
- Remove src/reportWebVitals.js
- Update package.json scripts (start, build, preview)
- Remove eslintConfig and browserslist sections from package.json

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
- Upgrade react-icons to ^5.6.0
- Upgrade react-countdown to ^2.3.6
- Upgrade sass to ^1.99.0
- Upgrade classnames to ^2.5.1
- Install eslint, @eslint/js, eslint-plugin-react, eslint-plugin-react-hooks
- Create eslint.config.js with flat config format
- Remove eslintConfig from package.json
- Add lint script to package.json
- Fix unused variable in src/lib/words.js

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
- Remove old testing libraries (@testing-library/react ^12, jest-dom ^5, user-event ^13)
- Install vitest, jsdom, @testing-library/react ^16, jest-dom ^6, user-event ^14, @vitejs/plugin-react
- Create vitest.config.js with path aliases, jsdom environment, and JSX-in-JS support
- Add react-dom/client compatibility shim for React 17
- Update setupTests.js (remove CRA comments)
- Update package.json test script to use vitest
- Fix App.test.jsx to render with AlertProvider context

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
…nsition-group ^4.4.5, drop react-scripts

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
…est script, move testing libs to devDependencies

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
…w on React 19)

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
…, classnames latest), added ESLint flat config

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
…cate @vitejs/plugin-react, rename AlertContext.js to .jsx for Rolldown

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment thread package.json Outdated
Comment on lines +6 to +14
"@vitejs/plugin-react": "^6.0.1",
"classnames": "^2.5.1",
"react": "^19.2.5",
"react-countdown": "^2.3.6",
"react-dom": "^19.2.5",
"react-icons": "^5.6.0",
"react-transition-group": "^4.4.5",
"sass": "^1.99.0",
"vite": "^8.0.10"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Build-time dependencies vite and @vitejs/plugin-react incorrectly placed in dependencies instead of devDependencies

vite and @vitejs/plugin-react are build-time tools that should be in devDependencies, not dependencies. The PR already correctly places vitest in devDependencies, making this inconsistent. When deploying with npm install --omit=dev (standard for production), these large packages (~80MB+) will still be installed unnecessarily, increasing install time, image size, and attack surface in production environments.

Prompt for agents
Move `vite` and `@vitejs/plugin-react` from `dependencies` to `devDependencies` in package.json. These are build-time tools (bundler and its plugin) that are not needed at runtime. The `sass` package should likely also be moved to devDependencies for the same reason, as it is only used during the build step to compile SCSS files. After making the change in package.json, run `npm install` to update package-lock.json.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — moved vite, @vitejs/plugin-react, and sass to devDependencies in 44186ee. Build and tests still pass.

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
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.

0 participants