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

[preset-env] corejs option doesn't compatible with exclude option #9948

Closed
lili21 opened this issue May 6, 2019 · 3 comments
Closed

[preset-env] corejs option doesn't compatible with exclude option #9948

lili21 opened this issue May 6, 2019 · 3 comments
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@lili21
Copy link

lili21 commented May 6, 2019

Bug Report

Current Behavior

Error Message:

image

Input Code

  • REPL or Repo link if applicable:
var your => (code) => here;

Expected behavior/code
A clear and concise description of what you expected to happen (or code).

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

module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        useBuiltIns: 'usage',
        corejs: 3,
        exclude: ['es6.promise']
      }
    ]
  ]
}

Environment

  • Babel version(s): v7.4.4
  • Node/npm version: node 10/npm 6
  • OS: OSX 10.14.3
  • Monorepo: no
  • How you are using Babel: rollup-plugin-babel

Possible Solution

Additional context/Screenshots

Change corejs options from 3 to 2 will fix the error message.

@babel-bot
Copy link
Collaborator

Hey @lili21! 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

You can find the polyfill names at https://github.com/zloirock/core-js/tree/master/packages/core-js/modules: it should be es.promise.

@lili21
Copy link
Author

lili21 commented May 6, 2019

Thanks. The error message is kind of misleading.

@lili21 lili21 closed this as completed May 6, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants