vite: fix https is enabled if cert is not present
This commit is contained in:
parent
130a989185
commit
f914ada22b
1 changed files with 9 additions and 7 deletions
|
@ -88,13 +88,15 @@ export default defineConfig(({ mode }) => {
|
|||
version(),
|
||||
],
|
||||
server: {
|
||||
https: {
|
||||
https: serverHttpCertBase
|
||||
? {
|
||||
// This config controls https for the *dev server*.
|
||||
// See docs/dev-https.md for setting up https
|
||||
key: serverHttpCertKey,
|
||||
cert: serverHttpCertCrt,
|
||||
passphrase: serverHttpCertPassword,
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
define: {
|
||||
"import.meta.env.BUILT_AT": `"${new Date().toISOString()}"`,
|
||||
|
|
Loading…
Reference in a new issue