File tree 3 files changed +22
-4
lines changed
3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,15 @@ export default defineConfig({
60
60
- ** 类型:** ` https.ServerOptions `
61
61
- ** 默认:** [ ` server.https ` ] ( ./server-options#server-https )
62
62
63
+ <<<<<<< HEAD
63
64
启用 TLS + HTTP/2。注意,只有在与 [ ` server.proxy ` 选项] ( ./server-options#server-proxy ) 同时使用时,才会降级为 TLS。
64
65
65
66
该值也可以传递给 ` 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
66
72
67
73
## preview.open {#preview-open}
68
74
Original file line number Diff line number Diff line change @@ -90,9 +90,15 @@ Vite允许响应的主机名。
90
90
91
91
- ** 类型:** ` https.ServerOptions `
92
92
93
+ <<<<<<< HEAD
93
94
启用 TLS + HTTP/2。注意:当 [ ` server.proxy ` 选项] ( #server-proxy ) 也被使用时,将会仅使用 TLS。
94
95
95
96
这个值也可以是一个传递给 ` 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
96
102
97
103
需要一个合法可用的证书。对基本使用的配置需求来说,你可以添加 [ @vitejs/plugin-basic-ssl ] ( https://github.com/vitejs/vite-plugin-basic-ssl ) 到项目插件中,它会自动创建和缓存一个自签名的证书。但我们推荐你创建和使用你自己的证书。
98
104
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ Vite 通过特殊的 `import.meta.hot` 对象暴露手动 HMR API。
10
10
11
11
``` ts twoslash
12
12
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'
14
17
15
18
// ---cut---
16
19
interface ImportMeta {
@@ -32,15 +35,18 @@ interface ViteHotContext {
32
35
prune(cb : (data : any ) => void ): void
33
36
invalidate(message ? : string ): void
34
37
35
- on<T extends string >(
38
+ on<T extends CustomEventName >(
36
39
event : T ,
37
40
cb : (payload : InferCustomEventPayload <T >) => void ,
38
41
): void
39
- off<T extends string >(
42
+ off<T extends CustomEventName >(
40
43
event : T ,
41
44
cb : (payload : InferCustomEventPayload <T >) => void ,
42
45
): 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
44
50
}
45
51
```
46
52
You can’t perform that action at this time.
0 commit comments