Repository navigation
fix(@angular/build): rebuild stylesheets when files are added to a PostCSS directory dependency - #34451
Open
MeAkib wants to merge 2 commits into
Open
fix(@angular/build): rebuild stylesheets when files are added to a PostCSS directory dependency#34451MeAkib wants to merge 2 commits into
MeAkib wants to merge 2 commits into
Conversation
…stCSS directory dependency Previously, a PostCSS `dir-dependency` message (used by Tailwind CSS v4 for its content sources) was expanded with a glob and only the files that existed at build time were watched. Files created later, or moved by renaming their folder, did not invalidate the cached stylesheet, so classes used only in them were not generated until the stylesheet itself changed. The directory is now also added to the watch files, and the load result cache invalidates an entry when a changed path is inside one of its watched directories. Fixes angular#34446
There was a problem hiding this comment.
Code Review
This pull request introduces support for directory dependencies (such as PostCSS dir-dependency) by watching the dependency directory itself and updating the cache invalidation logic to check parent directories recursively. The review feedback suggests normalizing the input path in the invalidate method to ensure OS-consistent path matching when looking up file dependencies.
…to a PostCSS directory dependency
MeAkib
force-pushed
the
fix/postcss-dir-dependency-watch
branch
from
October 20, 2026 18:34
22295e9 to
8462bbf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, a PostCSS
dir-dependencymessage (used by Tailwind CSS v4 for its content sources) was expanded with a glob and only the files that existed at build time were watched. Files created later, or moved by renaming their folder, did not invalidate the cached stylesheet, so classes used only in them were not generated until the stylesheet itself changed.The directory is now also added to the watch files, and the load result cache invalidates an entry when a changed path is inside one of its watched directories.
Fixes #34446