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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix import path for isPluginRequired and use correct build-ins
  • Loading branch information
William Perkola committed Mar 19, 2019
commit 24143b68ebee3d40e0c1bd797c126fdc142f2513
4 changes: 2 additions & 2 deletions packages/@vue/babel-preset-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const defaultPolyfills = [
]

function getPolyfills (targets, includes, { ignoreBrowserslistConfig, configPath }) {
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.

const getTargets = require('@babel/preset-env/lib/targets-parser').default
const builtInTargets = getTargets(targets, {
ignoreBrowserslistConfig,
Expand Down