Run npm create vite@latest and answer the prompts for a project name, a framework and a variant. The command runs create-vite, a tool that scaffolds a starter project from a template. Yarn and pnpm have the same command:
# Using npm
npm create vite@latest my-project
# Using yarn
yarn create vite my-project
# Using pnpm
pnpm create vite my-project
Vite provides templates for these frameworks:
vanilla,vanilla-tsvue,vue-tsreact,react-ts,react-compiler,react-compiler-tspreact,preact-tslit,lit-tssvelte,svelte-tssolid,solid-tsqwik,qwik-ts
To skip the prompts, name the template directly. With npm 7 and later, an extra -- goes before the options:
npm create vite@latest my-react-app -- --template react-ts
Then run npm install and npm run dev inside the new folder. Current Vite needs Node.js 20.19 or later, or 22.12 or later.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓