feat(react): use vite and vitest rather than react-scripts #376
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.
react-scripts (the build system stamped out by create-react-app aka CRA) is no longer recommended by https://react.dev/learn/start-a-new-react-project and instead developers are encouraged to use 'a framework'.
In the "Can I use React without a framework?" section, they suggest rolling up your sleeves and just use a bundler like Vite - that's what we do here.
This PR mostly prepared just by following public guides, such as
https://dev.to/henriquejensen/migrating-from-create-react-app-to-vite-a-quick-and-easy-guide-5e72
Note that vitest just hit 1.0 three days ago (as of this writing) so it's good timing for us to demonstrate adoption. We got some confidence in this recommendation since Sourcegraph recently did it: https://github.com/sourcegraph/sourcegraph/pull/57886