Managing browsers support
The current browsers support defined in
"browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ],
It’s like this since the first commit on this GitLab instance, so I was wondering if it was kind of a generic/temporary decision that hasn’t been tackled, yet, or if it’s intended.
- Instead of putting browser support, Post CSS config and ES Lint config in the
package.json, they can respectively be moved to
two centsbrowsers support recommandations:
- Only keep IE 11 because Microsoft officially dropped support for lower than 11.
- Don’t not use
last 2 versions, and do not use
> x%. Instead, I think it’s better to explicitly declare which browsers are supported: it’s a bit more verbose, but it’s less blurry and there are less risk to accidentally kick out some users because “ooops, [popular device X] won’t receive any update anymore and they are using [browser Y current version minus 3… and minus 4 in a few weeks]”. So when you choose to drop browser support, you do it on purpose. And when someone report a bug linked to some browser behaviour, you have a clear documented browser policy to decide if the bug should be fixed or not.
This is important as most front-end tools heavily relies on Browserslist to decide how JS and CSS should be transformed, creating very heavier or lighter bundles for the end users. At least Post CSS, Babel, Autoprefixer and Webpack use Browserslist.