-
Notifications
You must be signed in to change notification settings - Fork 49.3k
Revert "Remove object-assign polyfill (#23351)" #24124
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
Conversation
This reverts commit 1ad8d81.
Comparing: 645ec5d...2289768 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
LGTM |
The build clearly works on CI so this has something to do with your local environment. Maybe there’s some mistake that causes it to break on windows in particular? In any case, reverting that PR isn’t the way to go. Please find and address the root of the current problem. |
I found it was the bug of Rollup(see the fix in [email protected] on 22 May 2020): I try upgrade rollup to 2.10.6 and fix rollupConfig treeshake.pureExternalModules to treeshake.moduleSideEffects: pureExternalModules Then the problem is Babel seems doesn't transform the Object.assign.(When all is fun in mac but on my windows 10, Nodejs 16 and 17) |
See scripts\babel\transform-object-assign.js "Don't replace Object.assign if we're transforming shared/assign" React avoid transform object-assign by itself, but some where has change Object.assign to assign :( |
#24318 Solution to this problem |
This reverts commit 1ad8d81.
Closes #24103.
Summary
I just started to contribute to React repository. I followed the manual (https://reactjs.org/docs/how-to-contribute.html) and installed all the necessary tools before I start any major contributions. However, I noticed 'yarn build' does not work in the main branch and found out that from that commit yarn build started to fail.
How did you test this change?
I did 'yarn build' and 'yarn test'. This is not additional coding and the previous commits should have been already approved, so there should be no big issue.