Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[global] fix transform-runtime helpers import (#545)
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:** <img width="897" alt="before-core" src="https://user-images.githubusercontent.com/12624143/220091398-99e0fe54-7e46-414d-ae20-7f2221069909.png"> **After:** <img width="800" alt="after-core" src="https://user-images.githubusercontent.com/12624143/220091435-6b364fce-513b-4b53-894a-6caadac2593b.png"> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] 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: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly.
- Loading branch information