Skip to content

Commit

Permalink
fix(vue): make sure project is in normalizedOptions (#19690)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Oct 18, 2023
1 parent 6224026 commit aa57429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vue/src/generators/component/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export async function normalizeOptions(
className,
fileName: componentFileName,
projectSourceRoot,
projectName,
};
}

Expand All @@ -68,7 +69,8 @@ export function addExportsToBarrel(host: Tree, options: NormalizedSchema) {
tsModule = ensureTypescript();
}
const workspace = getProjects(host);
const isApp = workspace.get(options.project).projectType === 'application';
const isApp =
workspace.get(options.projectName).projectType === 'application';

if (options.export && !isApp) {
const indexFilePath = joinPathFragments(
Expand Down
1 change: 1 addition & 0 deletions packages/vue/src/generators/component/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface Schema {
}

export interface NormalizedSchema extends Schema {
projectName: string;
projectSourceRoot: string;
fileName: string;
className: string;
Expand Down

0 comments on commit aa57429

Please sign in to comment.