Skip to content
Merged

d2m #1455

Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion .vitepress/theme/components/YouTubeVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ defineProps({
:src="`https://www.youtube.com/embed/${videoId}`"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allow="
accelerometer;
autoplay;
clipboard-write;
encrypted-media;
gyroscope;
picture-in-picture;
"
allowfullscreen
></iframe>
</div>
Expand Down
4 changes: 4 additions & 0 deletions guide/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export type { T }

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

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) 字段的被引用配置文件。

当选项同时在 Vite 配置和 `tsconfig.json` 中设置时,Vite 配置中的值优先。

`tsconfig.json` 中 `compilerOptions` 下的一些配置项需要特别注意。

#### `isolatedModules`
Expand Down
2 changes: 2 additions & 0 deletions guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ $ deno init --npm vite my-vue-app --template vue

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

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

::::

## 社区模板 {#community-templates}
Expand Down
2 changes: 1 addition & 1 deletion guide/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Vite 提供了一系列推动编写现代代码的特定功能。例如:

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

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 的稳定性。
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 的稳定性。

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

Expand Down