Skip to content

Commit

Permalink
Merge pull request #672 from vitejs/sync-b487b176-1
Browse files Browse the repository at this point in the history
docs(en): merge docs-cn/sync-docs into docs-cn/dev @ b487b17
  • Loading branch information
ShenQingchuan committed Dec 28, 2022
2 parents 65734f3 + 8f59040 commit ecb6445
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
7 changes: 7 additions & 0 deletions _data/team.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ export const core = [
desc: 'Passionate by tooling around TypeScript and React.',
links: [{ icon: 'github', link: 'https://github.com/ArnaudBarre' }],
},
{
avatar: 'https://github.com/dominikg.png',
name: 'Dominik G.',
title: 'Resident CI Expert',
desc: 'Team Member of Vite and Svelte',
links: [{ icon: 'github', link: 'https://github.com/dominikg' }],
},
]

export const emeriti = [
Expand Down
2 changes: 2 additions & 0 deletions config/worker-options.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Worker 选项 {#worker-options}

Options related to Web Workers.

## worker.format

- **类型:** `'es' | 'iife'`
Expand Down
2 changes: 1 addition & 1 deletion guide/api-hmr.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if (import.meta.hot) {
import.meta.hot.accept(
['./foo.js', './bar.js'],
([newFooModule, newBarModule]) => {
// 只有当更新模块非空时,回调函数接收一个数组
// 只有当所更新的模块非空时,回调函数接收一个数组
// 如果更新不成功(例如语法错误),则该数组为空
}
)
Expand Down
6 changes: 3 additions & 3 deletions guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ dist/my-lib.umd.cjs 0.30 KiB / gzip: 0.16 KiB
"type": "module",
"files": ["dist"],
"main": "./dist/my-lib.cjs",
"module": "./dist/my-lib.mjs",
"module": "./dist/my-lib.js",
"exports": {
".": {
"import": "./dist/my-lib.mjs",
"import": "./dist/my-lib.js",
"require": "./dist/my-lib.cjs"
},
"./secondary": {
"import": "./dist/secondary.mjs",
"import": "./dist/secondary.js",
"require": "./dist/secondary.cjs"
}
}
Expand Down
22 changes: 22 additions & 0 deletions guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@

请注意,这些配置会持久作用,但需要 **重新启动**

### 网络请求停止加载 {#network-requests-stop-loading}

使用自签名SSL证书时,Chrome 会忽略所有缓存指令并重新加载内容。而 Vite 依赖于这些缓存指令。

要解决此问题,请使用受信任的SSL证书。

请查看:[缓存问题](https://helpx.adobe.com/mt/experience-manager/kb/cache-problems-on-chrome-with-SSL-certificate-errors.html) 和相关的 [Chrome issue](https://bugs.chromium.org/p/chromium/issues/detail?id=110649#c8)

#### macOS

您可以使用以下命令通过 CLI 安装受信任的证书:

```
security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db your-cert.cer
```
或者,通过将其导入 Keychain Access 应用程序并将您的证书的信任更新为“始终信任”。
### 431 Request Header Fields Too Large {#431-request-header-fields-too-large}
当服务器或 WebSocket 服务收到一个较大的 HTTP 头,该请求可能会被遗落并且会显示下面这样的警告。
Expand Down Expand Up @@ -83,6 +101,10 @@ import './Foo.js' // 应该为 './foo.js'

同时如果有依赖环,也会发生完全重载。要解决这个问题,请先尝试解决依赖循环。

### 控制台中大量热更新 {#high-number-of-hmr-updates-in-console}

This can be caused by a circular dependency. To solve this, try breaking the loop.

## 构建 {#build}

### 构建产物因为 CORS 错误无法工作 {#built-file-does-not-work-because-of-cors-error}
Expand Down

0 comments on commit ecb6445

Please sign in to comment.