We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3b59c2 commit 39abca9Copy full SHA for 39abca9
src/index.ts
@@ -10,8 +10,12 @@ function viteBasicSslPlugin(): Plugin {
10
async configResolved(config) {
11
const certificate = await getCertificate((config.cacheDir ?? defaultCacheDir) + '/basic-ssl')
12
const https = () => ({ cert: certificate, key: certificate })
13
- config.server.https = Object.assign({}, config.server.https, https())
14
- config.preview.https = Object.assign({}, config.preview.https, https())
+ if (config.server.https === undefined || !!config.server.https) {
+ config.server.https = Object.assign({}, config.server.https, https())
15
+ }
16
+ if (config.preview.https === undefined || !!config.preview.https) {
17
+ config.preview.https = Object.assign({}, config.preview.https, https())
18
19
}
20
21
0 commit comments