From 1d2c843c2608e05064597a2f4f7c74d48e472f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Fri, 3 May 2024 14:41:58 +0200 Subject: [PATCH] fix(angular): ensure buildable libraries in-process tsconfig file extends from the correct path (#23165) ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes #23091 --- .../src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts | 4 ++-- packages/angular/src/executors/package/package.impl.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts b/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts index dccc55d99b61f..4b051f523074b 100644 --- a/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts +++ b/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts @@ -4,7 +4,7 @@ import { DependentBuildableProjectNode, } from '@nx/js/src/utils/buildable-libs-utils'; import { NgPackagr } from 'ng-packagr'; -import { resolve } from 'path'; +import { join, resolve } from 'path'; import { createLibraryExecutor } from '../package/package.impl'; import type { BuildAngularLibraryExecutorOptions } from '../package/schema'; import { parseRemappedTsConfigAndMergeDefaults } from '../utilities/typescript'; @@ -20,7 +20,7 @@ async function initializeNgPackgrLite( if (options.tsConfig) { const remappedTsConfigFilePath = createTmpTsConfig( - options.tsConfig, + join(context.root, options.tsConfig), context.root, context.projectsConfigurations.projects[context.projectName].root, projectDependencies diff --git a/packages/angular/src/executors/package/package.impl.ts b/packages/angular/src/executors/package/package.impl.ts index 809939d5a607a..be99c7d407d91 100644 --- a/packages/angular/src/executors/package/package.impl.ts +++ b/packages/angular/src/executors/package/package.impl.ts @@ -7,7 +7,7 @@ import { type DependentBuildableProjectNode, } from '@nx/js/src/utils/buildable-libs-utils'; import type { NgPackagr } from 'ng-packagr'; -import { resolve } from 'path'; +import { join, resolve } from 'path'; import { from } from 'rxjs'; import { mapTo, switchMap } from 'rxjs/operators'; import { parseRemappedTsConfigAndMergeDefaults } from '../utilities/typescript'; @@ -24,7 +24,7 @@ async function initializeNgPackagr( if (options.tsConfig) { const remappedTsConfigFilePath = createTmpTsConfig( - options.tsConfig, + join(context.root, options.tsConfig), context.root, context.projectsConfigurations.projects[context.projectName].root, projectDependencies