-
Notifications
You must be signed in to change notification settings - Fork 28
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
Override webpack crypto function by ejecting React Apps v4 - unblocking node version upgrades #812
Conversation
Looks like yarn |
FYI (not relevant to the current problem .. just an FYI that might trip you up; be sure check the logs) "yarn test "on CI github actions will fail if there no tests. (this is currently true in our main branch and could be true in your PRs) |
@harsh183 Maybe "/Users/harsh183/Experiments/FrontEnd/src" in package.json ....should just be 'src' ? :-)
|
Strange that the Docker.yaml is failing. As a quick sanity test I created an almost empty PR based on staging -
|
I was able to reproduce the github actions build error by trying to create the docker image locally, |
I'm okay merging this in - assuming there's no other changes you want to add at this time. |
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.
LGTM
In the future, if we add Babel configs etc, be sure to update Dockerfile to copy them into the image
Oh, I had no idea it would need Docker changes, thanks for debugging! In theory, create react scripts is not supposed to change anything functionally but just expose the abstraction out. Glad we don't have the starter template things anymore now |
I love create-react-app facebook devs not understanding the differences between filepaths |
Successfully verified with Node versions 18, 20 and 22 (latest). I think we should be able to upgrade our node, react and any other major versions after this.
After a false start #810, I was able to use a minor version upgraded version of react scripts to eject. After ejecting, I was able to override the MD4 algorithm to SHA256 (stackoverflow).
The underlying issue in #789 was that openssl just permanently blocked MD4 (insecure since the 90s) while webpack 4 was using it. Upgrading to webpack 5 was a lot of work (#810) with dubious benefits, so a simpler solution was to patch the encryption algorithm used to something modern.
Edit: Don't forget to squash merge