-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Migrate all REACT_APP_* environment variables to Vite's native VITE_* prefix convention.
Motivation
The project uses Vite as its bundler but still follows the Create React App convention of REACT_APP_* prefixed env vars. This requires each variable to be manually added to the define map in vite.config.ts for build-time replacement. Vite natively exposes VITE_* variables via import.meta.env without any extra configuration.
Current State
Variables in vite.config.ts define map:
REACT_APP_COMMIT_HASHREACT_APP_GITHUB_REPOREACT_APP_VERSIONREACT_APP_OPENSCAN_NETWORKSREACT_APP_OPENSCAN_GROQ_AI_URLREACT_APP_OPENSCAN_WORKER_URL
All accessed via process.env.REACT_APP_* which Vite replaces at build time through the define option.
Proposed Solution
- Rename all env vars from
REACT_APP_*toVITE_* - Replace
process.env.REACT_APP_*access withimport.meta.env.VITE_* - Remove the manual
defineentries fromvite.config.ts(Vite handlesVITE_*automatically) - Update CI/CD configs (GitHub Actions, Netlify) to use the new variable names
- Update deployment scripts (
scripts/build-production.sh,scripts/build-staging.sh) - Update documentation if any references exist
Acceptance Criteria
- All
REACT_APP_*variables renamed toVITE_* - Code uses
import.meta.env.VITE_*instead ofprocess.env.REACT_APP_* -
definemap invite.config.tscleaned up (only non-env entries remain) - CI/CD and deployment configs updated
- Application works correctly in dev, staging, and production
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request