babel / babel/website

Docs: Specify @babel/present-env relations to common browsers such as Opera Mini

Open
#2,482 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
777
Forks
1.4k
Avg merge
16h 45m
Merged PRs (30d)
3

Description

## Feature Request

**Is your feature request related to a problem?**
https://babeljs.io/docs/en/babel-preset-env#how-does-it-work states that it follows https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json to know what plugins to pass to transpile code. https://babeljs.io/docs/en/babel-preset-env#browserslist-integration also recommends to use browerlist to specify targets.

But browserlist best practices https://github.com/browserslist/browserslist#best-practices states:
> Opera Mini has 100 million users in Africa and it is more popular in the global market than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox and desktop Safari combined.

It is thus confusing reading https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json and not seeing those browser there. Because if I run `npx browserslist` with `defaults` specified in `.browserlistrc`, I see many browsers (such as Opera Mini) not included in the `plugins.json` file. This means I assume it uses _all_ plugins to transform my code.

**Describe the solution you'd like**
I would like the docs to be clear here how it works for all common browsers not listed in `plugins.json`. The current text makes it sound like all my code will use all plugins.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the linked preset-env documentation pages and packages/babel-compat-data/data/plugins.json, then compare their explanation with Browserslist’s defaults guidance and the Opera Mini example. Done means the docs clearly explain how targets absent from plugins.json are handled and whether that means all plugins are applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.