Skip to content

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

Open
babel/website
#2424
@AndrewSouthpaw

Description

@AndrewSouthpaw
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.

Activity

babel-bot

babel-bot commented on Nov 25, 2020

@babel-bot
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

nicolo-ribaudo commented on Nov 26, 2020

@nicolo-ribaudo
Member

Yes please! 👍

If you need any help feel free to ask.

aavmurphy

aavmurphy commented on Feb 17, 2021

@aavmurphy

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @AndrewSouthpaw@aavmurphy@nicolo-ribaudo@babel-bot

      Issue actions

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