@vitejs/plugin-react

The official Vite plugin for React with Babel-powered Fast Refresh and JSX transforms

Tool
npm
v6.1.1
1,167 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
93 /100 Excellent
Development Activity 100
Maintenance 100
Community 80
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
83 /100 Excellent
Architecture 80
Code Quality 85
Innovation 75
Learning Curve 90

@vitejs/plugin-react is the default, officially maintained Vite plugin for React projects, enabling JSX/TSX compilation and Babel-based Fast Refresh so component edits update in the browser instantly without losing component state. It is scaffolded automatically by create-vite for every React template and is the plugin most React + Vite projects depend on without ever needing to configure directly.

The plugin lives in the vite-plugin-react monorepo alongside @vitejs/plugin-react-swc (an SWC-based alternative optimized for faster cold starts) and experimental React Server Components tooling (@vitejs/plugin-rsc). @vitejs/plugin-react itself uses Babel, which trades a small amount of transform speed for broader plugin/preset compatibility (including optional React Compiler integration), making it the default recommendation for most projects.

What You Get

  • Automatic JSX/TSX transformation for .jsx/.tsx files using Babel during both dev and build
  • Babel-powered React Fast Refresh, preserving component state across hot module reloads in development
  • Configurable Babel plugin/preset injection for custom transforms (e.g. styled-components, emotion)
  • Optional integration with the React Compiler (babel-plugin-react-compiler) via a dedicated preset
  • Zero-config setup as the default plugin scaffolded by create-vite’s React templates

Common Use Cases

  • Standard React + Vite application development, added automatically via create-vite --template react
  • Enabling Fast Refresh so component state survives edits during local development
  • Adding custom Babel plugins/presets (e.g. for CSS-in-JS libraries) to a Vite-based React build
  • Opting a React codebase into the React Compiler’s automatic memoization via the plugin’s compiler preset

Under The Hood

Architecture: The plugin (packages/plugin-react/src/index.ts) implements Vite’s Plugin interface, transforming matched .[tj]sx? files with Babel and injecting a refresh-runtime.js preamble plus a virtual preamble plugin from the shared @vitejs/react-common package (also used by the SWC sibling plugin-react-swc) so both variants share Fast Refresh wiring logic; a separate reactCompilerPreset.ts composes an optional Babel preset that layers in babel-plugin-react-compiler for projects opting into the compiler. Tech Stack: TypeScript throughout, built as an ESM package consumed by Vite’s plugin pipeline, tested with Vitest, and versioned as one package among several (plugin-react, plugin-react-swc, plugin-rsc, common) in a pnpm-workspace monorepo maintained by the core Vite team (Evan You among the listed authors). Code Quality: The compiler preset ships its own dedicated test file (reactCompilerPreset.test.ts) and the plugin is exercised indirectly by Vite’s own extensive e2e suite across the ecosystem given its status as the default React integration; the small, focused src/ surface (three files) keeps the reviewable footprint minimal for a project this widely depended upon. API Design: The Options interface documents every knob (include/exclude patterns, jsxImportSource, jsxRuntime) with inline JSDoc and sensible defaults, so the overwhelming majority of consumers add react() to their vite.config.ts plugins array with zero configuration.

Used by 211 apps in this directory

TypeScript
93%
Apache 2.0

InsForge

Databases · Developer Tools

13,023

The all-in-one, open-source backend platform purpose-built for AI coding agents — giving your agent database, auth, storage, edge functions, a model gateway, and compute to ship full-stack apps end-to-end.

View details
85
Repo Health
81
Technical
72
Dependency
Built with
TypeScript 93%
Updated 1 weeks ago
TypeScript
55%
Other

Jaaz

AI Agents · AI Design Tools

6,670

Open-source AI creative agent that turns visual sketches and canvas gestures into images and videos — no text prompts required.

View details
48
Repo Health
59
Technical
71
Dependency
Built with
TypeScript 55%
Python 34%
JavaScript 10%
Updated 7 months ago
Rust
52%
Other

Jan

AI Assistants

44,680

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
65
Dependency
Built with
Rust 52%
TypeScript 44%
Updated 1 weeks ago
TypeScript
100%
MIT

JobSync

AI Assistants · Productivity

1,329

The self-hosted job search assistant that tracks applications, reviews resumes with AI, and auto-discovers matching roles from Greenhouse, Lever, and Ashby boards — all while keeping your data on your own server.

View details
84
Repo Health
79
Technical
81
Dependency
Built with
TypeScript 100%
Updated 1 weeks ago
TypeScript
90%
MIT

Kaneo

Product Management · Productivity · Project Management

9,250

Lightweight self-hosted project management that gives you kanban boards, GitHub sync, and full team collaboration without the enterprise bloat.

View details
87
Repo Health
81
Technical
70
Dependency
Built with
TypeScript 90%
Updated 1 weeks ago
TypeScript
98%
MIT

Kimi Code CLI

AI Agents · AI Code Assistants · Developer Tools

7,705

A single-binary, terminal-native coding agent that reads, edits, and runs code end to end, built by Moonshot AI for Kimi models but pluggable with Anthropic, OpenAI, and Google providers too.

View details
82
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago
TypeScript
97%
Other

Langfuse

AI Development · Monitoring

35,117

Open source AI engineering platform for LLM observability, prompt management, evaluation, and debugging — self-host in minutes or use Langfuse Cloud.

View details
92
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,686

Open-source AI agent monitoring that catches what will break next before your users do.

View details
86
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Rust 11%
Python 11%
Updated 2 weeks ago
TypeScript
82%
MIT

LibreChat

AI Assistants · Developer Tools

45,009

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 82%
JavaScript 17%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers