less than 1 minute read

In times where most JavaScript is not written for the browser directly but runs through one (or many) tools that transform the syntax and APIs used, it has become a lot easier to be compatible with a wider range of browsers. In order to keep the size of the generated code reasonable, it’s necessary to limit the set of browsers and browser versions supported.

Browserslist allows developers to declare these browsers and versions, from which it generates the support matrix. Other tools can use this information when the transpile or generate code. One of them is Babel, the JavaScript compiler.

If you develop an app for Nextcloud, it makes sense to use the same support matrix to ensure that your code is compatible with the same browsers. For this purpose we created and released a shared Browserslist config: @nextcloud/browserslist-config.

To use the shared config, install it via npm and let the share config extend your specific one (if any). Details about installation and usage can be found on the package website.

I hope this is useful for Nextcloud app developers. Any feedback or changes on the support matrix may be submitted on Github :v: