Skip to content
Merged

m2d #1675

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
2 changes: 1 addition & 1 deletion guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Vite 还提供了强大的扩展性,可通过其 [插件 API](./api-plugin)

## 在线试用 Vite {#trying-vite-online}

你可以通过 [StackBlitz](https://vite.new/) 在线试用 vite。它直接在浏览器中运行基于 Vite 的构建,因此它与本地开发几乎无差别,同时无需在你的机器上安装任何东西。你可以浏览 `vite.new/{template}` 来选择你要使用的框架。
你可以通过 [StackBlitz](https://vite.new/) 在线试用 Vite。它直接在浏览器中运行基于 Vite 的构建,因此它与本地开发几乎无差别,同时无需在你的机器上安装任何东西。你可以浏览 `vite.new/{template}` 来选择你要使用的框架。

目前支持的模板预设如下:

Expand Down
2 changes: 1 addition & 1 deletion guide/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Vite 的内部和官方插件已经优化,以在提供与更广泛的生态系

然而,社区插件的性能是 Vite 无法控制的,这可能会影响开发者的体验。在使用额外的 Vite 插件时,有一些事情可以注意:

1. 只在特定情况下,大型依赖项应动态导入,以减少Node.js的启动时间。重构示例:[vite-plugin-react#212](https://github.com/vitejs/vite-plugin-react/pull/212) 和 [vite-plugin-pwa#224](https://github.com/vite-pwa/vite-plugin-pwa/pull/244)。
1. 只在特定情况下,大型依赖项应动态导入,以减少 Node.js 的启动时间。重构示例:[vite-plugin-react#212](https://github.com/vitejs/vite-plugin-react/pull/212) 和 [vite-plugin-pwa#224](https://github.com/vite-pwa/vite-plugin-pwa/pull/244)。

2. `buildStart`,`config`,和 `configResolved` 钩子不应运行过长的时间和进行大量的操作。这些钩子会在开发服务器启动期间等待,这会延迟可以在浏览器中访问站点的时间。

Expand Down
2 changes: 1 addition & 1 deletion guide/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vite 提供了一系列推动编写现代代码的特定功能。例如:
- 建议使用 [`new Worker` 语法](./features#web-workers) 来编写 Web Workers,以遵循现代标准。
- 在浏览器环境下,不能直接使用 Node.js 模块。

在新增特性时,会遵循这些模式来构建一个具备前瞻性的 API,但请注意,这样的API可能并不总是与其它构建工具兼容
在新增特性时,会遵循这些模式来构建一个具备前瞻性的 API,但请注意,这样的 API 可能并不总是与其它构建工具兼容

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

Expand Down
2 changes: 1 addition & 1 deletion guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SSR 特别指支持在 Node.js 中运行相同应用程序的前端框架(例

## 示例项目 {#example-projects}

Vite 为服务端渲染(SSR)提供了内建支持。[`create-vite-extra`](https://github.com/bluwy/create-vite-extra) 包含了一些你可以用作参考的SSR设置示例
Vite 为服务端渲染(SSR)提供了内建支持。[`create-vite-extra`](https://github.com/bluwy/create-vite-extra) 包含了一些你可以用作参考的 SSR 设置示例

- [Vanilla](https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-vanilla)
- [Vue](https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-vue)
Expand Down
2 changes: 1 addition & 1 deletion guide/static-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,4 @@ Zephyr 与其他云提供商采用不同的方法。它直接与 Vite 构建流

## EdgeOne Pages {#edgeone-pages}

通过遵循这些[说明](https://pages.edgeone.ai/document/vite),使用 [EdgeOne Pages](https://edgeone.ai/products/pages) 部署你的静态站点。
通过遵循这些 [说明](https://pages.edgeone.ai/document/vite),使用 [EdgeOne Pages](https://edgeone.ai/products/pages) 部署你的静态站点。
2 changes: 1 addition & 1 deletion guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ import './Foo.js' // 应该为 './foo.js'
- **暂时保留旧的 chunks**:考虑保留以前部署的块一段时间,以允许缓存的用户顺利过渡。
- **使用 service worker**:实现一个 service worker,它将预获取所有静态资源并缓存它们。
- **Prefetch 动态 chunks**:请注意,如果您的 HTML 文件由于 `Cache-Control` 标头而被浏览器缓存,则这无济于事。
- **实现优雅的回退**:实现优雅的回退实现动态导入的错误处理,以便在缺少块时重新加载页面。请参阅 [加载错误处理](./build.md#load-error-handling) 以了解更多详细信息。
- **实现优雅的回退**:为动态导入实现错误处理,以便在缺少块时重新加载页面。请参阅 [加载错误处理](./build.md#load-error-handling) 以了解更多详细信息。

#### 网络状况不佳 {#poor-network-conditions}

Expand Down