From e4c4697f69cf29c50aced1997715a7da5f680e23 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Fri, 5 Apr 2024 08:58:15 -0700 Subject: [PATCH] fix(js): append target when generating tmp tsconfig to prevent conflicts #21396 (#22671) (cherry picked from commit 1c6118e14014b59b8bd225c5a187d882b4c16fe5) --- e2e/vite/src/vite-legacy.test.ts | 2 +- packages/js/src/utils/buildable-libs-utils.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/vite/src/vite-legacy.test.ts b/e2e/vite/src/vite-legacy.test.ts index 6de99121f9638..6652b63312ee9 100644 --- a/e2e/vite/src/vite-legacy.test.ts +++ b/e2e/vite/src/vite-legacy.test.ts @@ -213,7 +213,7 @@ export default App; const results = runCLI(`build ${app} --buildLibsFromSource=false`); expect(results).toContain('Successfully ran target build for project'); // this should be less modules than building from source - expect(results).toContain('38 modules transformed'); + expect(results).toContain('40 modules transformed'); }); it('should build app from libs without package.json in lib', () => { diff --git a/packages/js/src/utils/buildable-libs-utils.ts b/packages/js/src/utils/buildable-libs-utils.ts index c6c8e034804e1..701afb52722ad 100644 --- a/packages/js/src/utils/buildable-libs-utils.ts +++ b/packages/js/src/utils/buildable-libs-utils.ts @@ -434,6 +434,7 @@ export function createTmpTsConfig( workspaceRoot, 'tmp', projectRoot, + process.env.NX_TASK_TARGET_TARGET ?? 'build', 'tsconfig.generated.json' ); const parsedTSConfig = readTsConfigWithRemappedPaths(