Skip to content

sync into main #1330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ Vite 还提供了强大的扩展性,可通过其 [插件 API](./api-plugin)

## 搭建第一个 Vite 项目 {#scaffolding-your-first-vite-project}

::: tip 兼容性注意
Vite 需要 [Node.js](https://nodejs.org/en/) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。
:::

::: code-group

```bash [npm]
Expand All @@ -73,6 +69,12 @@ $ deno init --npm vite

然后按照提示操作即可!

::: tip 兼容性注意
Vite 需要 [Node.js](https://nodejs.org/en/) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。
:::

:::: details 使用命令行选项创建 vite

你还可以通过附加的命令行选项直接指定项目名称和你想要使用的模板。例如,要构建一个 Vite + Vue 项目,运行:

::: code-group
Expand Down Expand Up @@ -104,6 +106,8 @@ $ deno init --npm vite my-vue-app --template vue

你可以使用 `.` 作为项目名称,在当前目录中创建项目脚手架。

::::

## 社区模板 {#community-templates}

create-vite 是一个快速生成主流框架基础模板的工具。查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各种工具和不同框架的模板。
Expand Down