browserslist / browserslist

🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env

Home Page:https://browsersl.ist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shortcut for `installed browsers`

romainmenke opened this issue · comments

A common setup is to run tasks locally purely for development and to have a separate config for "production".

The development config might be something like last 1 firefox version, last 1 chrome version, last 1 safari version.

But this breaks easily when a team member is stuck on a slightly older OS or when not everyone updates everything immediately. Even chrome has rolling updates.

Setting to last N versions with N greater than 1 helps but also only goes so far.


I wonder if it is possible to detect what the installed browsers and their versions are.

If something like this were possible a config shortcut like local browsers or installed browsers would just work for everyone.

I afraid that this query will be very complex to support (a lot of OS-specific code).

Also I don’t like that it will have different result on different machines which is a little out of the idea of Browserslist.

What do you think of creating CLI tool chiech will generate this config (then you can put it to environment variable to use in any Browserslist’s tool).

a lot of OS-specific code

Indeed.

Even if OS-specific code is figured out you would still need to support all types of browsers, even mobile devices on a local network.

I don't think this is possible here in browserslist.

I think it could be a specific features of stacks that build assets on demand.
They can do user agent sniffing to determine which browser versions to build for.