File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Vite 还提供了强大的扩展性,可通过其 [插件 API](./api-plugin)
2828
2929## 在线试用 Vite {#trying-vite-online}
3030
31- 你可以通过 [ StackBlitz] ( https://vite.new/ ) 在线试用 vite 。它直接在浏览器中运行基于 Vite 的构建,因此它与本地开发几乎无差别,同时无需在你的机器上安装任何东西。你可以浏览 ` vite.new/{template} ` 来选择你要使用的框架。
31+ 你可以通过 [ StackBlitz] ( https://vite.new/ ) 在线试用 Vite 。它直接在浏览器中运行基于 Vite 的构建,因此它与本地开发几乎无差别,同时无需在你的机器上安装任何东西。你可以浏览 ` vite.new/{template} ` 来选择你要使用的框架。
3232
3333目前支持的模板预设如下:
3434
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Vite 的内部和官方插件已经优化,以在提供与更广泛的生态系
1818
1919然而,社区插件的性能是 Vite 无法控制的,这可能会影响开发者的体验。在使用额外的 Vite 插件时,有一些事情可以注意:
2020
21- 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 ) 。
21+ 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 ) 。
2222
23232 . ` buildStart ` ,` config ` ,和 ` configResolved ` 钩子不应运行过长的时间和进行大量的操作。这些钩子会在开发服务器启动期间等待,这会延迟可以在浏览器中访问站点的时间。
2424
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Vite 提供了一系列推动编写现代代码的特定功能。例如:
1212- 建议使用 [ ` new Worker ` 语法] ( ./features#web-workers ) 来编写 Web Workers,以遵循现代标准。
1313- 在浏览器环境下,不能直接使用 Node.js 模块。
1414
15- 在新增特性时,会遵循这些模式来构建一个具备前瞻性的 API,但请注意,这样的API可能并不总是与其它构建工具兼容 。
15+ 在新增特性时,会遵循这些模式来构建一个具备前瞻性的 API,但请注意,这样的 API 可能并不总是与其它构建工具兼容 。
1616
1717## 旨在高性能的实用解决方案 {#a-pragmatic-approach-to-performance}
1818
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ SSR 特别指支持在 Node.js 中运行相同应用程序的前端框架(例
1414
1515## 示例项目 {#example-projects}
1616
17- Vite 为服务端渲染(SSR)提供了内建支持。[ ` create-vite-extra ` ] ( https://github.com/bluwy/create-vite-extra ) 包含了一些你可以用作参考的SSR设置示例 :
17+ Vite 为服务端渲染(SSR)提供了内建支持。[ ` create-vite-extra ` ] ( https://github.com/bluwy/create-vite-extra ) 包含了一些你可以用作参考的 SSR 设置示例 :
1818
1919- [ Vanilla] ( https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-vanilla )
2020- [ Vue] ( https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-vue )
Original file line number Diff line number Diff line change @@ -315,4 +315,4 @@ Zephyr 与其他云提供商采用不同的方法。它直接与 Vite 构建流
315315
316316# # EdgeOne Pages {#edgeone-pages}
317317
318- 通过遵循这些[说明](https://pages.edgeone.ai/document/vite),使用 [EdgeOne Pages](https://edgeone.ai/products/pages) 部署你的静态站点。
318+ 通过遵循这些 [说明](https://pages.edgeone.ai/document/vite),使用 [EdgeOne Pages](https://edgeone.ai/products/pages) 部署你的静态站点。
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ import './Foo.js' // 应该为 './foo.js'
200200- ** 暂时保留旧的 chunks** :考虑保留以前部署的块一段时间,以允许缓存的用户顺利过渡。
201201- ** 使用 service worker** :实现一个 service worker,它将预获取所有静态资源并缓存它们。
202202- ** Prefetch 动态 chunks** :请注意,如果您的 HTML 文件由于 ` Cache-Control ` 标头而被浏览器缓存,则这无济于事。
203- - ** 实现优雅的回退** :实现优雅的回退实现动态导入的错误处理 ,以便在缺少块时重新加载页面。请参阅 [ 加载错误处理] ( ./build.md#load-error-handling ) 以了解更多详细信息。
203+ - ** 实现优雅的回退** :为动态导入实现错误处理 ,以便在缺少块时重新加载页面。请参阅 [ 加载错误处理] ( ./build.md#load-error-handling ) 以了解更多详细信息。
204204
205205#### 网络状况不佳 {#poor-network-conditions}
206206
You can’t perform that action at this time.
0 commit comments