Skip to content

Commit

Permalink
fix(angular): safely update task runner cacheable operations when set…
Browse files Browse the repository at this point in the history
…ting up ssr (#20736)
  • Loading branch information
leosvelperez authored Dec 13, 2023
1 parent 3655269 commit b32f530
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,14 @@ export function updateProjectConfigForBrowserBuilder(

const nxJson = readNxJson(tree);
if (
nxJson.tasksRunnerOptions?.default &&
nxJson.tasksRunnerOptions?.default?.options?.cacheableOperations &&
!nxJson.tasksRunnerOptions.default.options.cacheableOperations.includes(
'server'
)
) {
nxJson.tasksRunnerOptions.default.options.cacheableOperations = [
...nxJson.tasksRunnerOptions.default.options.cacheableOperations,
'server',
];
updateNxJson(tree, nxJson);
nxJson.tasksRunnerOptions.default.options.cacheableOperations.push(
'server'
);
}
nxJson.targetDefaults ??= {};
nxJson.targetDefaults.server ??= {};
Expand Down

0 comments on commit b32f530

Please sign in to comment.