fix(nuxi,schema): support devServer.https: true (#20498)

This commit is contained in:
Daniel Roe 2023-04-25 15:33:29 +01:00 committed by GitHub
parent 24ce1022e9
commit 4c200e4a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -62,8 +62,8 @@ export default defineNuxtCommand({
hostname: args.host || args.h || process.env.NUXT_HOST || config.devServer.host,
https: (args.https !== false && (args.https || config.devServer.https))
? {
cert: args['ssl-cert'] || (config.devServer.https && config.devServer.https.cert) || undefined,
key: args['ssl-key'] || (config.devServer.https && config.devServer.https.key) || undefined
cert: args['ssl-cert'] || (typeof config.devServer.https !== 'boolean' && config.devServer.https.cert) || undefined,
key: args['ssl-key'] || (typeof config.devServer.https !== 'boolean' && config.devServer.https.key) || undefined
}
: false
})

View File

@ -18,7 +18,7 @@ export default defineUntypedSchema({
* ```
*
*
* @type {false | { key: string; cert: string }}
* @type {boolean | { key: string; cert: string }}
*
*/
https: false,