Create a Vite project from a template
Create a Vite project from a template with npm create vite, choose the vanilla-ts or react-ts template and see which files it generates.
create-vite scaffolds a project from a template. It asks for a name and a framework, or takes them as arguments.
npm create vite@latest my-app -- --template vanilla-ts
cd my-app
npm install
npm run devmy-app/
├─ index.html
├─ package.json
├─ tsconfig.json
├─ public/
│ └─ vite.svg
└─ src/
├─ main.ts
├─ counter.ts
├─ style.css
└─ typescript.svgThe -- hands --template to the create script rather than to npm. Other templates include react-ts, vue-ts, svelte-ts and solid-ts, and the plain names without -ts give JavaScript. Vite's index.html sits at the project root because it is the entry point: the dev server serves it and follows its script tag. The exact file list changes between template versions. See the Vite getting started guide.
Vite 7 needs Node.js 20.19 or 22.12 and later. Run npm run build to produce a dist/ folder for any static host.