Vite

Vite build tool commands for fast development and building

19 commands
Search & Copy
Save Favorites
19
Total Commands
100%
Free Access
Lightning Fast

Available Commands

Click on any command to copy it instantly

19 commands available
19 of 19
vite

Create Vite Project

Create a new Vite project

npm create vite@latest my-app
vite
create
project
vite

Start Development Server

Start Vite development server

npm run dev
vite
dev
server
vite

Build for Production

Build the project for production

npm run build
vite
build
production
vite

Preview Production Build

Preview the production build locally

npm run preview
vite
preview
production
vite

Vite Configuration

Create Vite configuration file

touch vite.config.js
vite
config
setup
vite

Add Vite Plugin

Install and configure Vite plugins

npm install -D @vitejs/plugin-react
vite
plugin
install
vite

Environment Variables

Use environment variables in Vite

VITE_API_URL=https://api.example.com
vite
env
variables
vite

Optimize Dependencies

Pre-bundle dependencies for faster dev server

npm run dev -- --force
vite
optimize
dependencies
vite

Server-Side Rendering

Configure SSR with Vite

npm install -D @vitejs/plugin-react
vite
ssr
rendering
vite

Configure Proxy

Set up proxy for API calls

proxy: { "/api": "http://localhost:3001" }
vite
proxy
api
vite

Define Global Constants

Define global constants for build time

define: { __APP_VERSION__: JSON.stringify(process.env.npm_package_version) }
vite
define
constants
vite

Configure Path Aliases

Set up path aliases for imports

resolve: { alias: { "@": path.resolve(__dirname, "src") } }
vite
alias
paths
vite

CSS Preprocessing

Configure CSS preprocessors

npm install -D sass
vite
css
preprocessing
vite

TypeScript Support

Configure TypeScript with Vite

npm install -D typescript @types/node
vite
typescript
types
vite

Testing Setup

Set up testing with Vite

npm install -D vitest @testing-library/react
vite
testing
vitest
vite

Build Library

Build a library with Vite

npm run build -- --mode library
vite
library
build
vite

Bundle Analysis

Analyze bundle size and composition

npm install -D rollup-plugin-visualizer
vite
analyze
bundle
vite

Progressive Web App

Configure PWA with Vite

npm install -D vite-plugin-pwa workbox-window
vite
pwa
offline
vite

Deploy to Vercel

Deploy Vite app to Vercel

npx vercel --prod
vite
deploy
vercel

Missing a command?

Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!