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 37ac9fd744231..0775df0b377b0 100644 --- a/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts +++ b/packages/nx/src/project-graph/utils/retrieve-workspace-files.ts @@ -258,8 +258,7 @@ function buildAllWorkspaceFiles( ): FileData[] { performance.mark('get-all-workspace-files:start'); let fileData: FileData[] = Object.values(projectFileMap).flat(); - - fileData = fileData.concat(globalFiles); + fileData = fileData.concat(globalFiles).sort(); performance.mark('get-all-workspace-files:end'); performance.measure( 'get-all-workspace-files',