Browserslist is a configuration tool for sharing target browser and Node.js versions across front-end tools like Autoprefixer, Babel, and Stylelint. Current stable version is 4.28.2, released in early 2025. It uses caniuse-lite data to resolve queries like 'last 2 versions' or '> 1%' in a .browserslistrc file or package.json. Key differentiators: single source of truth for browser targets, broad adoption, and a query DSL that supports ranges, regions, and custom statistics.
npm install browserslistVerified import paths — ran on the pinned version, not inferred.
Shows how to import, query browsers, and get coverage with Browserslist, including config file usage.
Switch to ESM imports (import browserslist from 'browserslist') or use dynamic import() in CJS.
Add a region (e.g., 'last 1 version, not dead') or use '> 1%' for more targeted results.
Upgrade to browserslist@4.28.2 or later.
Upgrade to browserslist@4.25.3 or later.
Upgrade to browserslist@4.25.2 or later.
Ensure you are using the appropriate module system: use import in ESM files and require in CJS files, or configure 'type': 'module' in package.json.
Either pass a query string or add a 'browserslist' key in package.json or create a .browserslistrc file.
Use valid queries like 'last 2 versions', '> 1%', 'firefox ESR', or 'node 12'.
No dependency data recorded yet.