From eba235b7c5bf55408d82628378b289b6b70ccd7c 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) (cherry picked from commit c364207f3e3300a88857e49e5a24f38ac09513fe) --- 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 8e80439cdba1c..4a114ba70eef5 100644 --- a/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts +++ b/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts @@ -97,7 +97,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',