-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove react-scripts (SCP-5143) #1799
Conversation
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.
Nice! Related upstream CRA issue: facebook/create-react-app#13186.
Do things work if the new 3 packages are moved from dependencies
to devDependencies
? If so, that'd enable faster build times, and (theoretically, due to less JS being downloaded and parsed) slightly faster page load times.
@eweitz good idea, locally it appears moving the 3 new dependencies to |
Looks like all the yarn tests are failing with the same import issue:
|
We were alerted by App-sec that the dependency "NTH-check" had a vulnerability that required updating. Further investigation by the team determined NTH-check is occurring in react-scripts and it appears that react-scripts is no longer being maintained. Therefore we opted to remove react-scripts from our code.
Since the team already did a huge chunk of work moving to Vite the lift was not too large to remove react-scripts now.
The changes in this PR were tested locally and on staging. Tests all passed locally, builds built on staging and locally, and running through the release engineering tests on staging all worked as expected.
In removing react-scripts yarn required adding three dependencies around an existing dependency
postcss
Testing locally you can pull this branch and run
bundle install
andyarn install
and boot up vitebin/vite dev
and boot up a local server
./rails_local_setup.rb && source config/secrets/.source_env.bash && bin/rails s
and confirm you can see localhost