Skip to content

Commit

Permalink
release v3.1.0 Merge pull request #602 from vitejs/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenQingchuan authored Sep 9, 2022
2 parents 64fee05 + 8b24888 commit cccd04a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion blog/announcing-vite3.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ We want to thank everyone that have implemented features, and fixes, given feedb
- 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).
- [@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.
- [@dominikg](https://github.com/dominikg) for his work on vite-ecosystem-ci.
- [@ZoltanKochan](https://twitter.com/ZoltanKochan) for his work on [pnpm](https://pnpm.io/), and for his responsivness when we needed support with it.
- [@ZoltanKochan](https://twitter.com/ZoltanKochan) for his work on [pnpm](https://pnpm.io/), and for his responsiveness when we needed support with it.
- [@rixo](https://github.com/rixo) for HMR Partial Accept support.
- [@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.
- [@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.
Expand Down
4 changes: 3 additions & 1 deletion config/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ import 'vite/modulepreload-polyfill'

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

Git LFS 占位符会自动排除在内联之外,因为它们不包含它们所表示的文件的内容。

:::tip 注意
如果你指定了 `build.lib`,那么 `build.assetsInlineLimit` 将被忽略,无论文件大小,资源都会被内联。
如果你指定了 `build.lib`,那么 `build.assetsInlineLimit` 将被忽略,无论文件大小或是否为 Git LFS 占位符,资源都会被内联。
:::

## build.cssCodeSplit {#build-csscodesplit}
Expand Down
6 changes: 6 additions & 0 deletions config/preview-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ export default defineConfig({
- **默认:** [`server.cors`](#server_proxy)

为开发服务器配置 CORS。此功能默认启用并支持任何来源。可传递一个 [options 对象](https://github.com/expressjs/cors) 来进行配置,或者传递 `false` 来禁用此行为。

## preview.headers {#preview-headers}

- **类型:** `OutgoingHttpHeaders`

指明服务器返回的响应头。
9 changes: 7 additions & 2 deletions guide/api-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ interface ViteDevServer {
*/
moduleGraph: ModuleGraph
/**
* 以代码方式解析、加载和转换 url 并获取结果
* 而不需要通过 http 请求管道。
* Vite CLI 会打印出来的被解析的 URL。在中间件模式下、或是
* 在 `server.listen` 调用之前会是 null
*/
resolvedUrls: ResolvedServerUrls | null
/**
* 编程式地解析、加载和转换一个 URL 并获得
* 还没有进入 HTTP 请求管道中的结果
*/
transformRequest(
url: string,
Expand Down
2 changes: 2 additions & 0 deletions guide/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ document.getElementById('hero-img').src = imgUrl

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

- Git LFS 占位符会自动排除在内联之外,因为它们不包含它们所表示的文件的内容。要获得内联,请确保在构建之前通过 Git LFS 下载文件内容。

### 显式 URL 引入 {#explicit-url-imports}

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

This file was deleted.

1 comment on commit cccd04a

@vercel
Copy link

@vercel vercel bot commented on cccd04a Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cn-vitejs-dev – ./

cn.vitejs.dev
cn-vitejs-dev-git-main-vuejs.vercel.app
cn-vitejs-dev-vuejs.vercel.app
docs-cn.vercel.app

Please sign in to comment.