fix(nuxi): pass value of https through to vite-node (#7271)

This commit is contained in:
Daniel Roe 2022-09-06 10:45:14 +01:00 committed by GitHub
parent a4fa070ad5
commit 524ba557eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -21,3 +21,7 @@ Option | Default | Description
The port and host can also be set via NUXT_PORT, PORT, NUXT_HOST or HOST environment variables.
This command sets `process.env.NODE_ENV` to `development`.
::alert{type="info"}
If you are using a self-signed certificate in development, you will need to set `NODE_TLS_REJECT_UNAUTHORIZED=0` in your environment.
::

View File

@ -94,6 +94,7 @@ export default defineNuxtCommand({
const address = listener.server.address() as AddressInfo
currentNuxt.options.server.port = address.port
currentNuxt.options.server.host = address.address
currentNuxt.options.server.https = Boolean(args.https)
await Promise.all([
writeTypes(currentNuxt).catch(console.error),