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

v7.4 for the browser : setup documentation for polyfills #10078

aavmurphy opened this issue Jun 10, 2019 · 2 comments


None yet
3 participants
Copy link

commented Jun 10, 2019

Bug Report

Current Behavior
Not sure if this is unclear documentation, or a bug.

  • Using Babel (cli) for a website.
  • One of the targets is IE11, which does not have (for ... of) and array.prototype.entries
  • Used the 'setup' page, 'cli' option (aside: in step 3, the devdependency for cli has the wrong version)

Output is minimised by uglifyjs

The transpiling is all good.

But the js fails in IE11, the array.entries() calls.

Checking the output code, there is no entries() polyfill

Checked the polyfill page. It says the polyfill module is now depreciated.

Either the the setup page / documentation

Input Code

for ( let [ i, point ] of points.entries() ) 
{ ... }

Expected behavior/code
no js error

Babel Configuration (.babelrc, package.json, cli command)

  "presets": [
    ["@babel/preset-env", { "targets":"ie 11" }  ]


  • Babel version(s): 7.4
  • Node/npm version: 8.10/3.5.2
  • OS: ubuntu
  • Monorepo: ?
  • How you are using Babel: cli

Possible Solution
update documentation


This comment has been minimized.

Copy link

commented Jun 10, 2019

Hey @aavmurphy! 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
that typically always has someone willing to help. You can sign-up here
for an invite.


This comment has been minimized.

Copy link

commented Jun 10, 2019

You can use the @babel/preset-env's useBuiltIns option if you are bundling your code; otherwise you'll need to manually import a polyfill (e.g. core-js-bundle or es6-shim + es7-shim)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.