# Vite 创建

# 创建项目

  • 官网 Vite (opens new window)

    WARNING

    Vite 需要 Node.js 版本 18+ 或 20+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。

# 创建

# npm 7+, 需要额外加 --:
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

# 运行

cd xxx                 // xxx 为项目名称

npm run dev          // 运行项目