community
community copied to clipboard
Which browsers/versions do we support?
Our JS community guidelines say what Node version we support, but what about browsers?
We use @babel/preset-env, which means we don't have to worry about not using new language features, but I believe it sometimes polyfills depending on support in the current runtime which can lead to problems where detecting native support for something is required (e.g. see the section "Using ES2017 async functions" -> https://caolan.github.io/async/ (can't deep link, sorry)).
@vmx has found this list in the Aegir source code:
exports.browserslist = [
'>1%',
'last 2 versions',
'Firefox ESR',
'not ie < 11'
]
It was last updated 9 months ago - worth adding to our contributing docs?
@achingbrain good find!
IIRC last 2 versions may be a problematic entry – it pulls in some fringe vendors with less than 1% of market penetration, which in turn introduces polyfils for them.
Babel team discourages the use of it: https://github.com/babel/babel/issues/7789
This website provides handy visualization what the current browserslist really means:
- https://browserl.ist/?q=%3E1%25%2C+last+2+versions%2C+Firefox+ESR%2C+not+ie+%3C+11
- without
last 2 versions: https://browserl.ist/?q=%3E1%25%2C+Firefox+ESR%2C+not+ie+%3C+11