You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/server-options.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ Enable TLS + HTTP/2. Note this downgrades to TLS only when the [`server.proxy` o
55
55
56
56
The value can also be an [options object](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener) passed to `https.createServer()`.
57
57
58
-
A valid certificate is needed. For a basic setup, you can add [@vitejs/plugin-basic-ssl](https://github.com/vitejs/vite-plugin-basic-ssl) to the project plugins, which will automatically create and cache a self-signed certificate.
58
+
A valid certificate is needed. For a basic setup, you can add [@vitejs/plugin-basic-ssl](https://github.com/vitejs/vite-plugin-basic-ssl) to the project plugins, which will automatically create and cache a self-signed certificate. But we recommend creating your own certificates.
Copy file name to clipboardExpand all lines: docs/guide/migration.md
+13
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,19 @@ You can use `?init` which is similar to the previous behavior.
101
101
})
102
102
```
103
103
104
+
### Automatic https certificate generation
105
+
106
+
A valid certificate is needed when using `https`. In Vite v2, if no certificate was configured, a self-signed certificate was automatically created and cached.
107
+
Since Vite v3, we recommend manually creating your certificates. If you still want to use the automatic generation from v2, this feature can be enabled back by adding [@vitejs/plugin-basic-ssl](https://github.com/vitejs/vite-plugin-basic-ssl) to the project plugins.
108
+
109
+
```js
110
+
importbasicSslfrom'@vitejs/plugin-basic-ssl'
111
+
112
+
exportdefault {
113
+
plugins: [basicSsl()]
114
+
}
115
+
```
116
+
104
117
## Advanced
105
118
106
119
There are some changes which only affects plugin/tool creators.
0 commit comments