From 6cb2963d8e8a6bbe642eb942530571c5dbfdf010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Wouts?= Date: Fri, 1 Oct 2021 18:59:30 +1000 Subject: [PATCH 1/2] docs: clarify that `server.hmr.server` works with HTTP too (#5163) --- config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/index.md b/config/index.md index a75b60e3..c141e7be 100644 --- a/config/index.md +++ b/config/index.md @@ -475,7 +475,7 @@ export default defineConfig(async ({ command, mode }) => { `clientPort` is an advanced option that overrides the port only on the client side, allowing you to serve the websocket on a different port than the client code looks for it on. Useful if you're using an SSL proxy in front of your dev server. - When using `server.middlewareMode` and `server.https`, setting `server.hmr.server` to your HTTPS server will process HMR secure connection requests through your server. This can be helpful when using self-signed certificates. + When using `server.middlewareMode` or `server.https`, assigning `server.hmr.server` to your HTTP(S) server will process HMR connection requests through your server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port. ### server.watch From f69d9fc8399cdf6b53fd0dd07794b663fc6ecb22 Mon Sep 17 00:00:00 2001 From: QC-L Date: Sat, 2 Oct 2021 15:06:11 +0800 Subject: [PATCH 2/2] docs(cn): fix conflicts --- config/index.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/config/index.md b/config/index.md index 53f93343..5ca9b168 100644 --- a/config/index.md +++ b/config/index.md @@ -473,11 +473,7 @@ export default defineConfig(async ({ command, mode }) => { `clientPort` 是一个高级选项,只在客户端的情况下覆盖端口,这允许你为 websocket 提供不同的端口,而并非在客户端代码中查找。如果需要在 dev-server 情况下使用 SSL 代理,这非常有用。 -<<<<<<< HEAD - 当使用 `server.middlewareMode` 和 `server.https` 时,你需将 `server.hmr.server` 设置为你 HTTPS 的服务器,这将通过你的服务器来处理 HMR 的安全连接请求。这在使用自签证书的情况下,非常有用。 -======= - When using `server.middlewareMode` or `server.https`, assigning `server.hmr.server` to your HTTP(S) server will process HMR connection requests through your server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port. ->>>>>>> 6cb2963d8e8a6bbe642eb942530571c5dbfdf010 + 当使用 `server.middlewareMode` 或 `server.https` 时,你需将 `server.hmr.server` 指定为你 HTTP(S) 的服务器,这将通过你的服务器来处理 HMR 的安全连接请求。这在使用自签证书或想通过网络在某端口暴露 Vite 的情况下,非常有用。 ### server.watch {#server-watch}