From c364207f3e3300a88857e49e5a24f38ac09513fe Mon Sep 17 00:00:00 2001 From: "C. T. Lin" Date: Wed, 12 Jul 2023 18:57:17 +0800 Subject: [PATCH] fix(core): use concat in buildAllWorkspaceFiles to avoid Maximum call stack size exceeded (#18065) --- packages/nx/src/project-graph/utils/retrieve-workspace-files.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts b/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts index 3e8a0d9175741..470259195a79b 100644 --- a/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts +++ b/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts @@ -109,7 +109,7 @@ function buildAllWorkspaceFiles( performance.mark('get-all-workspace-files:start'); let fileData = Object.values(projectFileMap).flat(); - fileData.push(...globalFiles); + fileData = fileData.concat(globalFiles); performance.mark('get-all-workspace-files:end'); performance.measure( 'get-all-workspace-files',