7

A Shared Browserslist Configuration for Nextcloud Apps

 3 years ago
source link: https://blog.wuc.me/2019/10/22/shared-browserslist-config.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Christoph Wurst

Christoph Wurst

Free and open source software enthusiast. Hobbyist Photographer. Developer at Nextcloud GmbH.

A Shared Browserslist Configuration for Nextcloud Apps

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:

Tags: development foss javascript nextcloud

Updated: October 22, 2019

Previous Next

You May Also Enjoy


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK