Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace CRA with Vite #1265

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Replace CRA with Vite #1265

merged 2 commits into from
Mar 1, 2024

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Jan 29, 2024

One way to resolve #1253.

Demonstration of replacing create-react-app with vite. Got this working in a couple hours.

Vite was chosen because:

  • Straightforward migration
  • Relatively similar set of opinions as CRA
  • Optimized for single page applications like ours
  • Popular

Fairly happy with this so far, if only for the fact that it let's us get rid of some old tech debt. And vite is indeed miles faster in development than CRA. Also gets the size of our build folder down from 9,8M to 1,7M.

ToDos:

  • Playwright broke, fix it.

One way to resolve opencast#1253.

Demonstration of replacing create-react-app with vite. Got this working in a couple
hours.

Vite was chosen because:
- Straightforward migration
- Relatively similar set of opinions as CRA
- Optimized for single page applications like ours
- Popular
@Arnei Arnei added type:dependencies Pull requests that update a dependency file type:code-quality Internal improvements to the codebase labels Jan 29, 2024
Copy link

This pull request is deployed at test.editor.opencast.org/1265/2024-01-29_14-40-37/ .
It might take a few minutes for it to become available.

Copy link

This pull request is deployed at test.editor.opencast.org/1265/2024-01-30_15-06-18/ .
It might take a few minutes for it to become available.

Fix port, as vite runs under a different port per default.
Also fix the environment variable path.
Copy link

This pull request is deployed at test.editor.opencast.org/1265/2024-01-31_11-20-00/ .
It might take a few minutes for it to become available.

Copy link
Contributor

@geichelberger geichelberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The build is still in the same folder, and Vite is working as expected.

@geichelberger geichelberger self-assigned this Feb 29, 2024
@geichelberger geichelberger merged commit 0445864 into opencast:main Mar 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:code-quality Internal improvements to the codebase type:dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of create-react-app
2 participants