.browserslistrc Builder

Generate a Browserslist config controlling transpilation targets

Takes a global usage threshold, a last-N-versions count, and exclusion rules, then outputs a .browserslistrc file or a package.json browserslist field that Babel, Autoprefixer, and bundlers read to decide their targets.

What reads the Browserslist config?

Babel preset-env, Autoprefixer, PostCSS plugins, and bundlers like webpack and Vite all share this config to decide which transforms and prefixes to apply, so one query controls your whole toolchain.

Control your build targets with one query

Browserslist is the shared source of truth that Babel, Autoprefixer, and bundlers consult to decide which browsers to transpile and prefix for. Get it wrong and you either ship bloated polyfills for browsers nobody uses or break the experience for a real audience. This builder turns a few choices into a precise query.

How it works

The output is a list of Browserslist queries, combined with the implicit AND that Browserslist applies between lines and the OR within comma lists. A last N versions query selects recent releases, while a > X% query keeps only browsers above a global usage share, narrowing the set. Negative queries like not dead and not ie 11 subtract abandoned or unwanted browsers. The result resolves against the bundled Can I Use dataset at build time, so the same config adapts as browser usage shifts.

Tips and example

A common production query is > 0.5%, last 2 versions, not dead, which targets mainstream browsers while dropping the long tail. Lower the percentage to widen support, or raise it to shrink bundles. For modern-only builds add not op_mini all and drop older version counts. Place the result in .browserslistrc, or use the package.json field to keep configuration centralized for a small project.