community icon indicating copy to clipboard operation
community copied to clipboard

Which browsers/versions do we support?

Open achingbrain opened this issue 6 years ago • 3 comments

Our JS community guidelines say what Node version we support, but what about browsers?

achingbrain avatar Feb 05 '19 17:02 achingbrain

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)).

achingbrain avatar Feb 05 '19 17:02 achingbrain

@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 avatar Feb 05 '19 17:02 achingbrain

@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

lidel avatar Mar 02 '19 19:03 lidel