Skip to content

Commit

Permalink
fix(js): respect "watch" option when "runBuildTargetDependencies" is …
Browse files Browse the repository at this point in the history
…true
  • Loading branch information
jaysoo committed Aug 28, 2024
1 parent 56311ae commit 7847daf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/js/src/executors/node/node.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,10 @@ export async function* nodeExecutor(
} else if (err) {
logger.error(`Watch error: ${err?.message ?? 'Unknown'}`);
} else {
logger.info(`NX File change detected. Restarting...`);
await runBuild();
if (options.watch) {
logger.info(`NX File change detected. Restarting...`);
await runBuild();
}
}
}
);
Expand Down

0 comments on commit 7847daf

Please sign in to comment.