Skip to content

Replace Create React App with Vite#605

Open
benkoppe wants to merge 8 commits intomasterfrom
bek76/vite
Open

Replace Create React App with Vite#605
benkoppe wants to merge 8 commits intomasterfrom
bek76/vite

Conversation

@benkoppe
Copy link
Contributor

@benkoppe benkoppe commented Oct 27, 2025

Summary

This PR replaces CRA (Create React App) with Vite. Builds are significantly faster, especially in development mode, and Vite is generally more extensible and convenient. It also appears to be very useful for PR #604 due to its native typescript support (more testing needed).

This change was very easy to do and appears to have only upsides, so it might be a good idea to go forward with. However, it is also totally unnecessary in general (barring what's mentioned above about its native ts support), so any hesitation is understood.

But it would be nice, because seriously builds are so much faster. For example, wait time on an initial run of npm run start/npm run dev on a new branch went from ~30 seconds to instant.

  • add vite dependencies
  • change files over to vite standards
  • remove create react app dependenices
  • rigorous testing to ensure everything still works

Test Plan

Tests with this change will need to be mostly manual, because Vite intends to work as a mostly transparent replacement for the same things once done by create react app.

Breaking Changes

  • IMPORTANT: In dev mode, we must now type npm run dev rather than npm run start.
  • IMPORTANT: All env variables in .env must be named to replace prefix REACT_APP with VITE
  • I removed some of the frontend scripts, test and eject, as I believe eject is only a create react app thing, and I didn't add Vitest.

@benkoppe benkoppe requested a review from a team as a code owner October 27, 2025 03:07
@CLAassistant
Copy link

CLAassistant commented Oct 27, 2025

CLA assistant check
All committers have signed the CLA.

@benkoppe
Copy link
Contributor Author

benkoppe commented Oct 27, 2025

I don't know why the changes to the github workflow are in here. That might need to be addressed.

@benkoppe
Copy link
Contributor Author

benkoppe commented Oct 27, 2025

I don't know why the changes to the github workflow are in here. That might need to be addressed.

Seems like I might have accidentally combined this PR with some changes made by @mjaydenkim and @selenaliu1 . Will look into fixing that ASAP.

@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 64.

@benkoppe
Copy link
Contributor Author

The problems mentioned in the two comments above have been addressed.

Base automatically changed from dka34/changes to master November 2, 2025 21:57
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.

3 participants