From 541747fa28033561566bd0e63d98a38d468dbf35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Tue, 4 Jul 2023 00:19:18 +0200 Subject: [PATCH] Revert "fix(nextjs): set localhost as hostname default (#17856)" (#17931) --- docs/generated/packages/next/executors/server.json | 3 +-- packages/next/src/executors/server/schema.json | 3 +-- packages/next/src/executors/server/server.impl.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/generated/packages/next/executors/server.json b/docs/generated/packages/next/executors/server.json index 0c02522734cee..c462e35e7c7f8 100644 --- a/docs/generated/packages/next/executors/server.json +++ b/docs/generated/packages/next/executors/server.json @@ -41,8 +41,7 @@ }, "hostname": { "type": "string", - "description": "Hostname on which the application is served.", - "default": "localhost" + "description": "Hostname on which the application is served." }, "buildLibsFromSource": { "type": "boolean", diff --git a/packages/next/src/executors/server/schema.json b/packages/next/src/executors/server/schema.json index da54158e3bf90..13f094bbab6f6 100644 --- a/packages/next/src/executors/server/schema.json +++ b/packages/next/src/executors/server/schema.json @@ -38,8 +38,7 @@ }, "hostname": { "type": "string", - "description": "Hostname on which the application is served.", - "default": "localhost" + "description": "Hostname on which the application is served." }, "buildLibsFromSource": { "type": "boolean", diff --git a/packages/next/src/executors/server/server.impl.ts b/packages/next/src/executors/server/server.impl.ts index 2593420bea32d..78e06255ad43b 100644 --- a/packages/next/src/executors/server/server.impl.ts +++ b/packages/next/src/executors/server/server.impl.ts @@ -30,7 +30,7 @@ export default async function* serveExecutor( ); const projectRoot = context.workspace.projects[context.projectName].root; - const { port, keepAliveTimeout, hostname = 'localhost' } = options; + const { port, keepAliveTimeout, hostname } = options; // This is required for the default custom server to work. See the @nx/next:app generator. process.env.NX_NEXT_DIR = projectRoot;