Skip to content

Commit 46d1f9f

Browse files
authored
Merge pull request #1455 from vitejs/dev
d2m
2 parents 5863421 + 09c27b0 commit 46d1f9f

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

.vitepress/theme/components/YouTubeVideo.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ defineProps({
1212
:src="`https://www.youtube.com/embed/${videoId}`"
1313
title="YouTube video player"
1414
frameborder="0"
15-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
15+
allow="
16+
accelerometer;
17+
autoplay;
18+
clipboard-write;
19+
encrypted-media;
20+
gyroscope;
21+
picture-in-picture;
22+
"
1623
allowfullscreen
1724
></iframe>
1825
</div>

guide/features.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export type { T }
5353

5454
### TypeScript 编译器选项 {#typescript-compiler-options}
5555

56+
Vite 会参考 `tsconfig.json` 中的一些配置项,并设置相应的 esbuild 选项。对于每个文件,Vite 会使用距离最近的父级目录中的 `tsconfig.json`。如果该 `tsconfig.json` 包含 [`references`](https://www.typescriptlang.org/tsconfig/#references) 字段,Vite 将使用满足 [`include`](https://www.typescriptlang.org/tsconfig/#include)[`exclude`](https://www.typescriptlang.org/tsconfig/#exclude) 字段的被引用配置文件。
57+
58+
当选项同时在 Vite 配置和 `tsconfig.json` 中设置时,Vite 配置中的值优先。
59+
5660
`tsconfig.json``compilerOptions` 下的一些配置项需要特别注意。
5761

5862
#### `isolatedModules`

guide/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ $ deno init --npm vite my-vue-app --template vue
106106

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

109+
要创建一个没有交互式提示的项目,你可以使用 `--no-interactive` 标志。
110+
109111
::::
110112

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

guide/philosophy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Vite 提供了一系列推动编写现代代码的特定功能。例如:
1616

1717
## 旨在高性能的实用解决方案 {#a-pragmatic-approach-to-performance}
1818

19-
Vite 自其诞生之初(详见:[为什么选 Vite](./why.md))就一直致力于性能优化。其开发服务器架构设计确保了随着项目规模扩大,模块热替换(HMR)仍能保持高速运行。Vite 采用类似 [esbuild](https://esbuild.github.io/)[SWC](https://github.com/vitejs/vite-plugin-react-swc) 这样的原生工具处理复杂的任务,同时将其他部分代码保留在 JavaScript 中,以实现速度与灵活性之间的平衡。在需要时,框架插件会利用 [Babel](https://babeljs.io/) 来编译用户代码。构建阶段,Vite 当前使用的是 [Rollup](https://cn.rollupjs.org/) ,此时包体积大小以及能够接入广泛生态系统的插件比原始速度更重要。Vite 将持续内部改进和发展,在新库出现时适时采用以提升开发者体验(DX),同时保持 API 的稳定性。
19+
Vite 自其诞生之初(详见:[为什么选 Vite](./why.md))就一直致力于性能优化。其开发服务器架构设计确保了随着项目规模扩大,模块热替换(HMR)仍能保持高速运行。Vite 采用类似 [esbuild](https://esbuild.github.io/)[SWC](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc) 这样的原生工具处理复杂的任务,同时将其他部分代码保留在 JavaScript 中,以实现速度与灵活性之间的平衡。在需要时,框架插件会利用 [Babel](https://babeljs.io/) 来编译用户代码。构建阶段,Vite 当前使用的是 [Rollup](https://cn.rollupjs.org/) ,此时包体积大小以及能够接入广泛生态系统的插件比原始速度更重要。Vite 将持续内部改进和发展,在新库出现时适时采用以提升开发者体验(DX),同时保持 API 的稳定性。
2020

2121
## 基于 Vite 构建框架 {#building-frameworks-on-top-of-vite}
2222

0 commit comments

Comments
 (0)