File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,10 +43,6 @@ Vite 还提供了强大的扩展性,可通过其 [插件 API](./api-plugin)
4343
4444## 搭建第一个 Vite 项目 {#scaffolding-your-first-vite-project}
4545
46- ::: tip 兼容性注意
47- Vite 需要 [ Node.js] ( https://nodejs.org/en/ ) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。
48- :::
49-
5046::: code-group
5147
5248``` bash [npm]
@@ -73,6 +69,12 @@ $ deno init --npm vite
7369
7470然后按照提示操作即可!
7571
72+ ::: tip 兼容性注意
73+ Vite 需要 [ Node.js] ( https://nodejs.org/en/ ) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。
74+ :::
75+
76+ :::: details 使用命令行选项创建 vite
77+
7678你还可以通过附加的命令行选项直接指定项目名称和你想要使用的模板。例如,要构建一个 Vite + Vue 项目,运行:
7779
7880::: code-group
@@ -104,6 +106,8 @@ $ deno init --npm vite my-vue-app --template vue
104106
105107你可以使用 ` . ` 作为项目名称,在当前目录中创建项目脚手架。
106108
109+ ::::
110+
107111## 社区模板 {#community-templates}
108112
109113create-vite 是一个快速生成主流框架基础模板的工具。查看 Awesome Vite 仓库的 [ 社区维护模板] ( https://github.com/vitejs/awesome-vite#templates ) ,里面包含各种工具和不同框架的模板。
You can’t perform that action at this time.
0 commit comments