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

Should @babel/polyfill not be used in entry-level usage docs? #12401

Open
1 task done
AndrewSouthpaw opened this issue Nov 25, 2020 · 3 comments · May be fixed by babel/website#2424
Open
1 task done

Should @babel/polyfill not be used in entry-level usage docs? #12401

AndrewSouthpaw opened this issue Nov 25, 2020 · 3 comments · May be fixed by babel/website#2424

Comments

@AndrewSouthpaw
Copy link
Contributor

Bug Report

  • I would like to work on a fix!

Current behavior

The Usage Guide Overview talks about installing @babel/polyfill, which is now deprecated.

Expected behavior

The guide would provide instructions for the more contemporary way of providing polyfills with core-js and regenerator-runtime.

Environment

Web

Possible Solution

Could be some pretty easy docs updates, would be happy to write them if I get can a 👍 from someone on the team.

@babel-bot
Copy link
Collaborator

Hey @AndrewSouthpaw! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@nicolo-ribaudo
Copy link
Member

Yes please! 👍

If you need any help feel free to ask.

@aavmurphy
Copy link

aavmurphy commented Feb 17, 2021

This is a really important fix.
[For web js]
'transpiles' work well, but I was unable to figure out how core-js and regenerator-runtime worked, or if they were needed.
With the debug option set, I get a useBuiltIns not set warning messsage (but not which input-js/polyfills caused it).
If I set useBuiltIns, I get lots of duplicated 'import' statements in the output js (is import safe web js?)

  • why not just one import each
  • should the actual polyfills be included in the output js, or do i need a separate <script src=file>

I'm obviously missing something.
This might be a separate issue, but some debug message like "array.entries() needs a 50K polyfill because of safari 10.x" would be useful. Use it 100x, OK, use it once, it might be simpler to use an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants