Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): use absolute watch paths for post…
Browse files Browse the repository at this point in the history
…css dependency messages

Postcss's directory dependency message can use a glob pattern to reflect that multiple files
within a given directory should be watched. When calculated the complete file set, the paths
must be absolute to ensure that the watch system correctly invalidates the stylesheet being
processed.

(cherry picked from commit 376e346)
  • Loading branch information
clydin authored and alan-agius4 committed Jun 29, 2023
1 parent da6ec6f commit b56ab07
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ async function compileString(
typeof resultMessage['glob'] === 'string'
) {
loadResult.watchFiles ??= [];
const dependencies = await glob(resultMessage['glob'], { cwd: resultMessage['dir'] });
const dependencies = await glob(resultMessage['glob'], {
absolute: true,
cwd: resultMessage['dir'],
});
loadResult.watchFiles.push(...dependencies);
}
}
Expand Down

0 comments on commit b56ab07

Please sign in to comment.