website icon indicating copy to clipboard operation
website copied to clipboard

Add a note about preset-env browserlists behavior

Open ylemkimon opened this issue 6 years ago • 5 comments

@babel/preset-env only uses Android, Chrome, Edge, Firefox, IE, iOS, Safari, Node versions for detecting which transforms to include:

https://github.com/babel/babel/blob/e875fc7bc11ffdb8d5176028ae2b336bf7455c6c/packages/babel-preset-env/src/targets-parser.js#L32-L42

and silently ignores other browsers:

https://github.com/babel/babel/blob/e875fc7bc11ffdb8d5176028ae2b336bf7455c6c/packages/babel-preset-env/src/targets-parser.js#L72-L76

ylemkimon avatar Aug 27 '18 16:08 ylemkimon

Deploy preview for babel ready!

Built with commit 2d2e17549d87954435b46d276caf92928654c01f

https://deploy-preview-1774--babel.netlify.com

babel-bot avatar Aug 27 '18 16:08 babel-bot

Deploy preview for babel ready!

Built with commit 134256a200fbc2a1fc5c76a0ba1880dbafadc284

https://deploy-preview-1774--babel.netlify.com

babel-bot avatar Aug 27 '18 16:08 babel-bot

@ylemkimon let's update this section to be more explicit:

Example environments: chrome, opera, edge, firefox, safari, ie, ios, android, node, electron.

https://github.com/babel/website/blob/master/docs/preset-env.md#targets

existentialism avatar Aug 27 '18 16:08 existentialism

@existentialism I've moved the note to Targets section.

ylemkimon avatar Aug 27 '18 16:08 ylemkimon

Now, I realize opera is missing from browserNameMap in preset-env. I'll send a PR to babel/babel.

ylemkimon avatar Aug 27 '18 16:08 ylemkimon