Skip to content

Commit

Permalink
fix(angular): use the browserTarget to calculate project deps for bui…
Browse files Browse the repository at this point in the history
…ldable libs support in the dev server
  • Loading branch information
leosvelperez committed Nov 20, 2022
1 parent 3f2fa6c commit 257b0d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/angular/src/builders/utilities/buildable-libs.ts
Expand Up @@ -9,14 +9,15 @@ import { join } from 'path';

export function createTmpTsConfigForBuildableLibs(
tsConfigPath: string,
context: BuilderContext
context: BuilderContext,
target?: string
) {
let dependencies: DependentBuildableProjectNode[];
const result = calculateProjectDependencies(
readCachedProjectGraph(),
context.workspaceRoot,
context.target.project,
context.target.target,
target ?? context.target.target,
context.target.configuration
);
dependencies = result.dependencies;
Expand Down
Expand Up @@ -69,7 +69,11 @@ export function executeWebpackDevServerBuilder(
const buildTargetTsConfigPath =
buildTargetConfiguration?.tsConfig ?? buildTarget.options.tsConfig;
const { tsConfigPath, dependencies: foundDependencies } =
createTmpTsConfigForBuildableLibs(buildTargetTsConfigPath, context);
createTmpTsConfigForBuildableLibs(
buildTargetTsConfigPath,
context,
parsedBrowserTarget.target
);
dependencies = foundDependencies;

// We can't just pass the tsconfig path in memory to the angular builder
Expand Down

0 comments on commit 257b0d2

Please sign in to comment.