diff --git a/packages/angular/src/generators/application/lib/add-e2e.ts b/packages/angular/src/generators/application/lib/add-e2e.ts index 717ea779862be..4deb99d86e755 100644 --- a/packages/angular/src/generators/application/lib/add-e2e.ts +++ b/packages/angular/src/generators/application/lib/add-e2e.ts @@ -27,8 +27,11 @@ export async function addE2e(tree: Tree, options: NormalizedSchema) { options.name, options.port ); - // TODO: This can call `@nx/web:static-config` generator when ready - addFileServerTarget(tree, options, 'serve-static', e2eWebServerInfo.e2ePort); + + if (options.e2eTestRunner) { + // TODO: This can call `@nx/web:static-config` generator when ready + addFileServerTarget(tree, options, 'serve-static', e2eWebServerInfo.e2ePort); + } if (options.e2eTestRunner === 'cypress') { const { configurationGenerator } = ensurePackage<