-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Re-enable dead-code removal for React DevTools #21904
Conversation
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
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.
Works great, able to run the build locally again
warnings: false, | ||
negate_iife: false, | ||
keep_fnames: true, | ||
keep_infinity: true, |
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.
I kinda wish all the true
s were together at the top or something, but I don't care
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.
These are to disable functionality enabled by default in the compressor. The UglifyJS options aren't really consistent in that respect. https://github.com/mishoo/UglifyJS2/tree/v2.x
💚 Build Succeeded |
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
In #21809 we disabled compression for JS assets. However, this raises an issue for those with React DevTools installed, throwing the following error:
Re-enabling these functions requires ~11% more memory, though still keeping us under a 1GB heap. It also increases the production build time by 30%. While overall this is still an improvement from where we started prior to #21809, it gets us out of the OOM issue originally causing these changes.
Going forward, we should apply compression on the code during the build to avoid it entirely in production.