-
Notifications
You must be signed in to change notification settings - Fork 323
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
Migrating from create-react-app to vite #305
Conversation
This looks great @Pelsin! Tested it out and everything is working, along with the reduced bundle size 😄 Regarding the eslint rules, I ran The only rule I might want to add would be turning off |
# Conflicts: # www/.env
@FeralAI Nice, thanks for the quick review! Added the Resolved conflict so should be good to go then! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid! Will be cool to get our webpage up to a more modern framework.
This PR aims to migrate from create-react-app(CRA) to vite as CRA is no longer recommended. Since CRA has been stale for awhile we have a lot of deprecated dependencies:
Bundle before:
Bundle after:
Also changes files to .jsx which should make the bundling faster, it also helps us if we want to start migrating some of the files to TS further down the line, and helps the intelliSense that went bananas on some earlier files that where .js but had some TS in them.
The dev server has been converted to esm and also gets the .env which did not work before.
linting in CRA was quite opinionated and the one in this pr is using lots of defaults.
@FeralAI do you have some suggestions on rules that should be added?
I started out rewriting everything to TS but that was quite overwhelming(main...Pelsin:GP2040-CE:vite-typescript), so decided to make this PR and breaking it up best to my abilities.
Sorry for the wall of text and big PR!