Skip to content
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

[global] fix transform-runtime helpers import #545

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

bbutkov
Copy link
Contributor

@bbutkov bbutkov commented Feb 20, 2023

Fixing the problem of incorrect helper imports

Description + Motivation and Context

Due to a bug in babel-runtime, not all helpers are imported correctly, instead, some of them are simply inlined INTO EVERY module, which affects code size and performance degradation

These are links to a detailed description of the problem

babel/babel#10334
babel/babel#10261
facebook/docusaurus#2111

This fix will definitely improve code size and performance, but to make it even better, you need to get rid of babel-runtime-helper and use @babel/preset-env with properly configured browserslist, then native method will be used for the same code spread

How has this been tested?

All tests passed, build does not crash, website works locally

Screenshots (if appropriate):

Before:
before-core

After:
after-core

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@bbutkov bbutkov marked this pull request as ready for review February 20, 2023 15:08
@lsroman
Copy link
Contributor

lsroman commented Feb 21, 2023

Thank you very much for work you have done!

@lsroman lsroman merged commit c04f767 into semrush:master Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants