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

@parcel/transformer-babel: remove core-js dep #4434

Closed
wants to merge 1 commit into from
Closed

@parcel/transformer-babel: remove core-js dep #4434

wants to merge 1 commit into from

Conversation

fregante
Copy link
Contributor

@fregante fregante commented Apr 5, 2020

↪️ Pull Request

core-js isn't a direct dependency of @parcel/transformer-babel so it should not be listed as one.

Closes #4433

✔️ PR Todo

  • [/] Added/updated unit tests for this change
  • [/] Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@height
Copy link

height bot commented Apr 5, 2020

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

You can also use "Close T-X" to automatically close a task when the pull request is merged.

@fregante
Copy link
Contributor Author

fregante commented Apr 5, 2020

Cmd.exe exited with code '-1073741819'.

I think that windows test failed due to an unrelated memory issue. Maybe try re-running it.

@mischnic
Copy link
Member

mischnic commented Apr 5, 2020

As I've already commented in #4433, @babel/preset-env uses core-js if useBuiltins is set, which we do here for the default babel config:

useBuiltIns: 'entry',
corejs: 3,

According to babel, you should install core-js in that case:

WARNING: We noticed you're using the useBuiltIns option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the corejs option.

You should also be sure that the version you pass to the corejs option matches the version specified in your package.json's dependencies section. If it doesn't, you need to run one of the following commands:

npm install --save core-js@2 npm install --save core-js@3
yarn add core-js@2 yarn add core-js@3

https://github.com/babel/babel/blob/aeebc0823415ed4770c633cedf570cf774ae89c6/packages/babel-preset-env/src/normalize-options.js#L211-L222

@fregante
Copy link
Contributor Author

fregante commented Apr 5, 2020

According to babel, you should install core-js in that case:

Indeed, so #4433 is invalid and should be closed?

@mischnic mischnic closed this Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@parcel/transformer-babel: remove core-js dep?
2 participants