babel / website

:globe_with_meridians: The Babel documentation website
https://babeljs.io/docs/en/index.html
MIT License
753 stars 1.31k forks source link

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

Open aavmurphy opened 5 years ago

aavmurphy commented 5 years ago

Bug Report

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

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" }  ]
    ]
}

Environment

Possible Solution update documentation

babel-bot commented 5 years ago

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

nicolo-ribaudo commented 5 years ago

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)

pajaydev commented 5 years ago

@nicolo-ribaudo can I help in updating the doc ?. If I am not wrong, we need to update it here polyfill.md

babel-bot commented 4 years ago

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