Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Vite

Run and build web apps while you code.

Build tools and bundlersNPM

GitHubWebsite

1. License

“to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,”

MIT allows use in paid and closed-source products; the built files are your code.

github.com/vitejs/vite/blob/main/LICENSE

From the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error

What Vite does

Vite is a free tool that runs your web app on your own computer while you build it, and packs it into fast files when you publish. Each time you save, the change shows in the browser at once. It comes with starter templates for React, Vue, Svelte and others.

What people build with it

Start a new app from a template

Your assistant creates a ready React, Vue, Svelte or plain TypeScript project in one command and starts it.

See changes the moment you save

While you or your assistant edit a page, the open browser tab updates on save, without a full reload in most cases.

Publish as plain files

One command makes a dist folder of small files you can upload to any static host, and a second one lets you check them first.

Settings that may reach the browser

Public settings like a site name go into .env with a VITE_ prefix; anything without the prefix stays out of the browser.

A site that lives in a sub-folder

When the app runs at example.com/shop/ instead of the main address, all links to scripts, styles and pictures are fixed for that folder.

Modern front-end for a Laravel or Rails site

Keep pages made by your existing server and let Vite handle the scripts and styles, with instant updates while you work.

Vite popularity

92 / 100
Gid Score, #7 overall
288M
downloads a week, npm
84.1K
GitHub stars
1,238
agent projects use it
Vite: downloads per weeknpm, vite 287,894,425
Vite: GitHub starsvitejs/vite 84,062

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Vite is used

  • Vite is a dependency in 1,238 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (25.4% of the 4,867 JavaScript/TypeScript ones), #1 of 185 in build tools and bundlers.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 4,635; those are left out of every share on this page.
  • The most used alternative in our scan is SWC (110 projects).
  • Projects that use it most often also use Tailwind CSS (72.4%), Vitest (53.5%), React (66.7%).
  • It is more common in projects set up for Junie (68.9%) than for GitHub Copilot (18.1%).

By coding agent

736 projects, 22.5%
618 projects, 25.3%
548 projects, 18.1%
144 projects, 30.7%
134 projects, 28.3%
107 projects, 31.2%
70 projects, 25.1%
51 projects, 68.9%

Often used with

In 72.4% of its projects
In 53.5% of its projects
In 66.7% of its projects
In 83.5% of its projects
In 34.1% of its projects
In 34.1% of its projects
In 62.0% of its projects
In 41.6% of its projects

Vite in practice

Strengths

Dev server only transforms what the page asks for

Source files are served over native ESM, and the browser loads only what the current page needs. The Why Vite page says that when Vite was first created, this split made dev server startup "nearly instant, regardless of application size". On edit, HMR updates just the changed module without a full page reload.

Rolldown unified the esbuild and Rollup pair

Vite used to run esbuild in dev and Rollup in build. The maintainers write that the two pipelines behaved differently and needed glue code. Rolldown is written in Rust and uses Oxc. It was built to unify both into a single bundler with the same plugin API.

Plugins follow Rollup's interface

The site says Vite plugins extend Rollup's plugin interface with a few Vite-specific options. It also says the API is fully typed and "Designed to be built on top of."

Downstream projects are tested on every change

The team runs vite-ecosystem-ci, which tests major ecosystem projects against each Vite change. The maintainers call ecosystem health "part of the release process".

Watch out for

Dev mode assumes a modern browser

Vite sets <code>esnext</code> as the dev transform target and does no syntax lowering. Production builds target Baseline Widely Available browsers, which for this major means browser versions released around mid-2023. Older browsers need a lowered target or <code>@vitejs/plugin-legacy</code>.

Node.js version floor

The docs require Node.js 20.19+ or 22.12+. Some templates need a newer version than that.

Unbundled dev can slow very large apps

The maintainers write that exceptionally large codebases can see slow page loads because of the number of unbundled requests. A full bundle mode for the dev server is described as something the team is exploring.

Default npm scripts in a scaffolded project

{
  "scripts" : {
    "dev" : "vite" , // start dev server, aliases: `vite dev`, `vite serve`
    "build" : "vite build" , // build for production
    "preview" : "vite preview" // locally preview production build
  }
}

More about Vite

Funding
  • GitHub Sponsors: https://github.com/vitejs
  • Open Collective: https://opencollective.com/vite
  • Own page: https://github.com/vitejs/vite?sponsor=1
  • 44 GitHub sponsors

See all

Agent Skills for it
  • vite: Expert guidance for Vite development with modern build tooling, HMR, framework integrations, and performance optimization
  • vite: Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plu
  • vite: Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plu

See all

Head to head
Packages around it
  • @vitejs/plugin-react: Official React plugin
  • @vitejs/plugin-react-swc: React plugin using SWC
  • @vitejs/plugin-vue: Official Vue SFC plugin
  • @vitejs/plugin-vue-jsx: Vue JSX support
  • @vitejs/plugin-basic-ssl: Self-signed HTTPS for dev
  • @vitejs/plugin-legacy: Legacy browser support
More in Build tools and bundlers

Alternatives

Vite This page

MITGid 92288M/wk

esbuild

Pick esbuild when you only need a fast bundling or minify step for scripts, not a whole dev setup.

webpack

Pick webpack when a project already relies on its configuration and loaders.

MITGid 8376.9M/wk

Parcel

Pick Parcel when you want a bundler that works with no configuration file at all.

SWC

Super-fast Rust-based JavaScript compiler and bundler alternative to Babel.

Apache-2.0Gid 7861.9M/wk

Compare Vite with another tool

Get started

Tell your AI assistant

“Create a React + TypeScript app with Vite 8 (vite 8.3.7, Node 20.19+ or 22.12+), keep secrets out of VITE_ variables, and add a type check (tsc --noEmit) before vite build.”

  1. Create a project from a template and follow the prompts.

    npm create vite@latest

    From vite.dev/guide/

  2. Or add Vite to an existing folder that has an index.html and run it.

    npm install -D vite
    npx vite
    

    From vite.dev/guide/

  3. Build the files for publishing.

    npx vite build

    From vite.dev/guide/build

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Vite
- Scaffold with `npm create vite@latest my-app -- --template <name>`. With npm 7+, the extra `--` is needed. Add `--no-interactive` to skip the prompts.
- Use the standard scripts: `vite` for dev, `vite build` for production, and `vite preview` to check the build locally.
- Keep `vite.config.js` in the project root. If you change the root with `vite serve some/sub/dir`, move the config file there too.
- Write explicit import paths such as `import './Component.jsx'`. With TypeScript, set `"moduleResolution": "bundler"` and `"allowImportingTsExtensions": true`.
- Avoid barrel files. Import directly instead, for example `import { slash } from './utils/slash.js'`.
- Only add files to `server.warmup` if they are frequently used. Keep the `buildStart`, `config` and `configResolved` plugin hooks short.
- For older browsers, lower the build target or add `@vitejs/plugin-legacy`. To replace the Vite version used by dependencies, use npm or pnpm overrides.

Mistakes to avoid

VITE_STRIPE_SECRET_KEY=... in .env, read in front-end code
Keep secrets in variables without the VITE_ prefix and use them only in server or serverless code

Every VITE_ value is copied into the public JavaScript files at build time.

Running vite preview on the server as the live site
Upload dist/ to a static host, or serve it with a real web server

vite preview is only for checking the build on your own machine.

Treating a successful vite build as proof the TypeScript has no errors
Run tsc --noEmit before vite build, or add vite-plugin-checker to see type errors during development

Vite strips types file by file and never checks them.

New esbuild or optimizeDeps.esbuildOptions settings in a Vite 8 config
Use the oxc and optimizeDeps.rolldownOptions settings

In Vite 8 the esbuild options are only converted for backward compatibility and are deprecated.

Editing .env while npm run dev is running and expecting the new value
Stop and restart the dev server after changing .env files

Vite reads .env files once, at start.

Questions

Can I use it for a paid product?

Yes. Vite is MIT-licensed.

Can I put my secret keys in .env?

Yes, but never with the VITE_ prefix. VITE_ values are written into the public files; keep secrets on a server.

Is vite preview a production server?

No. It only lets you look at the built files on your own computer. Upload dist/ to a host instead.

What changed in Vite 8?

It now uses Rolldown and Oxc instead of esbuild and Rollup. Old esbuild settings still work for now but are deprecated.

I changed .env and nothing happened. Why?

Vite reads .env files only when it starts. Restart the dev server.