“last 2 versions” considered harmful

When using babel-preset-env with the list of supported browsers set to "last 2 versions" – which I am doing used to do – you’re basically supporting browsers that are dead or have no users.

Take Internet Explorer for example. It’s been replaced by Edge and will never have any new versions after Internet Explorer 11. Microsoft gave us that gift.

But if you say that you support the “last 2 versions” of every browser, that means you support the last 2 versions of Edge AND the last 2 versions of Internet Explorer.

And since there’s never going to be another version of Internet Explorer, you will be supporting Internet Explorer 10 & 11… forever.

The personal recommendation of the author is this setting:

"browsers": [
  ">0.25%",
  "not ie 11",
  "not op_mini all"
]

“last 2 versions” considered harmful →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Join the Conversation

2 Comments

  1. The author isn’t very informed about Opera Mini (neither am I, but I try 😅). Opera Mini is used by millions of people (e.g., it has 19% share in Africa), and by people who don’t have a choice (e.g., feature phones). It may make sense to exclude it in some cases (after discussing it and testing), but it just makes no sense as part of a general recommendation. Are we at a point where we just ignore all these users by default?

    1. Yeah. Once saw a talk by Bruce Lawson on exactly this. Different countries/continents behave differently. Opera Mini is not a thing here in Belgium/Europe/North America, but it is (or “was“ by now?) in many other countries – mostly those with bad mobile connectivity.

      Same goes for different user groups in the same country. Two years ago I worked for a company that created apps and games for children. The browser landscape for those users consisted of lots of older versions of modern browsers. The main reason to this was the fact that they were using their parents their old smartphones – still running older Android/iOS versions – as they (the parents) upgraded to new ones and gave away their old ones to their children.

      So as per usual: “it depends”.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.