Clarify polyfilling and browserlist usage documentation
See original GitHub issueHi,
The docs about supported browsers is not clear.
After reading it i still dont understand the following :
- If the polyfills are not imported, what the browserlist field in package.json is used for ?
- If i need to support ie11 (and Array.includes for example), what do i need to do exactly ?
- Is @babel/preset-env used to automatically require polyfills ?
- Moreover the docs from @babel/preset-env (included with preset react app) indicates to import @babel/polyfill which is now deprecated.
react-app-polyfill/stable.js
requires the correct packagecore-js/stable
but is browserlist still used using this file ?
Thanks for your help
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Passably Explained - Browserslist - Alexander Morse
Often, some documentation will go on to explain that you're defining a collection of "target browsers" that ensures your code will work on ......
Read more >Recommended way to add polyfills depending on a list of ...
You likely are looking for browserslist and babel-preset-env - both have pretty great documentation on how they work together.
Read more >Shimming
In this case, you may only want to deliver those polyfills to the browsers that need ... Let's start with the first use...
Read more >How to Support IE11 Users as You Move to Angular 13
Update tsconfig.json to use ES5 and update polyfills.ts for ES6/ES7 ... the version of Angular, it will be .browserslistrc or browserslist .
Read more >babel-preset-env
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can someone answer the questions raised by the topic starter one by one?
@petetnt yep I’ve noticed that. But instead of polyfilling everything I’ve just polyfilled features that I needed using
core-js
and it works. Would assume that when I usebrowserslists
it should automatically polyfill everything that’s needed and also detect what features I’m using and only polyfill them. That would be ideal scenario.