Skip to content

Commit

Permalink
fix: generate serve-static only if e2eTestRunner is passed
Browse files Browse the repository at this point in the history
Newly created app should not generate serve-static target under project.json if e2eTestRunner flag is not passed
  • Loading branch information
DariusPa authored Sep 10, 2024
1 parent 0c449b4 commit 1f057e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/angular/src/generators/application/lib/add-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down

0 comments on commit 1f057e8

Please sign in to comment.