diff --git a/packages/angular/src/generators/application/lib/normalize-options.ts b/packages/angular/src/generators/application/lib/normalize-options.ts index a71fb5f2b6207..04b9b9eeddaab 100644 --- a/packages/angular/src/generators/application/lib/normalize-options.ts +++ b/packages/angular/src/generators/application/lib/normalize-options.ts @@ -26,20 +26,8 @@ export async function normalizeOptions( options.rootProject = appProjectRoot === '.'; options.projectNameAndRootFormat = projectNameAndRootFormat; - let e2eProjectName = 'e2e'; - let e2eProjectRoot = 'e2e'; - if (!options.rootProject) { - const projectNameAndRoot = await determineProjectNameAndRootOptions(host, { - name: `${options.name}-e2e`, - projectType: 'application', - directory: options.directory, - projectNameAndRootFormat: options.projectNameAndRootFormat, - rootProject: options.rootProject, - callingGenerator: '@nx/angular:application', - }); - e2eProjectName = projectNameAndRoot.projectName; - e2eProjectRoot = projectNameAndRoot.projectRoot; - } + const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`; + const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`; const parsedTags = options.tags ? options.tags.split(',').map((s) => s.trim()) diff --git a/packages/next/src/generators/application/lib/normalize-options.ts b/packages/next/src/generators/application/lib/normalize-options.ts index b031d02f2babe..93425139a958c 100644 --- a/packages/next/src/generators/application/lib/normalize-options.ts +++ b/packages/next/src/generators/application/lib/normalize-options.ts @@ -35,20 +35,8 @@ export async function normalizeOptions( options.rootProject = appProjectRoot === '.'; options.projectNameAndRootFormat = projectNameAndRootFormat; - let e2eProjectName = 'e2e'; - let e2eProjectRoot = 'e2e'; - if (!options.rootProject) { - const projectNameAndRoot = await determineProjectNameAndRootOptions(host, { - name: `${options.name}-e2e`, - projectType: 'application', - directory: options.directory, - projectNameAndRootFormat: options.projectNameAndRootFormat, - rootProject: options.rootProject, - callingGenerator: '@nx/next:application', - }); - e2eProjectName = projectNameAndRoot.projectName; - e2eProjectRoot = projectNameAndRoot.projectRoot; - } + const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`; + const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`; const name = names(options.name).fileName; diff --git a/packages/react/src/generators/application/lib/normalize-options.ts b/packages/react/src/generators/application/lib/normalize-options.ts index d55da30eb8c10..f8ac90a154df0 100644 --- a/packages/react/src/generators/application/lib/normalize-options.ts +++ b/packages/react/src/generators/application/lib/normalize-options.ts @@ -36,20 +36,8 @@ export async function normalizeOptions( options.rootProject = appProjectRoot === '.'; options.projectNameAndRootFormat = projectNameAndRootFormat; - let e2eProjectName = 'e2e'; - let e2eProjectRoot = 'e2e'; - if (!options.rootProject) { - const projectNameAndRoot = await determineProjectNameAndRootOptions(host, { - name: `${options.name}-e2e`, - projectType: 'application', - directory: options.directory, - projectNameAndRootFormat: options.projectNameAndRootFormat, - rootProject: options.rootProject, - callingGenerator, - }); - e2eProjectName = projectNameAndRoot.projectName; - e2eProjectRoot = projectNameAndRoot.projectRoot; - } + const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`; + const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`; const parsedTags = options.tags ? options.tags.split(',').map((s) => s.trim())