Skip to content

Commit cccd04a

Browse files
release v3.1.0 Merge pull request #602 from vitejs/dev
2 parents 64fee05 + 8b24888 commit cccd04a

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

blog/announcing-vite3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ We want to thank everyone that have implemented features, and fixes, given feedb
254254
- Vite team members [@youyuxi](https://twitter.com/youyuxi), [@patak_dev](https://twitter.com/patak_dev), [@antfu7](https://twitter.com/antfu7), [@bluwyoo](https://twitter.com/bluwyoo), [@sapphi_red](https://twitter.com/sapphi_red), [@haoqunjiang](https://twitter.com/haoqunjiang), [@poyoho](https://github.com/poyoho), [@Shini_92](https://twitter.com/Shini_92), and [@retropragma](https://twitter.com/retropragma).
255255
- [@benmccann](https://github.com/benmccann), [@danielcroe](https://twitter.com/danielcroe), [@brillout](https://twitter.com/brillout), [@sheremet_va](https://twitter.com/sheremet_va), [@userquin](https://twitter.com/userquin), [@enzoinnocenzi](https://twitter.com/enzoinnocenzi), [@maximomussini](https://twitter.com/maximomussini), [@IanVanSchooten](https://twitter.com/IanVanSchooten), the [Astro team](https://astro.build/), and all other maintainers of frameworks and plugins in the ecosystem in that helped shape v3.
256256
- [@dominikg](https://github.com/dominikg) for his work on vite-ecosystem-ci.
257-
- [@ZoltanKochan](https://twitter.com/ZoltanKochan) for his work on [pnpm](https://pnpm.io/), and for his responsivness when we needed support with it.
257+
- [@ZoltanKochan](https://twitter.com/ZoltanKochan) for his work on [pnpm](https://pnpm.io/), and for his responsiveness when we needed support with it.
258258
- [@rixo](https://github.com/rixo) for HMR Partial Accept support.
259259
- [@KiaKing85](https://twitter.com/KiaKing85) for getting the theme ready for the Vite 3 release, and [@\_brc_dd](https://twitter.com/_brc_dd) for working on the VitePress internals.
260260
- [@CodingWithCego](https://twitter.com/CodingWithCego) for the new Spanish translation, and [@ShenQingchuan](https://twitter.com/ShenQingchuan), [@hiro-lapis](https://github.com/hiro-lapis) and others in the Chinese and Japanese translations teams for keeping the translated docs up to date.

config/build-options.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ import 'vite/modulepreload-polyfill'
5353

5454
小于此阈值的导入或引用资源将内联为 base64 编码,以避免额外的 http 请求。设置为 `0` 可以完全禁用此项。
5555

56+
Git LFS 占位符会自动排除在内联之外,因为它们不包含它们所表示的文件的内容。
57+
5658
:::tip 注意
57-
如果你指定了 `build.lib`,那么 `build.assetsInlineLimit` 将被忽略,无论文件大小,资源都会被内联。
59+
如果你指定了 `build.lib`,那么 `build.assetsInlineLimit` 将被忽略,无论文件大小或是否为 Git LFS 占位符,资源都会被内联。
5860
:::
5961

6062
## build.cssCodeSplit {#build-csscodesplit}

config/preview-options.md

+6
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ export default defineConfig({
7575
- **默认:** [`server.cors`](#server_proxy)
7676

7777
为开发服务器配置 CORS。此功能默认启用并支持任何来源。可传递一个 [options 对象](https://github.com/expressjs/cors) 来进行配置,或者传递 `false` 来禁用此行为。
78+
79+
## preview.headers {#preview-headers}
80+
81+
- **类型:** `OutgoingHttpHeaders`
82+
83+
指明服务器返回的响应头。

guide/api-javascript.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ interface ViteDevServer {
9090
*/
9191
moduleGraph: ModuleGraph
9292
/**
93-
* 以代码方式解析、加载和转换 url 并获取结果
94-
* 而不需要通过 http 请求管道。
93+
* Vite CLI 会打印出来的被解析的 URL。在中间件模式下、或是
94+
* 在 `server.listen` 调用之前会是 null
95+
*/
96+
resolvedUrls: ResolvedServerUrls | null
97+
/**
98+
* 编程式地解析、加载和转换一个 URL 并获得
99+
* 还没有进入 HTTP 请求管道中的结果
95100
*/
96101
transformRequest(
97102
url: string,

guide/assets.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ document.getElementById('hero-img').src = imgUrl
2626

2727
- 较小的资源体积小于 [`assetsInlineLimit` 选项值](/config/build-options.md#build-assetsinlinelimit) 则会被内联为 base64 data URL。
2828

29+
- Git LFS 占位符会自动排除在内联之外,因为它们不包含它们所表示的文件的内容。要获得内联,请确保在构建之前通过 Git LFS 下载文件内容。
30+
2931
### 显式 URL 引入 {#explicit-url-imports}
3032

3133
未被包含在内部列表或 `assetsInclude` 中的资源,可以使用 `?url` 后缀显式导入为一个 URL。这十分有用,例如,要导入 [Houdini Paint Worklets](https://houdini.how/usage) 时:

vite.config.ts

-15
This file was deleted.

0 commit comments

Comments
 (0)