Skip to content

Migrate frontend from Create React App to Vite (toolchain + env updates)#35

Open
digiguru wants to merge 1 commit intomainfrom
codex/review-security-advisories-and-suggest-remediations
Open

Migrate frontend from Create React App to Vite (toolchain + env updates)#35
digiguru wants to merge 1 commit intomainfrom
codex/review-security-advisories-and-suggest-remediations

Conversation

@digiguru
Copy link
Copy Markdown
Owner

@digiguru digiguru commented Mar 1, 2026

Motivation

  • Remove the unmaintained react-scripts toolchain and its pinned transitive dependencies to reduce security advisory exposure and enable a maintained build/test stack.
  • Standardize environment variables for Vite by moving to VITE_* names so runtime configuration works with the new toolchain.

Description

  • Replaced CRA wiring with Vite by removing react-scripts and adding vite, @vitejs/plugin-react, and vitest, and updated package.json scripts to start, build, preview, test, and test:watch that invoke Vite/Vitest via vite and vitest commands.
  • Updated runtime env usage in src/App.js from process.env.REACT_APP_SERVER_HOSTNAME to import.meta.env.VITE_SERVER_HOSTNAME and renamed .env entries to VITE_SERVER_HOSTNAME.
  • Added vite.config.js and a Vite-compatible index.html, moved testing/dev-only libraries into devDependencies, and removed CRA-specific files and configs.
  • Added SECURITY_REMEDIATION_ROUTINES.md documenting recommended remediation steps (overrides and migration strategy) and updated README.md to reflect the Vite-based workflow and environment variable usage.

Testing

  • No automated tests were executed as part of this rollout; the change includes test runner configuration for Vitest (test/test:watch) and the repository should run npm run build and npm test in CI to validate the migration.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
image-game-client Error Error Mar 1, 2026 3:12pm

Request Review

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant