Skip to content

Commit 2da9651

Browse files
committed
docs(en): merging all conflicts
2 parents 261097e + c2de407 commit 2da9651

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

config/preview-options.md

+6
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,15 @@ export default defineConfig({
6060
- **类型:** `https.ServerOptions`
6161
- **默认:** [`server.https`](./server-options#server-https)
6262

63+
<<<<<<< HEAD
6364
启用 TLS + HTTP/2。注意,只有在与 [`server.proxy` 选项](./server-options#server-proxy) 同时使用时,才会降级为 TLS。
6465

6566
该值也可以传递给 `https.createServer()`[options 对象](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener)
67+
=======
68+
Enable TLS + HTTP/2.
69+
70+
See [`server.https`](./server-options#server-https) for more details.
71+
>>>>>>> c2de4078a5ac7fc014f5c5135f223e153799f0fe
6672
6773
## preview.open {#preview-open}
6874

config/server-options.md

+6
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,15 @@ Vite允许响应的主机名。
9090

9191
- **类型:** `https.ServerOptions`
9292

93+
<<<<<<< HEAD
9394
启用 TLS + HTTP/2。注意:当 [`server.proxy` 选项](#server-proxy) 也被使用时,将会仅使用 TLS。
9495

9596
这个值也可以是一个传递给 `https.createServer()`[选项对象](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener)
97+
=======
98+
Enable TLS + HTTP/2. The value is an [options object](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener) passed to `https.createServer()`.
99+
100+
Note that this downgrades to TLS only when the [`server.proxy` option](#server-proxy) is also used.
101+
>>>>>>> c2de4078a5ac7fc014f5c5135f223e153799f0fe
96102
97103
需要一个合法可用的证书。对基本使用的配置需求来说,你可以添加 [@vitejs/plugin-basic-ssl](https://github.com/vitejs/vite-plugin-basic-ssl) 到项目插件中,它会自动创建和缓存一个自签名的证书。但我们推荐你创建和使用你自己的证书。
98104

guide/api-hmr.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ Vite 通过特殊的 `import.meta.hot` 对象暴露手动 HMR API。
1010

1111
```ts twoslash
1212
import type { ModuleNamespace } from 'vite/types/hot.d.ts'
13-
import type { InferCustomEventPayload } from 'vite/types/customEvent.d.ts'
13+
import type {
14+
CustomEventName,
15+
InferCustomEventPayload,
16+
} from 'vite/types/customEvent.d.ts'
1417

1518
// ---cut---
1619
interface ImportMeta {
@@ -32,15 +35,18 @@ interface ViteHotContext {
3235
prune(cb: (data: any) => void): void
3336
invalidate(message?: string): void
3437

35-
on<T extends string>(
38+
on<T extends CustomEventName>(
3639
event: T,
3740
cb: (payload: InferCustomEventPayload<T>) => void,
3841
): void
39-
off<T extends string>(
42+
off<T extends CustomEventName>(
4043
event: T,
4144
cb: (payload: InferCustomEventPayload<T>) => void,
4245
): void
43-
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
46+
send<T extends CustomEventName>(
47+
event: T,
48+
data?: InferCustomEventPayload<T>,
49+
): void
4450
}
4551
```
4652

0 commit comments

Comments
 (0)