-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor, move from react-scripts to vite #333
base: dev
Are you sure you want to change the base?
Conversation
e7ad0d7
to
f45d520
Compare
906ede8
to
f1c9f89
Compare
- vis-network-react is distributed as CommonJS instead of ESM
8afa38f
to
a59fca5
Compare
b653dbb
to
06bf0ea
Compare
3584582
to
8476ff2
Compare
Hey @jimmyzhen this PR is ready for a review |
8476ff2
to
e4b3509
Compare
# Conflicts: # src/AnalysisPage/pass1b06PhenotypeAnimal.jsx # src/AnnouncementsPage/announcementsPage.jsx # src/DataAccess/dataAccessPage.jsx # src/DataStatusPage/dataStatusPage.jsx # src/DataSummaryPage/dataSummaryPage.jsx # src/LandingPage/landingPage.jsx # src/LinkoutPage/linkoutPage.jsx # src/MainStudy/mainStudy.jsx # src/ReleasePage/releasePage.jsx # src/sass/landingPage.scss
I deployed this PR to our Kubernetes testing website. You can verify that there are no regressions on this website. This PR significantly improves Lighthouse scores, and since Lighthouse is one aspect used by Google to determine search rankings, this should help with SEO as well. Additionally, notice the |
# Conflicts: # src/LandingPage/landingPage.jsx # src/LandingPage/openOfficeHour.jsx # src/sass/landingPage.scss # src/sass/main.scss # yarn.lock
e389737
to
43d12a5
Compare
This PR introduces a number of changes.
React no longer maintains
create-react-app
, and a number of the packages that the frontend were using have long been deprecatedHere are all the changes introduced by this PR:
react-scripts
->vite
refactorreact-scripts
withvite
react-scripts
has long been deprecated in favor of full-stack frameworks like Gatsby, NextJS, or Remixreact-scripts
package.json scripts withvite
commandsprocess.env
accessor toimport.meta
REACT_APP_
style environment variables supported bycreate-react-app
toVITE_
style environment variables supported byvite
vite.config.js
, usingreact-swc
React compiler plugin.vite-plugin-image-optimizer
for optimizing imagesreact-router
v5 to v6 upgradeRedirect
component withNavigate
componentwithTracking
HOC with a wrapper layout router with the same functionalityPrivateRoute
with a newAuthWrapper
necessitated by direct-rendering changes in v6lazy
docs to see how code splitting workslazy
docs on React Router for howlazy
loading routes works<Suspense>
element (located inApp.js
, which currently renders a blank<div>
instead of any loading viewsReplace
jest
withvitest
react-scripts
necessitates the introduction of a test frameworkvitest
is a drop-in replacement forjest
that works for thevite
frameworkCode Split CSS
main.scss
SCSSSCSS
imports to individual pages@import
with@use
or@forward
, ahead of deprecation of@import
Misc changes
Regressions
REACT_APP_
-styled env vars are replaced byVITE_
style env vars