Browserslist in 2026: From "defaults" to a Modern Build Target

Browserslist: From "defaults" to a Modern Build Target

Browserslist is policy, not config — one file drives Babel, PostCSS, eslint-plugin-compat, a Stylelint plugin, and Vite's legacy plugin together. What defaults means, and the modern alternative.

Browserslist is the team's compatibility-policy artifact — a single config that drives Babel, PostCSS Preset Env, Autoprefixer, eslint-plugin-compat, a Stylelint plugin, and Vite's legacy plugin together. Many projects still run on the defaults query (it is also what browserslist falls back to when no config exists), which keeps older engines in the target and ships transforms and polyfill bytes that modern users do not need — how many bytes depends on the app, so measure it on your own build. This guide shows what defaults actually expands to, how a modern Baseline-aligned target cuts polyfill payload, when differential serving via @vitejs/plugin-legacy is worth it, and how to wire browserslist changes through CI as policy rather than config.

What browserslist actually controls

Browserslist is shared configuration, conventionally placed in package.json under a browserslist key or in a .browserslistrc file. It is read by every tool in the modern frontend toolchain: @babel/preset-env for JavaScript syntax transforms and polyfill selection, PostCSS Preset Env for CSS feature compilation, Autoprefixer for vendor prefixes, eslint-plugin-compat for API-usage linting, stylelint-no-unsupported-browser-features for CSS linting, and @vitejs/plugin-legacy for differential serving. Lighthouse does not read your browserslist config, but its legacy JavaScript and unused-JavaScript reports can show the cost of a target that is wider than it needs to be.

What browserslist does not control is which browsers can run your site. Any browser can request your URL, parse your HTML, and render whatever its engine supports. Browserslist controls which browsers your build pipeline transpiles, polyfills, and prefixes for. A wider browserslist means more transpilation and more polyfills shipped to all users, including the modern ones whose engines did not need them. A narrower browserslist means smaller bundles for the majority and graceful degradation (or no support) for the long tail.

The single point of truth matters. Change one config and the entire toolchain shifts together; without browserslist, the same engineering judgment would have to be re-encoded in every tool's own target option. Treating browserslist as the team's compatibility policy — not as build configuration — is the productive frame.

The "defaults" string, decoded

Many projects ship defaults, which is a Browserslist alias that expands to:

code
> 0.5%, last 2 versions, Firefox ESR, not dead

Each clause has a precise meaning. > 0.5% selects browsers with global usage above 0.5 percent, sourced from caniuse data. last 2 versions selects the last two versions of every tracked browser. Firefox ESR includes the current Extended Support Release, the long-support Firefox branch that organizations deploy and that trails the regular release channel by several versions. not dead excludes browsers without official support for 24 months — Internet Explorer (Microsoft ended support for the IE11 desktop application on certain Windows versions in June 2022), BlackBerry Browser, and a handful of others.

Resolve the query at any time with:

sh
npx browserslist

As of October 2026, the resolution is roughly the last two to four releases of each evergreen browser (Chrome, Edge, Firefox, Safari, and their mobile versions), the current Firefox ESR, recent Samsung Internet and Opera releases, plus a tail the other clauses pull in — older versions that stay above the 0.5 percent usage threshold on their own (for example an older Chrome release that is the last one available on retired operating systems) and niche browsers such as Opera Mini and KaiOS. The exact versions change with every caniuse data update, so resolve the query in your own repository rather than trusting a list in an article.

The defaults query is reasonable as a safe default for a new project. It is often not the best fit for a long-running project, for two reasons. The last 2 versions clause picks up the newest shipping versions of evergreen browsers, which means the build target moves forward with every browser release and data update even when the team's intent was a stable cross-section. And > 0.5% global usage includes browsers that may not be present in your specific audience at all (a desktop-heavy B2B audience may have little Samsung Internet traffic — check your own analytics).

Modern vs conservative targets

The modern alternative targets Baseline directly. Since browserslist 4.26.0 (September 2025), Baseline is a built-in query:

code
baseline widely available

This selects the browser versions in the Baseline core set (Chrome, Chrome Android, Edge, Firefox, Firefox Android, Safari, Safari iOS) that support every feature that has been Widely available — interoperable across that set for at least 30 months. Every version it selects runs <script type="module"> natively, which is the natural floor for a modern app. Related forms exist for other policies: baseline newly available for the current Newly available set, a year such as baseline 2025 for a fixed snapshot, and with downstream to extend any of them to downstream browsers built on the same engines. Before this query existed, teams used the third-party browserslist-config-baseline package or hand-written approximations; the built-in form makes both unnecessary.

Bundle savings are measurable, but the size depends on the app. Moving from defaults to a Baseline target drops the long-tail engines (Opera Mini, KaiOS, the older Chrome release kept in by usage). On the JavaScript side only the older Chrome release counts here: Babel's target resolution, which also drives core-js polyfill selection, skips browsers outside its supported list, such as Opera Mini and KaiOS. The saving in syntax transforms and polyfills grows with how heavily the app relies on transpiled syntax and polyfilled built-ins. It is not strictly narrower on every axis — as of October 2026 baseline widely available reaches further back than defaults on Safari, Safari on iOS, Firefox, and Edge, and only on desktop Chrome, where usage keeps an older release in defaults, does defaults reach further back — so resolve both queries and compare before and after build output. CSS follows the same direction: Autoprefixer drops the vendor prefixes the target browsers no longer need, and PostCSS Preset Env stops compiling modern CSS for engines that already understand it.

Conservative targets are a different shape. defaults, ie 11 was reasonable in 2020; in 2026 it is unwise. Microsoft ended support for the IE11 desktop application on certain Windows versions, including Windows 10 Semi-Annual Channel, in June 2022 (IE11 remains supported on others, such as Windows 10 LTSC and Windows Server, for the lifecycle of that Windows version), IE11 support carries a large transpilation and polyfill burden, and many public audiences no longer include it — confirm with your own analytics. If you are still supporting IE11 in 2026, that is a separate and shrinking project whose policy should be documented in the team's compatibility doc.

Audience-specific targets are sometimes the right call. A B2B SaaS with known users can narrow to a single-version-tail target (last 1 version) and pair it with engagement analytics. A consumer product with global reach may want the broader defaults-style coverage. The choice should be measured: ship analytics that capture actual browser distribution, then set browserslist against that.

Target styleBrowserslist queryWhat it selects (as of October 2026)Polyfill impact vs `defaults`
`defaults``> 0.5%, last 2 versions, Firefox ESR, not dead`Recent evergreen releases, Firefox ESR, plus a long tail: an older Chrome kept in by usage, and Opera Mini and KaiOS pulled in by `last 2 versions`Reference point
Modern Baseline-aligned`baseline widely available`Baseline core browsers that support all Widely available featuresFewer transforms and polyfills in many apps; measure on your own build
Aggressive modern`baseline 2025`Baseline core browsers that support everything Newly available by the end of 2025; moves only when you edit the yearFewer again than Widely available; the long tail loses more
Audience-specific`>= 1% in my stats, last 2 versions`Depends on the `browserslist-stats.json` export from your analyticsVaries

Bundle-size implications

Each tool that reads browserslist contributes its share of the bundle delta.

@babel/preset-env transpiles JavaScript syntax based on browserslist. A modern target skips transforms for arrow functions, async / await, classes, optional chaining, and nullish coalescing — all of which were transformation candidates in older targets. The skipped transforms produce smaller, more readable shipped code that the engine can optimize directly.

core-js polyfills are selected by browserslist via Babel's useBuiltIns: 'usage' setting. Modern targets usually pull in fewer polyfills — Array.prototype.flat, Object.fromEntries, Promise.allSettled, String.prototype.replaceAll, and dozens of other built-ins do not need shimming for engines that ship them natively.

PostCSS Preset Env converts modern CSS to fallbacks based on browserslist — custom properties, modern color spaces, logical properties, the :focus-visible selector. Modern targets skip the conversion, leaving the modern CSS to ship as-written.

Autoprefixer adds -webkit-, -moz-, and -ms- vendor prefixes only when a target browser version needed them. Modern targets receive fewer prefixes, because the engines they include support many properties unprefixed; some properties still need one.

The size of the saving is specific to each codebase, so measure it rather than borrow a number: build once with each target and compare initial JavaScript and CSS at the gzipped wire-byte level. Whatever the delta is, it compounds for users on slower connections.

Vite's @vitejs/plugin-legacy and the trade-off

For teams that need to support older engines without taxing modern users, the differential-serving pattern produces parallel bundles.

@vitejs/plugin-legacy builds two versions of the app. The legacy bundle is built for the targets option — which falls back to the project's browserslist config — with full transpilation and polyfilling; for the modern bundle, the plugin collects polyfills against its modernTargets option, which falls back to a built-in default and, when set, overrides Vite's build.target — the plugin's README says not to set it unless renderLegacyChunks is false. The two are served via the standard <script type="module"> and <script nomodule> pattern — modern browsers load and execute the modern bundle, older browsers fall back to the legacy.

js
// vite.config.js
import legacy from '@vitejs/plugin-legacy';

export default {
  plugins: [
    legacy({
      targets: ['defaults', 'not IE 11']
    })
  ]
};

The trade-off is operational. Build time goes up because a second, fully transpiled build runs. Asset count roughly doubles, increasing CDN storage and cache complexity. Polyfill content has to be carefully scoped so the legacy bundle's polyfills do not pollute the modern bundle's runtime.

The recommendation is to enable differential serving only when analytics show meaningful traffic from browsers the modern bundle cannot serve. If that tail is small in your own analytics, differential serving costs more than it saves, and dropping legacy support entirely is the cleaner path. Non-Vite projects can build the same two-bundle setup with their own pipeline (for example, two Babel target configurations); the same trade-off applies.

CI verification

Browserslist as policy needs CI checks that enforce the policy.

eslint-plugin-compat reads browserslist and flags JavaScript code that uses an API the target does not support. The rule covers the standard web APIs (fetch, IntersectionObserver, Element.matches) and accepts exceptions for APIs you polyfill through settings.polyfills. Adding the plugin to a repository surfaces the historical mismatches between the team's intent and the actual code in one pass.

stylelint-no-unsupported-browser-features does the equivalent for CSS — flags container-type, @layer, :has(), modern color functions, and other modern CSS that would not work on the chosen target. Run both linters in pre-commit hooks and CI. The JavaScript check can block merge on policy violations; the stylelint plugin's README suggests warning-level severity because the rule keeps warning even when a fallback is in place, so treat its warnings as prompts to check for fallbacks rather than as a merge gate.

A bundle-size check in CI (for example, comparing the size report from your build or a bundle analyzer between the base branch and the PR) reports the delta on each PR. A change that moves browserslist wider increases the bundle it drives — the single shipped bundle, or, with @vitejs/plugin-legacy, the legacy bundle when the plugin's targets option is left unset; a change that moves it narrower reduces that bundle. The PR description should include the delta when browserslist changes.

Lighthouse CI catches regressions in JavaScript size and unused JS. An over-wide browserslist is one of the things that can raise both metrics; both are useful as guardrails even when the browserslist change itself is intentional.

A specific CI check worth adding is a browserslist diff requirement: when browserslist itself changes, require explicit reviewer approval. Browserslist is policy, and policy changes deserve more scrutiny than ordinary code changes.

Aligning browserslist with Baseline

The cleanest mental model treats browserslist and Baseline as two sides of the same compatibility decision.

As of October 2026 the mapping no longer needs an approximation: Baseline Widely available is the browserslist query baseline widely available, and a Newly available policy (interoperable in all core browsers, but for less than 30 months) is baseline newly available or, for a target that does not move on its own, a year pin such as baseline 2025.

When you want to adopt a Newly available feature without a polyfill or fallback, that is a policy decision to narrow the target — move the query to a later Baseline year through a reviewed browserslist change rather than quietly shipping code the target does not cover. When a feature becomes Widely available, browserslist does not need to change: the engines on a baseline widely available target already ship it, so core-js stops injecting that polyfill on the next build, and any polyfill the team imported by hand for it can be deleted.

Document the mapping in the team's compatibility-policy doc. Future browserslist changes are then intentional moves on a known policy axis, not opaque tweaks driven by whichever engineer last touched the config.

Update cadence

Browserslist's underlying browser data (the caniuse-lite package, plus the Baseline mapping data that the baseline queries use) updates regularly. Keep the policy under the browserslist key and the tooling under devDependencies with a major-version range:

json
{
  "browserslist": ["baseline widely available"],
  "devDependencies": {
    "browserslist": "^4.26.0"
  }
}

Let Renovate or Dependabot bump it, and refresh the caniuse-lite copy in the lockfile with npx update-browserslist-db@latest so every tool in the chain reads the same data. The dataset moves forward, browser versions roll forward in the resolved query, and the bundle stays calibrated.

Audit the resolved browserslist with npx browserslist on a fixed recurring cadence. The list shifts as old browser versions exit the last 2 versions window or fall below the > 0.5% threshold. A slow review cycle is often enough; check more often only if you ship new platform features actively.

When you intentionally drop a legacy target — for example, removing IE11 support, or moving from last 4 versions to last 2 versions — run a short canary with bundle-size monitoring and error-rate dashboards before merging the change to the main branch. Canary catches the cases where a previously-supported subset of users was load-bearing for a specific business flow.

Implementation priorities for the next planning cycle

  • Run npx browserslist in your repo and record what the current target actually expands to — the answer is often surprising
  • Write the modern Baseline-aligned alternative (baseline widely available, browserslist 4.26.0 or later) and run a build with that target on a feature branch; record the bundle delta
  • Add eslint-plugin-compat and stylelint-no-unsupported-browser-features to one repository; run them, triage the warnings, fix the high-traffic paths
  • Audit the polyfill bundle — list every polyfill that core-js is including, look up its underlying feature's Baseline status, retire any that are Widely available; report the delta in the PR
  • Decide whether @vitejs/plugin-legacy is justified by your analytics; if not, drop it and report the build-time savings
  • Document the team's browserslist policy in the compatibility doc — the chosen target, the Baseline mapping, the update cadence, and the change-review rule
Project Inquiry