vite
Vite is a next-generation frontend build tool created by Evan You (creator of Vue.js) that provides an extremely fast development experience through native ES m…
Installation
npm install -D vite
yarn add -D vite
pnpm add -D vite
Import
// vite.config.ts
import { defineConfig } from 'vite';Quick Example
// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: { port: 3000 },
});About vite
Vite is a next-generation frontend build tool created by Evan You (creator of Vue.js) that provides an extremely fast development experience through native ES module serving and Hot Module Replacement. During development, Vite serves source files over native ESM, meaning the browser requests individual modules and Vite transforms them on demand — this eliminates the bundling step entirely, providing instant server start regardless of application size. For production, Vite uses Rollup to produce optimized, tree-shaken bundles with code splitting and asset optimization. Vite supports TypeScript, JSX, CSS modules, PostCSS, CSS pre-processors, JSON, WebAssembly, and static assets out of the box without configuration. The framework is frontend-agnostic with official templates for React, Vue, Svelte, Preact, Lit, and vanilla JavaScript. Vite's plugin API is a superset of Rollup's plugin interface, giving access to Rollup's extensive plugin ecosystem alongside Vite-specific hooks for development server customization. Vite has become the default build tool for new projects in the Vue, Svelte, and SolidJS ecosystems, and is rapidly gaining adoption in React projects as a faster alternative to Create React App.
Quick Facts
| Package | vite |
| Category | Build Tool |
| Weekly Downloads | 15M+ |
| License | MIT |
| Install | npm install -D vite |
Related Packages
Rollup is a JavaScript module bundler that compiles small pieces of code into larger, more complex b…
esbuild is an extremely fast JavaScript and TypeScript bundler and minifier written in Go that is 10…
Webpack is a powerful and highly configurable static module bundler for modern JavaScript applicatio…
Vitest is a blazing-fast unit testing framework powered by Vite, designed as a modern alternative to…
Svelte is a radical new approach to building user interfaces that shifts the work of the framework f…
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.