diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 6da840d29b..50e10e99ae 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -59,12 +59,12 @@ export default defineNuxtCommand({ showURL: false, clipboard: args.clipboard, open: args.open || args.o, - port: args.port || args.p || process.env.NUXT_PORT || config.devServer.port, - hostname: args.host || args.h || process.env.NUXT_HOST || config.devServer.host, + port: args.port || args.p || process.env.NUXT_PORT || process.env.NITRO_PORT || config.devServer.port, + hostname: args.host || args.h || process.env.NUXT_HOST || process.env.NITRO_HOST || config.devServer.host, https: (args.https !== false && (args.https || config.devServer.https)) ? { - 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 + cert: args['ssl-cert'] || process.env.NUXT_SSL_CERT || process.env.NITRO_SSL_CERT || (typeof config.devServer.https !== 'boolean' && config.devServer.https.cert) || undefined, + key: args['ssl-key'] || process.env.NUXT_SSL_KEY || process.env.NITRO_SSL_KEY || (typeof config.devServer.https !== 'boolean' && config.devServer.https.key) || undefined } : false })