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.
  • Loading branch information
clydin authored and alan-agius4 committed Jun 29, 2023
1 parent 6a0c220 commit 376e346
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,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 376e346

Please sign in to comment.