babel / babel/website

@babel/present-env and no targets improvements

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

Description

Hi!

I have read https://babeljs.io/docs/en/babel-preset-env#no-targets and think I've gotten the gist of it, but I believe the docs are unclear. I will try to point out why:

1. The below quote (and the preceding text) it not correct if you have a browserlist config such as `.browserlistrc`. I feel this text could be made more clear. The subsequent does make it _slightly_ more clear. But I believe the section could be made much more intuitive by starting stating "If you have no [browserlist config sources](https://github.com/browserslist/browserslist#queries) specified..."

> We don't recommend using preset-env this way because it doesn't take advantage of its ability to target specific environments/versions.

2. The below quote states "_either explicitly_", then I do not see a reason to check the "No targets" section.

> Please note that if you are relying on browserslist's defaults query (either explicitly or by having no browserslist config), you will want to check out the No targets section for information on preset-env's behavior.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.