browserslist
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
caniuse-lite | 1.0.30001615 | 1.95 MB | CC-BY-4.0 | prod | 1 1 |
electron-to-chromium | 1.4.754 | 280.08 kB | ISC | prod | |
escalade | 3.1.2 | 4.25 kB | MIT | prod | |
node-releases | 2.0.14 | 4.52 kB | MIT | prod | |
picocolors | 1.0.0 | 2.35 kB | ISC | prod |
Browserslist is an advanced tool used to share targeted browsers and Node.js versions across various front-end tools such as Autoprefixer, Babel, postcss-preset-env, eslint-plugin-compat, stylelint-no-unsupported-browser-features, postcss-normalize, and obsolete-webpack-plugin. It's an essential instrument to ensure cross-browser compatibility by allowing developers to specify a list of browser versions their project needs to support.
To use Browserslist, you need to add a specification to your project's package.json file or a .browserslistrc configuration file. Using this utility, developers can set their version lists using queries like 'last 2 versions' freeing them from manually updating versions.
Here is how you can include it in your package.json:
"browserslist": [
"defaults and fully supports es6-module",
"maintained node versions"
]
Alternatively, use a .browserslistrc config file:
# Browsers that we support
defaults and fully supports es6-module
maintained node versions
For a visual representation of how your configuration works, you can check your settings on the Browserslist playground.
Browserslist has extensive documentation which can be accessed from their GitHub repository. You can find the complete documentation, full of valuable information and examples that help you understand and master this tool, here.