Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): use the browserTarget to calculate project deps for buildable libs support in the dev server #13275

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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