babel / babel/babel-upgrade

SUGGESTION: Modify useBuiltIns for babel-preset-env in babelrc

Open
#104 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
53
PR merge metrics
No merged PRs in 30d

Description

The supported values for the `useBuiltIns` option of `babel-preset-env` config changed from Babel v6 to Babel v7. It used to be just a boolean in v6. However, in v7, the supported values are `false`, `"usage"` or `"entry"`. (https://babeljs.io/docs/en/babel-preset-env#usebuiltins)

I suggest that babel-upgrade supports automatically converting an option of `useBuildIns = true` to one of `"usage"` or `"entry"`. This helps remove a manual operation that the developer will have to do, possibly forget about (since this option change is not mentioned in the [Babel v7 Upgrade Guide](https://babeljs.io/docs/en/v7-migration)).

I hope this suggestion is helpful.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the babel-upgrade handling for `.babelrc` and the `useBuiltIns` option, then read the linked Babel preset-env documentation and Babel v7 migration guide. Determine whether `true` should map to `"usage"` or `"entry"`; done means the upgrade handles the selected conversion consistently without requiring the manual operation described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.