Skip to content
PluginStats

vite-plugin-babel weekly downloads statistics

By owlsdepartment (2 listings) · npm · Vite plugins

Runs Babel in Vite during all commands

View on npm Fresh · Dec 6, 2026

vite-plugin-babel has 416,405 recorded weekly downloads on npm, a decrease of 0.2% over the past 30 days, ranking #426 of 3,247 tracked listings.

Weekly downloads
416,405
Official API · Dec 5, 2026
7-day growth
+3.2%
+13.1K weekly downloads
30-day growth
-0.2%
-992 weekly downloads
90-day growth
+27.8%
+90.7K weekly downloads
Rank
#426
▼ 12 in 7 days

About vite-plugin-babel

Vite Plugin Babel

Run Babel during any Vite command, also during serve.

Motivations

Most Vite plugins runs Babel only during build, not serve, and only other possible way to do this is via @vitejs/plugin-react. ESBuild is awesome tool, but doesn't support some experimental features, like decorators (issue #2349) or class instance fields, out of box. You can use them in TypeScript, but not pure JS. This plugin was made to enable usage of such features and runs babel during optimizeDeps, dev and build stages, but it can be configured.

Installation

# yarn
yarn add -D vite-plugin-babel

# npm
npm install -D vite-plugin-babel

Usage

Add it to your Vite config

import { defineConfig } from 'vite';
import babel from 'vite-plugin-babel';

export default defineConfig({
    plugins: [
        // Babel will try to pick up Babel config files (.babelrc / .babelrc.* / babel.config.*)
        babel(),
        // ...
    ],

    // ...
})

Config

Babel config can be either passed to babelConfig field or via Babel config file. For all babel options see: Babel Options.

By default, babel is run for JS/JSX files (include defaults to /\.jsx?$/). To scope it to other files, set include / exclude and add the matching Babel presets/plugins to babelConfig yourself.

Migrating from 1.6.x: in 1.7.0 the default of include changed from undefined to /\.jsx?$/. If you previously relied on filter alone to scope files, set include explicitly to your desired scope — filter is now combined with include as an AND, so it can only narrow further, not expand. filter is deprecated; prefer include / exclude.

NameTypeDefaultDescription
apply'serve' | 'build' | (config: UserConfig, env: ConfigEnv) => booleanundefinedLimits plugin usage to only build or only serve. If not specified, will be run during both cycles. Same as apply in Vite Plugins API
enforce'pre' | 'post'preForce plugin's order execution. More details: Vite Plugin Ordering
babelConfigobject{}Babel Transform Options
includestring | RegExp | Array<string|RegExp>/\.jsx?$/Which files to include. Defaults to .js / .jsx. Set explicitly to scope to other extensions — the matching Babel presets/plugins are your responsibility.
excludestring | RegExp | Array<string|RegExp>undefinedWhich files to exclude. Takes priority over include.
filterRegExp | (id: string) => booleanundefinedDeprecated. Combined with include as an AND — can only narrow further, not expand. Prefer include / exclude.
loaderLoader or (path: string) => LoaderundefinedVite 7 and lower This tells esbuild how to interpret the contents after babel's transformation. For example, the js loader interprets the contents as JavaScript and the css loader interprets the contents as CSS. The loader defaults to js if it's not specified. See the Content Types page for a complete list of all built-in loaders.
optimizeOnSSRbooleanfalseRun dependency optimization during SSR. Could be useful when running a project on a cloud workers, like @cloudflare/vite-plugin

Tips

Vite team didn't enable and include Babel by default, because they wanted to keep experience as fast as possible and esbuild can already do a lot of things, you would probably do with Babel. Because of that, we recommend to only include those Babel plugins you really need. You can use option babelConfig.configFile and omit Babel config file usage:

babel({
    babelConfig: {
        plugins: ['@babel/plugin-proposal-decorators']
    }
})

or just use Babel config file.

NOTE: Any babel plugins and presets need to be installed seperately and are not included with this package.

Troubleshooting

[ERROR] The JSX syntax extension is not currently enabled

This usually happens when you're using this plugin to only transform part of a .jsx file (such as decorators), and leaving the JSX syntax untouched. By default, esbuild interprets contents as .js, so you'll need to specify the loader esbuild should use.

Example:

import { extname } from 'path';
// ...
babel({
    babelConfig: {
        plugins: ['@babel/plugin-proposal-decorators'],

        // uses the jsx loader for .jsx files
        loader: path => {
          if (extname(path) === '.jsx') {
            return 'jsx';
          }
        },
    }
})

License

Library is under MIT License

Description from the npm listing.

  • vite-plugin
  • vite
  • babel

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-babel weekly downloads on npm, last 90 days: 416,405 weekly downloads as of Dec 5, 2026, +27.8% over 90 days.vite-plugin-babelWeekly downloads on npm · Last 90 days416,405downloads / week+27.8% over 90 days0100K200K300K400K500KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-babel weekly downloads on npm, last 90 days: 416,405 weekly downloads as of Dec 5, 2026, +27.8% over 90 days.

7/30/90-day growth

vite-plugin-babel weekly downloads growth on npm: +3.2% over 7 days, -0.2% over 30 days, +27.8% over 90 days.vite-plugin-babelWeekly downloads growth on npm416,405downloads / week now7-day growth+13,091 weekly downloads+3.2%30-day growth-992 weekly downloads-0.2%90-day growth+90,677 weekly downloads+27.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-babel weekly downloads growth on npm: +3.2% over 7 days, -0.2% over 30 days, +27.8% over 90 days.

Ranking history

vite-plugin-babel npm ranking history: currently #426 (by weekly downloads).vite-plugin-babelnpm ranking · by weekly downloads · Last 90 days#426current rank#400#405#410#415#420#425#430Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-babel npm ranking history: currently #426 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 22, #6 (overall #426)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 3, #20 (overall #60)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for vite-plugin-babel
Date (UTC)Weekly downloadsChange vs. previous
416,405+1.6K
414,785+20.2K
394,557+6.8K
387,796+454
387,342-9.9K
397,276-2.8K
400,095-3.2K
403,314-1.9K
405,185-17.2K
422,409-10K
432,367+10.9K
421,439+19.6K
401,851+7.2K
394,647—

Similar npm Vite plugins plugins

All 20 vite-plugin-babel alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vite-plugin-babel. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.