Right now we have a very wide babel config: basically the last 2 versions of browsers and IE11.
However this might not be the best selection as this will include the last version of all browsers (see also https://jamie.build/last-2-versions). Even EOL browsers that get no more new versions.
I think we should more carefully craft this list to list what we support. So if browsers get better at supporting ES6 functions etc we actually take advantage of it.
CC: @nextcloud/javascript @MorrisJobke
I think defaults might do?
It includes: > 0.5%, last 2 versions, Firefox ESR, not dead which is totally okay imo.
last 2 versions
We only support currently the last version of IE for example. Also except for IE 11 and Opera Mini (which is used on more devices than thought) the list should be fine.
In general it should include the last 1 or 2 versions of:
@ChristophWurst @juliushaertl any thoughts?
How about that:
https://browserl.ist/?q=last+2+versions+and+%3E0.5%25+and+not+dead+and+not+not+op_mini+all
This includes the above list we mention in our docs as well as samsung internet which shouldn't be an issue as it is chromium based. Not sure If we want to include that?
Global coverage:83.67%
Seems a bit low to me :/
https://browserl.ist/?q=defaults+and+not+dead+and+%3E0.5%25+and+not+op_mini+all
Global coverage:87.43%
IMO it's worth taking a look at https://github.com/browserslist/browserslist#best-practices.
Based on (the note about Opera Mini is also what @MorrisJobke mentioned) I go the following query: https://browserl.ist/?q=defaults+and+last+2+version+and+%3E0.2%25+and+not+dead -> Global coverage:86.03%
Sure, is there any specific issues for opera mini @juliushaertl ?
I think we discussed some time ago to exclude it because no one has ever tested I guess :wink:
Good point. But I'd still rather have a few more polyfills shipped with our code if there is the chance that some opera users out there want to use our product. We can never know who/where Nextcloud is deployed, so I'd play it safe.
There is also the option to just document what is "official", as in platforms we test our stuff against, and platforms we try to be compatible to without any guarantees.
So basically done in https://github.com/nextcloud/browserslist-config-nextcloud
Most helpful comment
Good point. But I'd still rather have a few more polyfills shipped with our code if there is the chance that some opera users out there want to use our product. We can never know who/where Nextcloud is deployed, so I'd play it safe.
There is also the option to just document what is "official", as in platforms we test our stuff against, and platforms we try to be compatible to without any guarantees.