Browserslist provides browser compatibility configuration for JavaScript tools like Autoprefixer, Babel, ESLint, PostCSS, and Webpack. It helps you define browser support for your applications by using queries to select browser versions based on criteria such as usage statistics, specific versions, or features supported. This configuration ensures your applications are compatible with the desired audience while maintaining compatibility and minimizing bundle size.
Allows you to set a default browser list configuration using the 'defaults' query, which is a shortcut for '> 0.5%, last 2 versions, Firefox ESR, not dead'. It includes common browsers worldwide including Firefox's Extended Support Release.
Select browser versions based on their usage percentage worldwide, in a region, or country using queries like '> 5% in US' or '> 5% in my stats'.
Pick recent versions of each browser by using queries such as 'last 2 versions' or 'last 2 Chrome versions' to select the most recent two versions released.
Choose specific browser versions or a range of versions manually using queries like 'Chrome > 103' or 'Firefox > 20'.
Select specific Node.js versions or a version range for runtime configuration of server-side code using queries like 'node 12' or 'node 6.11.5'.
Pick browser versions that support specific features using feature support queries such as 'supports es6-module' or 'not supports css-grid'.
Combine multiple queries using ',' or 'and' to include various conditions, and use 'or' to separately apply different queries.
Use 'not dead' or '-5 versions' to exclude browsers without official support updates or those not updated in the last 24 months.