Command | Description |
---|---|
vite init |
Initialize a new Vite project |
vite create |
Create a new Vite project |
vite dev |
Start a development server |
vite build |
Build the production-ready code |
vite serve |
Serve the built production code |
vite optimize |
Optimize the built production code |
vite preview |
Preview the built production code |
vite --version |
Display the version of Vite |
vite --help |
Display help for Vite commands |
vite config |
Edit Vite configuration |
vite plugin |
Manage Vite plugins |
vite env |
Display Vite's environment variables |
vite inspect |
Inspect the project's dependencies |
vite upgrade |
Upgrade Vite to the latest version |
vite create-react-app |
Create a new React app with Vite |
vite create-vue-app |
Create a new Vue app with Vite |
vite add <package> |
Add a package to the project |
vite rm <package> |
Remove a package from the project |
vite optimize --minify |
Minify the built production code |
vite optimize --css |
Optimize CSS in the built production code |
vite optimize --js |
Optimize JS in the built production code |
vite optimize --html |
Optimize HTML in the built production code |
vite optimize --inline |
Inline assets in the built production code |
vite optimize --polyfill |
Enable/disable polyfills in the built production code |
vite optimize --sourcemap |
Generate sourcemaps for the built production code |
vite optimize --legacy |
Enable/disable legacy browser support |
vite optimize --report |
Generate a build report |
vite optimize --name |
Set the name of the built production code |
vite optimize --target |
Set the target environment for the built production code |
vite optimize --emptyOutDir |
Empty the output directory before build |
vite --debug |
Enable debug mode for Vite |
vite --experimental |
Enable experimental features in Vite |
vite --silent |
Disable logging in Vite |
vite --m |
Alias for vite --mode |
vite --https |
Enable HTTPS in Vite development server |
vite --host |
Set the hostname for Vite development server |
vite --port |
Set the port number for Vite development server |
vite create-vanilla |
Create a new Vanilla JS app with Vite |
vite create-angular |
Create a new Angular app with Vite |
vite create-preact |
Create a new Preact app with Vite |
vite create-svelte |
Create a new Svelte app with Vite |
vite create-react-ts |
Create a new React app with TypeScript and Vite |
vite create-vue-ts |
Create a new Vue app with TypeScript and Vite |
vite create-angular-ts |
Create a new Angular app with TypeScript and Vite |
vite create-preact-ts |
Create a new Preact app with TypeScript and Vite |
vite create-svelte-ts |
Create a new Svelte app with TypeScript and Vite |
vite upgrade --force |
Forcefully upgrade Vite to the latest version |
vite --jsx |
Choose the JSX factory (e.g., react , preact ) |
vite --jsx-factory |
Specify a custom JSX factory function |
vite --jsx-fragment |
Specify a custom JSX fragment |
vite --tsx |
Enable TypeScript support |
vite --template |
Specify a custom project template |
vite --config |
Use a custom configuration file |
vite --define |
Define global constants in the build |
vite --clean-cache |
Clear Vite's cache |
vite --experimental-rollup |
Enable experimental Rollup integration |
vite --base |
Specify a base path for the app |
vite --assets-dir |
Specify a directory for static assets |
vite --mode |
Set the mode for Vite (e.g., development , production ) |
vite --inline-vue |
Inline Vue 3 runtime in the built production code |
vite --ssr |
Enable server-side rendering (SSR) |
vite --ssr-config |
Specify a custom SSR configuration file |
vite --ssg |
Enable static site generation (SSG) |
vite --ssg-config |
Specify a custom SSG configuration file |
vite --watch |
Enable file-watching mode |
vite --silent |
Disable logging |
vite --open |
Open the app in the default browser |
vite --proxy |
Configure proxy for API requests |
vite --proxy-config |
Specify a custom proxy configuration file |
vite --strict |
Enable TypeScript strict mode |
vite --log-level |
Set the log level (info , warn , error ) |
vite --clear-screen |
Clear the console screen |
vite --force |
Force command execution without confirmation |
vite --experimental-cache |
Enable experimental build cache |
vite --experimental-babel |
Enable experimental Babel support |
vite --experimental-bundler |
Enable experimental bundler (esbuild, rollup) |
vite --experimental-sourcemap |
Enable experimental sourcemap support |
vite --experimental-scoped-packages |
Enable experimental scoped packages support |
vite --experimental-terser |
Enable experimental Terser support |
vite --experimental-css-vars |
Enable experimental CSS variables support |
vite --experimental-css-module |
Enable experimental CSS module support |
vite --experimental-css-jsx |
Enable experimental CSS-in-JS support |
vite --experimental-persistent-cache |
Enable experimental persistent cache support |
vite --experimental-dynamic-import |
Enable experimental dynamic import support |
vite --experimental-esbuild-plugins |
Enable experimental esbuild plugins support |
vite --experimental-web-assembly |
Enable experimental WebAssembly support |
vite --experimental-server-cache |
Enable experimental server-side caching support |
vite --experimental-json-import |
Enable experimental JSON import support |
vite --experimental-streaming |
Enable experimental streaming build support |
vite --experimental-rollup-jsx |
Enable experimental Rollup JSX support |
vite --experimental-ssr-cache |
Enable experimental server-side rendering cache support |
vite --experimental-ssg-manual |
Enable experimental manual static site generation support |
vite --experimental-ssg-fetch |
Enable experimental fetch-based static site generation support |
vite --experimental-ssg-data |
Enable experimental data-driven static site generation support |
vite --experimental-ssg-fallback |
Enable experimental fallback page for static site generation support |
vite --experimental-ssg-404 |
Enable experimental 404 page for static site generation support |
vite --experimental-ssg-routing |
Enable experimental routing for static site generation support |
Please note that the list above includes both commonly used commands and some experimental features. For more detailed information on each command and additional commands, I recommend referring to the official Vite documentation or using the vite --help
command to see the complete list of available commands with their descriptions.