Migrate from Create React App to Vite#11
Draft
MatissJanis wants to merge 3 commits into
Draft
Conversation
…encies Replace CRA (react-scripts 5.0.1) with Vite 7 for faster builds and dev server, and Jest with Vitest for testing. Upgrade all dependencies to latest compatible versions while keeping React 18.x and react-table v7 for compatibility. Key changes: - Add vite.config.ts with Chrome extension manifest plugin and zip packaging - Move index.html to project root (Vite convention) - Migrate env vars from REACT_APP_* to VITE_* (import.meta.env) - Update tsconfig for Vite (moduleResolution: bundler, ES2020 target) - Fix type errors from upgraded @nivo, react-datepicker, react-error-boundary - Update CI workflow to use actions/checkout@v4 - Remove CRA-specific files (config-overrides.js, react-app-env.d.ts) https://claude.ai/code/session_01MAoY1GeP9o8DuUPS9ETvDw
…rn 4 - Skip Bugsnag initialization when no API key is set (fixes dev crash) - Update husky config to modern v9+ format (fixes deprecation warning) - Migrate from Yarn 1 to Yarn 4 with node-modules linker - Update CI workflows to use --immutable instead of --frozen-lockfile Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
This PR migrates the project from Create React App (CRA) with react-scripts to Vite as the build tool and Vitest for testing. This modernizes the build pipeline with faster development server startup and HMR, while also updating all dependencies to their latest versions.
Key Changes
Build Tool Migration
react-scriptswith Vite and@vitejs/plugin-reactvite.config.tswith custom Chrome extension manifest generation pluginconfig-overrides.js(CRA customization file)public/index.htmlto rootindex.htmlwith module script referenceTesting Framework Migration
src/setupTests.tsto use Vitest imports and mocking APIjsdomenvironment configuration for DOM testingtestruns once,test:watchfor watch modeEnvironment Variables
REACT_APP_*toVITE_*prefix convention.envfile with new variable namessrc/vite-env.d.tsfor Vite client type definitionsimport.meta.envinstead ofprocess.envTypeScript Configuration
tsconfig.json:es5toES2020moduleResolutionfromnodetobundlersrc/*srcandvite.config.tsDependency Updates
graphql-anywherewith direct type imports (removed unused dependency)query-stringwithqsfor query parameter handlingSource Code Updates
PropertyPriceChart.tsxfor Nivo v0.99.0 compatibilityreact-places-autocompletecompatibilityactions/checkout@v4Package.json Metadata
"type": "module"for ES modulesdescriptionandauthorfieldsstart→dev, addedpreview, updatedbuildandtestresolutionsfield to pin React types versionsNotable Implementation Details
extension.zipusingvite-plugin-zip-packjs/bundle.jsfile)https://claude.ai/code/session_01MAoY1GeP9o8DuUPS9ETvDw