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

Update polyfill.md #2798

Closed
wants to merge 1 commit into from
Closed

Update polyfill.md #2798

wants to merge 1 commit into from

Conversation

keer-tea
Copy link

@keer-tea keer-tea commented Jun 1, 2023

After my testing, it depends on the version of the @babel/plugin-transform-regenerator plugin whether the auxiliary function for the generator will be produced. It is not related to the version of @babel/core.

If the transforme-regenerator plugin version is lower than 7.18.0, the compiled file will not inline the generator auxiliary function. If the version of the transform-regenerator plug-in is higher than or equal to 7.18.0, auxiliary inline function will be generated.

Here is a warehouse address for my testing: https://github.com/keer-tea/babel-regenerator-test

There is one type of warehouse, with versions of both packages less than 7.18.0. In Warehouse 2, the @babel/core version is less than 7.18.0, and the @babel/plugin-transform-regenerator version is greater than 7.18.0. In Warehouse 3, the @babel/core version is greater than 7.18.0, and the @babel/plugin-transform-reenerator version is less than 7.18.0.

I hope to correct this mistake.

After my testing, it depends on the version of the @ babel/plugin transform generator plugin whether the auxiliary function for the generator will be produced. It is not related to the version of @ babel/core.

If the transformer generator plugin version is lower than 7.18.0, the compiled file will not inline the generator auxiliary function. If the version of the transform regenerator plug-in is higher than or equal to 7.18.0, auxiliary inline function will be generated.

Here is a warehouse address for my testing: https://github.com/keer-tea/babel-regenerator-test

There is one type of warehouse, with versions of both packages less than 7.18.0. In Warehouse 2, the @ babel/core version is less than 7.18.0, and the @ babel/plugin transform generator version is greater than 7.18.0. In Warehouse 3, the @ babel/core version is greater than 7.18.0, and the @ babel/plugin transform generator version is less than 7.18.0.

I hope to correct this mistake.
@netlify
Copy link

netlify bot commented Jun 1, 2023

👷 Deploy request for babel-next pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 20c8025

@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for babel ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 20c8025
🔍 Latest deploy log https://app.netlify.com/sites/babel/deploys/64782bb0fad0fb0008ea93b4
😎 Deploy Preview https://deploy-preview-2798--babel.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@nicolo-ribaudo
Copy link
Member

Thanks for this PR! I agree that the current documentation is not precise, however I think it might be good enough.

The real requirement is "you must have at least version 7.18.0 of @babel/plugin-transform-regenerator and @babel/helpers". @babel/helpers is a dependency of @babel/core. @babel/core 7.18.0 depends on @babel/helpers 7.18.0 so it's guaranteed to get a new enough version. However, @babel/core 7.17.12 depends on @babel/helpers ^7.17.9, so it might get an older version.

@JLHwung JLHwung closed this Jul 26, 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

3 participants