vite/packages/create-vite
2022-12-05 08:50:30 +01:00
..
__tests__ chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
src chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
template-lit chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
template-lit-ts chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
template-preact chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
template-preact-ts chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
template-react chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
template-react-ts chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
template-svelte chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
template-svelte-ts chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
template-vanilla chore(deps): update all non-major dependencies (#11006) 2022-11-21 09:30:22 +01:00
template-vanilla-ts chore(deps): update all non-major dependencies (#11006) 2022-11-21 09:30:22 +01:00
template-vue chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
template-vue-ts chore(deps): update all non-major dependencies (#11182) 2022-12-05 08:50:30 +01:00
build.config.ts chore: enable prettier trailing commas (#11167) 2022-12-04 08:19:06 +01:00
CHANGELOG.md release: create-vite@3.2.1 2022-11-07 09:27:06 +01:00
index.js perf: bundle create-vite (#9034) 2022-08-29 20:21:35 +02:00
LICENSE chore(deps): update all non-major dependencies (#10488) 2022-10-20 08:11:00 +02:00
package.json release: create-vite@3.2.1 2022-11-07 09:27:06 +01:00
README.md fix: mention that Node.js 13/15 support is dropped (fixes #9113) (#9116) 2022-07-15 15:23:41 +02:00
tsconfig.json refactor(create-vite): migrate to TypeScript (#9941) 2022-09-03 22:32:49 +02:00

create-vite

Scaffolding Your First Vite Project

Compatibility Note: Vite requires Node.js version 14.18+, 16+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.

With NPM:

$ npm create vite@latest

With Yarn:

$ yarn create vite

With PNPM:

$ pnpm create vite

Then follow the prompts!

You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:

# npm 6.x
npm create vite@latest my-vue-app --template vue

# npm 7+, extra double-dash is needed:
npm create vite@latest my-vue-app -- --template vue

# yarn
yarn create vite my-vue-app --template vue

# pnpm
pnpm create vite my-vue-app --template vue

Currently supported template presets include:

  • vanilla
  • vanilla-ts
  • vue
  • vue-ts
  • react
  • react-ts
  • preact
  • preact-ts
  • lit
  • lit-ts
  • svelte
  • svelte-ts

You can use . for the project name to scaffold in the current directory.

Community Templates

create-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for community maintained templates that include other tools or target different frameworks. You can use a tool like degit to scaffold your project with one of the templates.

npx degit user/project my-project
cd my-project

npm install
npm run dev

If the project uses main as the default branch, suffix the project repo with #main

npx degit user/project#main my-project