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

Fix import path for isPluginRequired and use correct built-ins #3673

Closed
wants to merge 2 commits into from
Closed

Fix import path for isPluginRequired and use correct built-ins #3673

wants to merge 2 commits into from

Conversation

perkola
Copy link

@perkola perkola commented Mar 19, 2019

Relates to #3671

@perkola perkola changed the title Fix import path for isPluginRequired and use correct build-ins Fix import path for isPluginRequired and use correct built-ins Mar 19, 2019
@andreineculau
Copy link

I guess you'd also want to mention in package.json that this change requires @babel/preset-env at ^7.4.0

@perkola
Copy link
Author

perkola commented Mar 19, 2019

I guess you'd also want to mention in package.json that this change requires @babel/preset-env at ^7.4.0

Good catch! I was a bit too quick. I have updated the PR now.

const { isPluginRequired } = require('@babel/preset-env')
const builtInsList = require('@babel/preset-env/data/built-ins.json')
const { isPluginRequired } = require('@babel/preset-env/lib/filter-items')
const builtInsList = require('@babel/preset-env/data/corejs2-built-ins.json')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Babel maintainer here 👋

We just released v7.4.1, which should fix the issue. The builtInsList change is correct, but I'd ask you to revert line 17 (it's better not to rely on internal files, when possible). You'll need to update the preset-env version in package.json.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for the quick reply. I noticed that you also aliased cosejs2 so both my changes are unnecessary right now. Perhaps we still need to change the path of built-ins.json if the alias is removed in the future.

@perkola
Copy link
Author

perkola commented Mar 19, 2019

This PR becomes obsolete with the release of @babel/preset-env v.7.4.1.

@perkola perkola closed this Mar 19, 2019
@nicolo-ribaudo
Copy link

Please update package.json to ^7.4.1 to avoid accidentally downloading 7.4.0

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.

3 participants