Skip to content

Commit cae948d

Browse files
committed
fixup! fix(@angular/build): improve library watch mode state invalidation and lazy asset matchers
1 parent 5f47925 commit cae948d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/angular/build/src/builders/library

‎packages/angular/build/src/builders/library/builder.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ async function* runWatchLoop(
260260
stylesheetBundler.invalidate(rawChangedFiles);
261261
const changedFiles = buildState.getAffectedFiles(rawChangedFiles);
262262

263-
const hasStyleChanges = Array.from(changedFiles).some((file) =>
264-
/\.(?:scss|sass|css)$/i.test(file),
265-
);
266-
if (hasStyleChanges) {
267-
resetSassWorkerPoolCaches();
263+
for (const posixFile of changedFiles) {
264+
if (/\.(?:scss|sass|css)$/i.test(posixFile)) {
265+
resetSassWorkerPoolCaches();
266+
break;
267+
}
268268
}
269269

270270
// Check if package.json was modified or failed to reload on a previous iteration

0 commit comments

Comments
 (0)