Skip to content

Commit

Permalink
fix(angular): prefix in project.json in migrated ng cli (#14662)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Jan 30, 2023
1 parent 79994e9 commit 8d5544e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/angular/src/generators/setup-mf/lib/add-remote-entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Tree } from '@nrwl/devkit';
import { generateFiles, joinPathFragments, readNxJson } from '@nrwl/devkit';
import type { ProjectConfiguration, Tree } from '@nrwl/devkit';
import {
generateFiles,
joinPathFragments,
readNxJson,
readProjectConfiguration,
} from '@nrwl/devkit';
import type { Schema } from '../schema';
import { addRoute } from '../../../utils/nx-devkit/route-utils';

Expand All @@ -8,7 +13,14 @@ export function addRemoteEntry(
{ appName, routing, mfType, prefix, standalone }: Schema,
appRoot: string
) {
prefix = prefix ?? readNxJson(tree).npmScope;
prefix =
prefix ??
(
readProjectConfiguration(tree, appName) as ProjectConfiguration & {
prefix?: string;
}
)?.prefix ??
readNxJson(tree).npmScope;
generateFiles(
tree,
standalone
Expand Down

0 comments on commit 8d5544e

Please sign in to comment.