Skip to content
PluginStats

@vitejs/plugin-react weekly downloads statistics

By vitejs (9 listings) · npm · Vite plugins

The default Vite plugin for React projects

View on npm Fresh · Dec 6, 2026

@vitejs/plugin-react has 150,659,390 recorded weekly downloads on npm, an increase of 20.3% over the past 30 days, ranking #5 of 3,247 tracked listings.

Weekly downloads
150,659,390
Official API · Dec 5, 2026
7-day growth
+14.6%
+19.2M weekly downloads
30-day growth
+20.3%
+25.4M weekly downloads
90-day growth
+102%
+75.9M weekly downloads
Rank
#5
Among tracked npm listings

About @vitejs/plugin-react

@vitejs/plugin-react npm

The default Vite plugin for React projects.

// vite.config.js
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [react()],
})

Options

include

Includes .js, .jsx, .ts & .tsx by default. This option can be used to add fast refresh to .mdx files:

import mdx from '@mdx-js/rollup'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    { enforce: 'pre', ...mdx() },
    react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
  ],
})
exclude

The default value is /node_modules/. You may use it to exclude JSX/TSX files that runs in a worker or are not React files. Except if explicitly desired, you should keep node_modules in the exclude list:

import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    react({ exclude: [/\/pdf\//, /\.solid\.tsx$/, /\/node_modules\//] }),
  ],
})
jsxImportSource

Control where the JSX factory is imported from. By default, this is inferred from jsxImportSource from corresponding a tsconfig file for a transformed file.

react({ jsxImportSource: '@emotion/react' })
jsxRuntime

By default, the plugin uses the automatic JSX runtime. However, if you encounter any issues, you may opt out using the jsxRuntime option.

react({ jsxRuntime: 'classic' })
reactRefreshHost

The reactRefreshHost option is only necessary in a module federation context. It enables HMR to work between a remote & host application. In your remote Vite config, you would add your host origin:

react({ reactRefreshHost: 'http://localhost:3000' })

Under the hood, this simply updates the React Fash Refresh runtime URL from /@react-refresh to http://localhost:3000/@react-refresh to ensure there is only one Refresh runtime across the whole application. Note that if you define base option in the host application, you need to include it in the option, like: http://localhost:3000/{base}.

React Compiler

Rust React Compiler

[!WARNING] Native React Compiler support is experimental.

The compiler option uses oxc-transform-react, a Rust port of React Compiler, which must be installed as an optional peer dependency:

npm install -D oxc-transform-react
// vite.config.js
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [react({ compiler: true })],
})

The compiler option also accepts React Compiler options:

react({ compiler: { compilationMode: 'annotation' } })

Set logDiagnostics to true to log recoverable React Compiler diagnostics through Vite. This option defaults to false. Fatal diagnostics are always logged and fail the transform.

react({ compiler: { logDiagnostics: true } })
Babel React Compiler

React Compiler can also be used through Babel with the exported reactCompilerPreset helper. This requires @rolldown/plugin-babel, babel-plugin-react-compiler, and @babel/core as peer dependencies:

npm install -D @rolldown/plugin-babel @babel/core babel-plugin-react-compiler

If you are using TypeScript with Babel 7, you will also need to install @types/babel__core:

npm install -D @types/babel__core
// vite.config.js
import babel from '@rolldown/plugin-babel'
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [react(), babel({ presets: [reactCompilerPreset()] })],
})

The reactCompilerPreset accepts an optional options object with the following properties:

  • compilationMode — Set to 'annotation' to only compile components annotated with "use memo".
  • target — Set to '17' or '18' to target older React versions (uses react-compiler-runtime instead of react/compiler-runtime).

Additional options can be found in the documentation.

babel({
  presets: [reactCompilerPreset({ compilationMode: 'annotation' })],
})

[!TIP]

reactCompilerPreset is only a convenient helper with a preconfigured filter. You can configure override the filters to fit your project structure or code. For example, if you know a large portion of your files are never React/hook-related or won't benefit from the React Compiler, you can aggressively exclude them via rolldown.filter:

const myPreset = reactCompilerPreset()
myPreset.rolldown.filter.id.exclude = ['src/legacy/**', 'src/utils/**']

babel({
  presets: [myPreset],
})

@vitejs/plugin-react/preamble

The package provides @vitejs/plugin-react/preamble to initialize HMR runtime from client entrypoint for SSR applications which don't use transformIndexHtml API. For example:

// [entry.client.js]
import '@vitejs/plugin-react/preamble'
```…

Description from the npm listing.

  • fast refresh
  • react
  • react-refresh
  • vite
  • vite-plugin

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

@vitejs/plugin-react weekly downloads on npm, last 90 days: 150,659,390 weekly downloads as of Dec 5, 2026, +102% over 90 days.@vitejs/plugin-reactWeekly downloads on npm · Last 90 days150,659,390downloads / week+102% over 90 days020M40M60M80M100M120M140M160MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@vitejs/plugin-react weekly downloads on npm, last 90 days: 150,659,390 weekly downloads as of Dec 5, 2026, +102% over 90 days.

7/30/90-day growth

@vitejs/plugin-react weekly downloads growth on npm: +14.6% over 7 days, +20.3% over 30 days, +102% over 90 days.@vitejs/plugin-reactWeekly downloads growth on npm150,659,390downloads / week now7-day growth+19,233,887 weekly downl…+14.6%30-day growth+25,400,606 weekly downl…+20.3%90-day growth+75,921,855 weekly downl…+102%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@vitejs/plugin-react weekly downloads growth on npm: +14.6% over 7 days, +20.3% over 30 days, +102% over 90 days.

Ranking history

@vitejs/plugin-react npm ranking history: currently #5 (by weekly downloads).@vitejs/plugin-reactnpm ranking · by weekly downloads · Last 90 days#5current rank#3#4#5#6#7Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@vitejs/plugin-react npm ranking history: currently #5 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 1, #1 (overall #1)
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 @vitejs/plugin-react
Date (UTC)Weekly downloadsChange vs. previous
150,659,390+2.3M
148,358,126+5.5M
142,849,680+5.1M
137,733,910+2.4M
135,366,637+3M
132,363,575+806K
131,557,531+132K
131,425,503-1.2M
132,584,529-3.4M
135,991,053-3M
139,003,229-1.2M
140,179,330-931.2K
141,110,490-930.5K
142,041,026—

Similar npm Vite plugins plugins

All 20 @vitejs/plugin-react 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/@vitejs/plugin-react. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.